Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CreateProcessW API does not seem to work with Windows CE Pocket PC SDK

0 views
Skip to first unread message

Ketan Mehta

unread,
Nov 21, 2000, 3:00:00 AM11/21/00
to

I need to spawn other exes from my app which I am developing using eVB 3.0 adn
the Pocket PC SDK. My test device is a Casio E-115. I am using
the "CreateProcessW" API to start up the child process. But nothing happens and
CreateProcessW simply returns without starting up the second app.

Can anyone help me with this issue?

Thanks.

Ketan Mehta
DigiCon Systems
281-531-1107

TGoggin

unread,
Nov 24, 2000, 1:16:45 PM11/24/00
to
Can you post your code?

--
Terence "Dr. CE" Goggin
Information Appliance Assoc.
Windows CE Development and Consulting
terencegoggin AT hotmail DOT com

Ketan Mehta <dig...@pdq.net> wrote in message
news:11d201c053e8$8ce96d00$66862ecf@cpmsftngxa07...

Gary Peluso

unread,
Nov 27, 2000, 3:00:00 AM11/27/00
to
Hi Ketan,

CreateProcess should work for you provided you understand some of the
nuances of CE. For example, a process in CE does not have the concept of
"current directory" so you always have to give a full path.

In case you are leary about posting your code on a public newsgroup, here's
some code I wrote a while back that launches pvbload.exe.

Let us know if this helps or not.

Gary Peluso
Microsoft
Windows CE Developer Support


// testvc.cpp : Defines the entry point for the application.
//

#include "stdafx.h"

int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
BOOL bRet;
PROCESS_INFORMATION pi;


bRet = CreateProcess(TEXT("\\windows\\pvbload.exe"),
TEXT("\\My Documents\\Test\\Project1.vb"),
NULL, NULL, FALSE, 0, NULL, NULL, NULL, &pi);
if (!bRet)
{
TCHAR szDebug[80];
wsprintf(szDebug, TEXT("CreateProcess failed: %d"), GetLastError());
MessageBox(NULL, szDebug, NULL, MB_OK);
return 0;
}

// cleanup
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);

return 0;
}

Gary Peluso

unread,
Nov 29, 2000, 7:55:37 PM11/29/00
to
Hi Ketan,

I didn't get your sample code post the first time. Sorry about that.

In looking at your code you are not passing a buffer for the Process
Information.
This is a required parameter. That is why CreateProcess is failing in your
case.

Because there are no UDTs in VB you must implement a C/C++ DLL
that will do the call to CreateProcess. This is what we've prescribed in
the past.

The PROCESS_INFORMATION structure will contain a handle to the process and
a handle
to the main thread. These must be closed otherwise your application will
be leaking handles.

Let us know if you have any further questions.

0 new messages