I've been using an iPaq 3800 & 3900 devices and the code below works just
fine. But on a Toshiba with PPC 2003 runtime files everytime I execute this
code it starts a new instance of the program instead of reactivating the
current instance in memory. Therefore I get several instances of the same
program running at the same time. Can anyone help????

Public Declare Function CreateProcess Lib "Coredll" Alias "CreateProcessW" _
(ByVal pszImageName As String, ByVal pszCmdLine As String, ByVal
psaProcess As Long, _
ByVal psaThread As Long, ByVal fInheritHandles As Long, ByVal fdwCreate As
Long, _
ByVal pvEnvironment As Long, ByVal pszCurDir As Long, ByVal psiStartInfo
As Long, _
ByVal pProcInfo As String) As Long

lResult = CreateProcess("\Windows\pvbload.exe", "\Storage Card\Program_
Files\MobileLink\MobileLink4.vb", 0, 0, 0, 0, 0, 0, 0, "")

Thanks in advance,
steve

Re: PocketPc 2003, Toshiba by GB

GB
Wed Nov 12 17:39:40 CST 2003

Use FindWindow( ) to see if it's already running
then use SetForegroundWindow( ) if it is, else
start it with ShellExecuteEx( )...

GB

"Steve" <sblackford@prognote.com> wrote in message
news:RsUrb.45104$Ec1.3184487@bgtnsc05-news.ops.worldnet.att.net...
> I've been using an iPaq 3800 & 3900 devices and the code below works just
> fine. But on a Toshiba with PPC 2003 runtime files everytime I execute
this
> code it starts a new instance of the program instead of reactivating the
> current instance in memory. Therefore I get several instances of the same
> program running at the same time. Can anyone help????
>
> Public Declare Function CreateProcess Lib "Coredll" Alias "CreateProcessW"
_
> (ByVal pszImageName As String, ByVal pszCmdLine As String, ByVal
> psaProcess As Long, _
> ByVal psaThread As Long, ByVal fInheritHandles As Long, ByVal fdwCreate
As
> Long, _
> ByVal pvEnvironment As Long, ByVal pszCurDir As Long, ByVal psiStartInfo
> As Long, _
> ByVal pProcInfo As String) As Long
>
> lResult = CreateProcess("\Windows\pvbload.exe", "\Storage Card\Program_
> Files\MobileLink\MobileLink4.vb", 0, 0, 0, 0, 0, 0, 0, "")
>
> Thanks in advance,
> steve
>
>