08-19-2013 02:01 AM
HI
I got a Dll which is found in the internet.
Now I want to use "Call Library Function Node" to get data from this DLL.
Unfortunately,I don,t know how to set the "HBITMAP" without knowing the right type in labview.
the DLL code : extern "C" __declspec(dllimport) bool __stdcall DataMatrixDecodeBitmap(HBITMAP hImage, char *pResult, int *pSize,int nTimeOut);
Is any body know the right type of HBITMAP in the labview ? array ? or labview can,t support this kind of type.
Any suggestions would be very appreciated.
Thanks
Solved! Go to Solution.
08-19-2013 02:23 AM - edited 08-19-2013 02:30 AM
Hi
try to look in the header what is this type of data. It may be a custom structure, definedin this file. If so, wire a cluster with the same elements which are in the structure.
EDIT : found on google
--------------
Although Windows Handles are under Windows 32bit mostly pointers to memory
it would be a bad idea to try to access those data directly. Windows handles are
meant to be opaque data types whose internal structure is only known to Windows
and more specific to Windows versions similar or better than the one who created it.
The Windows API gives you (almost) all the functionality to access the specific
information inside a handle. HBITMAPS would need to be accessed with the API
function GetDIBits(). This function works with a device context handle HDC you
probably need to get from your grabber interface. This is necessary to convert
the device dependant information in a HBITMAP into the device independant
(the DI in GetDIBits) information in the parameters you want to receive.
-----------------
So,this is a I32 or I64, depending on your system. It's a pointer to a memory space.
And here is a previous discussion : Forum NI