LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView shutting down when runing VI

Hi all
I've just started learning LabView; I need it to create an interface of a camera to a PC. I am havin a problem as each time I run my Vi it just shuts down without giving anf errors or exceptions(?).
In this VI, I used a Call Library fuction Node to call one of the fuctions provided with the camera software.
Thanks in addvance..
0 Kudos
Message 1 of 5
(2,789 Views)
It seems like the Call Library Node is not configured correctly. Be sure you are using the right calling conventions. See http://zone.ni.com/devzone/conceptd.nsf/webmain/B26A875ACA51C567862567CA0055FF24?opendocument for more details.
0 Kudos
Message 2 of 5
(2,789 Views)
The method I am clalling is given in the API as follows:
Syntax:

PXL_RETURN_CODE PimMegaStartPreview(
obligatory,
IN HANDLE hImager (this is an U32)

Optional
Parameters,
IN LPSTR title
="PL1394 Camera Preview",
IN U32 style
=WS_OVERLAPPEDWINDOW|WS_VISIBLE,
IN U32 x=0,
IN U32 y=0,
IN U32 width=-1,
IN U32 height=-1,
IN HWND parent=NULL,
IN U32 nId=0,
IN int PreviewDataThreadPriority
=THREAD_PRIORITY_BELOW_NORMAL,
IN int PreviewDrawThreadPriority
=THREAD_PRIORITY_BELOW_NORMAL);

There i
s only one parameter which is obligatory and the remainin are optional. I tried calling the method with the first parameter only but it didn't work and the same problem occured.
Do you know how can represent a HWND variable using LabView and how can I set it to NULL value.
Thanks very much
0 Kudos
Message 3 of 5
(2,789 Views)
You will need to specify all of the arguments. (Default arguments are just syntactic sugar; The arguments are always there, but the C compiler automatically puts the default arguments in if they are unspecified.)

Also, be sure to check the calling conventions (stdcall or cdecl).
0 Kudos
Message 4 of 5
(2,789 Views)
Thanks very much, it worked at the end
0 Kudos
Message 5 of 5
(2,789 Views)