B
bhumithakker
I am using a DLL function (complied in VC7), which takes a parameter
of 'HANDLE *' datatype.
The DLL developers recommend passing a HANDLE object using the
following syntax:
HANDLE obj =NULL;
func(&obj);
On successful execution of the code 'obj' is initialised to some
value.
This code works if used within VC++ MFC Application using VS2005.
But the same doesnt work in VC++ Windows Form Application using
VS2005.
In a VC++ Windows Form Application using VS2005, the compiler expects
the following syntax:
HANDLE obj =NULL;
func((HANDLE *)obj);
This compiles but gives a runtime error, and fails to initialise
'obj'.
What am I doing wrong? And how can I use the DLL function in a VC++
Windows Form Application using VS2005.
Thanks,
Bhumi
of 'HANDLE *' datatype.
The DLL developers recommend passing a HANDLE object using the
following syntax:
HANDLE obj =NULL;
func(&obj);
On successful execution of the code 'obj' is initialised to some
value.
This code works if used within VC++ MFC Application using VS2005.
But the same doesnt work in VC++ Windows Form Application using
VS2005.
In a VC++ Windows Form Application using VS2005, the compiler expects
the following syntax:
HANDLE obj =NULL;
func((HANDLE *)obj);
This compiles but gives a runtime error, and fails to initialise
'obj'.
What am I doing wrong? And how can I use the DLL function in a VC++
Windows Form Application using VS2005.
Thanks,
Bhumi