Visual Basic 6.0 - Ejecutar una aplicación desde la Shell

Written by lopezatienza on 29 Octubre 2008 – 16:54 -



Dim lWait As Long

Dim bProceed As Boolean

Dim LRet As Long

Dim sMessage As String

Dim sPROCESS_INFORMATION As String

Dim hProcess As Long

Dim hThread As Long

Dim dwProcessId As Long

Dim dwThreadId As Long

' now reopen the HHT software

' Initialize PROCESS_INFORMATION memory string.

' Convert initial Rect values to String to pass into CreateProcess API.

    sPROCESS_INFORMATION = PROCESS_INFORMATION(hProcess, hThread, _

    dwProcessId, dwThreadId)

'MsgBox "aqui entra"

 

    LRet = CreateProcess(App.Path & "\Nombre_Aplicacion.exe", "", _

    0, 0, 0, 0, 0, 0, 0, sPROCESS_INFORMATION)

 

 

' convert string back to long integer

    getPROCESS_INFORMATION sPROCESS_INFORMATION, hProcess, hThread, _

    dwProcessId, dwThreadId


Tags:
Posted in Visual Basic 6.0 |

Leave a Comment

RSS