LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Win32 api CreateProcess() with LabVIEW

I'm trying to use win32 API CreateProcessA for opening a console application.

 

The function always return 0, but it never open the cmd.exe. I already checked function

 

syntax on MSDN.

 

http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx

 

Please kindly advise, any comments would be appreciated.

 

LabVIEW 8.5, XP SP2

 

Adam

 

0 Kudos
Message 1 of 4
(3,218 Views)

Hi Adam,

is there a reason to not use the SystemExec.vi?

 

Mike

0 Kudos
Message 2 of 4
(3,214 Views)

Hi Mike,

 

I had a console application from customer, this application will alarm and warn users to do something,

 

so I need to know the HANDLE of application to record warnings and take corresponding actions.

 

Adam

0 Kudos
Message 3 of 4
(3,195 Views)

Hi Adam1122,

the return value 0 means an error occurs. If you only need the handle of the console applicaiton, then you can try it with the FindWindow function from user32.dll.

http://forums.ni.com/ni/board/message?board.id=170&message.id=338001&query.id=924149#M338001

 

Edit: Did you already see this thread?

http://forums.ni.com/ni/board/message?board.id=170&requireLogin=False&thread.id=146577

 

Mike

Message Edited by MikeS81 on 07-08-2009 08:00 AM
0 Kudos
Message 4 of 4
(3,189 Views)