Joey_k29
Jan 8th, 2002, 08:56 AM
At one point in my program, it is necessary to shell a document(of which I do not know the default program to launch it). To avoid this problem, I used the ShellExecute API command. The problem is now, for some reason the processid that is being returned is not successfully working with my code.
processid = ShellExecute(Me.hwnd, vbNullString, pathtofile, commandline, "C:\", vbNormalFocus)
processhandle = OpenProcess(SYNCHRONIZE, 0, processid)
This worked fine before with Shell. It stil returns a non-zero processid, but it no longer establishes a non-zero process handle. How do I fix this? Thank you very much for the help.
Joe
processid = ShellExecute(Me.hwnd, vbNullString, pathtofile, commandline, "C:\", vbNormalFocus)
processhandle = OpenProcess(SYNCHRONIZE, 0, processid)
This worked fine before with Shell. It stil returns a non-zero processid, but it no longer establishes a non-zero process handle. How do I fix this? Thank you very much for the help.
Joe