LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can LavVIEW call a dll and return a handle?

I wanted to design a LabVIEW in the way of dll calling. I used the
"Video for Windows" in Visual Studio 2003 .NET and created a dll file
with a function calling of capCreateCaptureWindow(). This function
returned a handle. But when I used the Call Library Function Node, I
found handle wasn't a supported type.

Are there any ways to return a handle to LabVIEW?

Thank you!
0 Kudos
Message 1 of 6
(3,036 Views)
Hi, Andrew,
 
In your case you can use I32 type for output handle to the parent window.
 
best regards,
Andrey.
0 Kudos
Message 2 of 6
(3,031 Views)
Hi Andrew

Andrey is right.

For more information, please refer to this Help Document (Using External Code in LabVIEW)
Bottom of page 44/312 (pdf) talks about treating Handles as U32's

Hope this helps
Van L
NI Applications Engineer
0 Kudos
Message 3 of 6
(3,001 Views)
On Mar 6, 4:10 pm, Andrey Dmitriev <x...@no.email> wrote:
> Hi, Andrew,
> &nbsp;
> In your case you can use I32 type for output handle to the parent window.
> &nbsp;
> best regards,
> Andrey.

Hi,
An I32 type is OK? I thought handle was a pointer therefore I should
try another way...
Thank you very much! I'll try right now.

best regards,
Andrew
0 Kudos
Message 4 of 6
(2,985 Views)
Will "Adapt to type" suffice or not? Smiley Happy
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 5 of 6
(2,980 Views)

No, it seems to be not pointer:

http://msdn2.microsoft.com/en-us/library/ms707166(VS.85).aspx

Return Values

Returns a handle of the capture window if successful or NULL otherwise.

But you can also prepare your own simple DLL-Wrapper if you have troubles with passing parameters from original functions to and from LabVIEW.

Andrey.

 

0 Kudos
Message 6 of 6
(2,970 Views)