ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call function from dll in labview

Hi All,
I have to get data from USB camera, I have following functions in DLL.
DLLINOUT HANDLE WINAPI CC_Open( LPCSTR CameraName , ULONG CameraNumber , CC_CAPTURE_MODE CaptureMode ) ;
and
DLLINOUT BOOL WINAPI CC_CaptureSingle( HANDLE Cam , PVOID Buffer , ULONG TransferSize , CC_TRIGGER_MODE TriggerMode , USHORT TimeOut , OVERLAPPED * pUserOverlapped );

When I open hardware with function cc_open I am getting handle to an object. How can I store this object and pass it to CC_CaptureSingle function?

Another question is when I call CC_CaptureSingle I am getting pointer on the 2 dimension array �PVOID buffer� how can I get this array in Labview?
0 Kudos
Message 1 of 7
(3,807 Views)
1. Handle is just a I32 in labview, you can use a local variable to store the value

2. you need to know the size of the pvoid buffer, initialize a 2D array (most likely it's going to be array of U8), pass it to the function. In the DLL setup, instead of using a scaler for the pvoid, you need to use "Array Poitner" for it.

Hope this helps,

-Joe
0 Kudos
Message 2 of 7
(3,807 Views)
Hi Teimur
I am postgraduate Research student. I try to operate CCf15 Camera by LabVIEW. I have same problem like you. Have you got any signal yet? Are you using C CAM camera (Victor International product). I got all functions outparameter one except CC_CaptureSignal. Its output still reamin zero.
I send LabVIEW code as attachment.
You comments will be helpful for me.
Regards
M Kamal
Postgrad
School of MME
DCU
Dublin
Ireland
mohammad.kamal2@mail.dcu.ie
0 Kudos
Message 3 of 7
(3,807 Views)
Hi Teimur
I am postgraduate Research student. I try to operate CCf15 Camera by LabVIEW. I have same problem like you. Have you got any signal yet? Are you using C CAM camera (Victor International product). I got all functions outparameter one except CC_CaptureSignal. Its output still reamin zero.
I send LabVIEW code as attachment.
You comments will be helpful for me.
Regards
M Kamal
Postgrad
School of MME
DCU
Dublin
Ireland
mohammad.kamal2@mail.dcu.ie"
0 Kudos
Message 4 of 7
(3,807 Views)
0 Kudos
Message 5 of 7
(3,166 Views)

Hello,
I can contact you because I noticed that you've had a similar problem to mine with a USB camera (vector internationnal) Have you found a solution to declare the buffer. Do you have a correct VI for the "single capture.

Best regards

0 Kudos
Message 6 of 7
(3,165 Views)

Hello,
I can contact you because I noticed that you've had a similar problem to mine with a USB camera (vector internationnal) Have you found a solution to declare the buffer. Do you have a correct VI for the "single capture.

Best regards

0 Kudos
Message 7 of 7
(3,164 Views)