07-07-2009 10:50 AM
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
07-07-2009 11:06 AM
Hi Adam,
is there a reason to not use the SystemExec.vi?
Mike
07-07-2009 11:22 PM
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
07-08-2009 12:55 AM - edited 07-08-2009 01:00 AM
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