Results 1 to 3 of 3

Thread: ShellExecute and Wait???

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2000
    Posts
    352

    ShellExecute and Wait???

    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.

    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
    Last edited by Joey_k29; Jan 8th, 2002 at 11:22 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width