LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing DLL buffer data after receiving Windows Message

Hi All

 

I read the thread fully and like Gustavo, I am interested in using the MS4407.  I have it recognized as a HID device and it scans barcodes.  Now I want to use the SNAPI.ddl (and the functions) in Labview.  There is a function to initialize the device, but it needs a handle to the device (pointer - c function) and to start I am not able to find that.  There is a program "scannerHID.vi" in the forum which works with this device and scans in the barcode.  So I now it can work with labview.  I just want some pointers to get moving.

 

Lastly - is there a tutorial that I can use or read to find out how to use ".dll" in labview.

 

thanks

rungun

0 Kudos
Message 41 of 44
(1,023 Views)

I'd be happy to help you get started with this DLL if you can provide more details.  What functions are you trying to call?  What are the prototypes for those functions?  Providing specific information, and a link to the documentation if possible.  I think you have misunderstood something - why do you refer to the device handle as a "pointer - c function"?  Most likely the device handle is just an integer; it is possible that you need to pass in an integer by reference and that the init function fills in the value.

0 Kudos
Message 42 of 44
(1,020 Views)

Hi Nathan

 

thanks you reply.  I agree with you about the integer, but from my understanding for chapter 2 of the manual below (page 40) I will need a pointer to the device handles.  When I use the library call in Labview I am supposed to set up the input arguements, which will point to the device.  I do not know where to get that information for the device?

 

My thought process is as follows

 

initi the scanner, wait for a scan, read the scanned data, and decode if necessary and go back and wait for next scan.  There are functions I can use to trigger scan, but I think once I get it up and running then I can worry about it.

 

Lastly I have other sensors that are also being integrated with this barcode scanner and I want to automate the process.  This approach seems to be a logical choice.  The bar code is the identifier for each set of data I acquire and I will be sampling several hundreds of samples.  I can finally create a labview data file with all the information....

 

thanks again for the offer of help Nathan

rungun

 

http://www.motorola.com/web/Business/Products/Bar%20Code%20Scanning/Bar%20Code%20Scanners/Fixed%20Mo...

0 Kudos
Message 43 of 44
(1,018 Views)

One thing at a time here.  If you look at MSDN Windows Data Types, HANDLE is defined as PVOID, which in turn is defined as void *, which is a pointer-sized integer.  So, you can pass an array of HANDLE by passing an array of pointer-sized integers.  Most likely this will be an array of U32, although it could be an array of U64 if you have a 64-bit system running in 64-bit mode.  You will also need the Windows Messaging Library, so you can get the HWND of a LabVIEW window.  Those two should get you past the Init call.

0 Kudos
Message 44 of 44
(1,007 Views)