How bout this...
lSuccess = CreateProcess(sNull, _
"C:\RIAAS_Simulator_RSM\PathProx.exe", _
ByVal 0&, _
ByVal 0&, _
1&, _
NORMAL_PRIORITY_CLASS, _
ByVal 0&, _
"C:\RIAAS_Simulator_RSM", _
sInfo, _
pInfo)
On 20 Aug 2004 19:22:41 -0700,
ratnakarp2002@yahoo.co.in (Ratnakar
Pedagani) wrote:
[color=blue]
>Hi,
>
>I'm trying to execute a GUI application from visual basic (named
>PathProx.exe). this pathprox.exe is linked to different files that are
>present in the same directory as pathprox. when i'm trying execute
>pathprox.exe directly, i could run the application without any errors,
>but when i'm executing the same using visual basic with the following
>code, pathprox.exe is unable to link with those files. its giving some
>errors. i dont have the source code for pathprox application. can
>anybody suggest me as where i'm going wrong or any solution for this?
>
>Dim pInfo As PROCESS_INFORMATION
> Dim sInfo As STARTUPINFO
> Dim sNull As String
> Dim lSuccess As Long
> Dim lRetValue As Long
>
> sInfo.cb = Len(sInfo)
> lSuccess = CreateProcess(sNull, _
>
>"C:\RIAAS_Simulator_RSM\PathProx.exe", _
> ByVal 0&, _
> ByVal 0&, _
> 1&, _
> NORMAL_PRIORITY_CLASS, _
> ByVal 0&, _
> sNull, _
> sInfo, _
> pInfo)
>
> lRetValue = TerminateProcess(pInfo.hProcess, 0&)
> lRetValue = CloseHandle(pInfo.hThread)
> lRetValue = CloseHandle(pInfo.hProcess)
>
>Thanking you,
>Regards,
>Ratnakar Pedagani.[/color]