How to use ShellExecuteEx?? 
Author Message
 How to use ShellExecuteEx??

Hi,
I'm trying to use the API function ShellExecuteEx in Visual Basic 5.0.
I'm also trying to get the process handle back from the function.
But from some reason I only get 0 back.
I'm using the following declarations:
    Public Const SEE_MASK_NOCLOSEPROCESS = &H40
    Type SHELLEXECUTEINFO
            cbSize As Long
            fMask As Long
            hwnd As Long
            lpVerb As String
            lpFile As String
            lpParameters As String
            lpDirectory As String
            nShow As Long
            hInstApp As Long
            '  Optional fields
            lpIDList As Long
            lpClass As String
            hkeyClass As Long
            dwHotKey As Long
            hIcon As Long
            hProcess As Long
    End Type
    Declare Function ShellExecuteEx Lib "shell32.dll" (ByRef pSEI As
SHELLEXECUTEINFO) As Long
And I'm using the function as follows:
    With ShInfo
        .hwnd = 0
        .fMask = SEE_MASK_NOCLOSEPROCESS
        .lpVerb = "open"
        .nShow = vbNormalFocus
        .lpFile = pathname
        .cbSize = Len(ShInfo)
    End With
    ModuleHandle = ShellExecuteEx(ShInfo)
Afterwards ShInfo.hProcess is still 0. So, my question is, what is wrong in
this code?
Can someone help me??

Regards, Hugo.



Sun, 23 Jul 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ShellExecuteEx command

2. ShellExecuteEx equivalent

3. hProcess coming back from ShellExecuteEx is always 0

4. ShellExecuteEx

5. hProcess restituito da ShellExecuteEx sempre a 0

6. ShellExecuteEx

7. URGENT: ShellExecuteEx

8. ShellExecuteEx to same Netscape window

9. ?? shellExecuteEX() question

10. ShellExecuteEx error problems

11. ? -- How do you wait for the ShelLExecuteEx default app to close

12. How to declare ShellExecuteEx?

 

 
Powered by phpBB® Forum Software