03-12-2009 04:35 PM - edited 03-12-2009 04:39 PM
Hi there everyone, I am trying to learn how to use call library in Labview and this would be my first time doing so.
I am looking at an example online for usb and webcam.
I found this example with
WEBCAMGRAB.DLL
I looked into the blocked diagram and i see 3 inputs.
the reason i know this because the block diagram said so.
lets say that i don't have the blocked diagram and only the WEBCAMGRAB.DLL file. How would I know how to use the file in CALL LIBRARY node?
how do i know that int32 is driver, width, and height?
Solved! Go to Solution.
03-12-2009 05:02 PM
03-12-2009
05:06 PM
- last edited on
08-11-2025
08:55 AM
by
Content Cleaner
You need the documentation for the DLL. Or, the .h file that lists the protoypes.
You may want to peruse this document: Using Existing C Code or a DLL in LabVIEW. There is also an example that ships with LabVIEW showing you a variety of input types. Help -> Find Examples, and search for "DLL". The example is "Call DLL".
jmcbee said:
They must have a .FOR file that goes with this VI.
.FOR?
03-12-2009
05:10 PM
- last edited on
08-11-2025
08:55 AM
by
Content Cleaner
Is it Friday Yet? I momentarily lost my mind.
smercurio_fc wrote:
You need the documentation for the DLL. Or, the .h file that lists the protoypes.
You may want to peruse this document: Using Existing C Code or a DLL in LabVIEW. There is also an example that ships with LabVIEW showing you a variety of input types. Help -> Find Examples, and search for "DLL". The example is "Call DLL".
jmcbee said:They must have a .FOR file that goes with this VI..FOR?
03-13-2009 12:23 PM - edited 03-13-2009 12:27 PM
03-13-2009
01:00 PM
- last edited on
08-11-2025
08:56 AM
by
Content Cleaner
The .h file is useful as it allows you to run the Import Shared Library Wizard. This will (try to) create individual VIs for each function in the DLL. The wizard requires the DLL itself, and the header file. If you don't have the .h file then you need to wire up the Call Library Function Node function.
Using a DLL to control hardware is no different than using a DLL for something else. It's all a matter of understanding what functions to call, and in what order. Common problems are in allocating memory for arrays or strings. Usually DLL functions assume the caller has allocated the memory for these.
What is the VI that you uploaded supposed to demonstrate? It calls a bunch of subVIs, none of which are included. Are you calling the DLL in these subVIs?
03-13-2009 01:07 PM
oh..the test.vi that i included is to show you where i got the files from.
i have attached another file.
it really doesn't help you to help me much, but it just tell you where i got the webcam.dll from.
hmmm...i'll look more into import shared library wizard and see if that will work out for me..
thanks
03-13-2009 01:41 PM - edited 03-13-2009 01:43 PM
ok..after running the wizard..i am now facing this issue...
03-13-2009 01:51 PM
That usually means you have the wrong version of the DLL. For example, you have a Windows 9x version of a DLL and are trying to use it on XP. Where did you get the DLL? It's obviously not the one in the webcam library, since the DLL in there is named "WebcamGrab.dll", and there's also wrapper VIs written for it, so there's no need to run the wizard on it (unless you're doing it to learn).
If you upload the DLL (would need to zip it) it can be looked at.
03-17-2009 01:31 PM
Smercurio_fc!!
Thank you for helping me on this. Sorry about the late response. I was stuying for a final the whole weekend and now I am back working on this project...
Here is my DLL file. can you please take a look and see what's the problem here?
thanks