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.
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.Code:processid = ShellExecute(Me.hwnd, vbNullString, pathtofile, commandline, "C:\", vbNormalFocus) processhandle = OpenProcess(SYNCHRONIZE, 0, processid)
Joe




Reply With Quote