Hi Mauricio,
Not positive on the DLL side. I have done the following in a stand alone
EXE.
void WINAPI LaunchAndWait(LPSTR lpszFilename)
{
PROCESS_INFORMATION ProcessInformation; // Holds information on launched
process
STARTUPINFO StartupInformation; // Holds information on startup of
process
DWORD dwReturn; // Holds information on wait
BOOL boolReturn; // Indicates successful operation, maybe
!
// Initialise startup information structure.
StartupInformation.cb = sizeof(STARTUPINFO); // Set size of
structure
StartupInformation.lpReserved = NULL; // Must be NULL
StartupInformation.lpReserved2 = NULL; // Must be NULL
StartupInformation.cbReserved2 = 0; // Must be 0
StartupInformation.lpDesktop = NULL; // Inherite process desktop
StartupInformation.lpTitle = NULL; // No title
StartupInformation.dwFlags = 0L; // No setup flags
// Create a process for the main installation programme.
boolReturn = CreateProcess(lpszFilename, NULL, NULL, NULL, TRUE,
NORMAL_PRIORITY_CLASS, NULL, NULL,
&StartupInformation, &ProcessInformation);
// Check the process successfully created.
if (boolReturn != FALSE)
{
// If process launched and running wait for same to close and then
// shutdown the process space.
dwReturn = WaitForSingleObject(ProcessInformation.hProcess, INFINITE);
boolReturn = CloseHandle(ProcessInformation.hProcess);
}
else
{
MessageBox(NULL, M_INSTALL_FAILED, M_APPLICATION_NAME, MB_OK);
}
return;
}
As the name of the routine implies it launches another application and wiats
for the applications process to finish before continuing to execute. Your
man might like to give it a whirl and see if this helps.
Neil.
----- Original Message -----
From: "Mauricio Tavares" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, May 31, 2000 2:49 PM
Subject: dlls and some design thoughts
> First of all, how can we persuade the dll file we (ok, not me but the
> bloke who is doing the conduit) created to transfer data from the
> pilot-side program to the PC to call another program? I would like to do
> something like system() but do not seem to be able to do it. If that
> matters this dll file was done under VC++ 6.0.
>
> My (me and me alone! ;) view of the program is that the user would slap
the
> pilot on the craddle and run this program that would then offer to
download
> the data recorded by the pilot and put it in a nice pretty form. Ideally,
> I would like to have the user interact with this program only; behind the
> curtains the program forces hotsyncing as needed and gets the data. I
> really do nto want to have user going all over the place for it. Is that
> possible?
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/