LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Thr type of hbitmap in the labview

Solved!
Go to solution

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);

 

111.png

 

 

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

 

0 Kudos
Message 1 of 2
(2,646 Views)
Solution
Accepted by ricky10116

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

Giuliano Franchetto
Student at the l'Ecole Nationale Supérieure des Mines de Saint-Etienne, cycle ISMIN (FRANCE)
Message 2 of 2
(2,640 Views)