CreateProcess() sometimes fails to start QuickWin application 
Author Message
 CreateProcess() sometimes fails to start QuickWin application

I have a 32-bit application which must start a 16-bit QuickWin
application on Windows 3.1x with Win32s 1.30.  Sometimes it works just
fine.  Other times, CreateProcess() fails and GetLastError() returns 0.
Can anyone explain what error 0 is?

It seems to work just fine if I don't log in to the Novell network.
However, if do log in to the network, but pass shorter parameters to the
QuickWin application the first time, I can get it to work the second
time with the correct parameters.

One other interesting item which MIGHT be related.  The 32-bit
application is an SDI which puts up an initial dialog in the app's
InitInstance() before creating/adding the document template.  If this
app is run from an icon in Program Manager, Program Manager "locks up"
until the dialog is dismissed.  The same thing happens with File Manager
if this 32-bit app is started from F.M.

ANY insight or ideas will be GREATLY appreciated.

Jerry Koedam
Computer Data Systems, Inc.

The 32-bit application's code which starts the 16-bit QuickWin app is as

    // call dologin.exe with appropriate parameters
    // foramt is: 'login' 'password' DatabaseServerName
    CString strCommandLine;
    strCommandLine = "dologin '";
    strCommandLine += G_strLoginName + "' '";
    strCommandLine += G_strPassword + "' ";
    strCommandLine += strServerName + " ";
    strCommandLine += strServerFileName;

    BOOL bReturn; // return value from CreateProcess()
    PROCESS_INFORMATION zProcessInformation; // param to CreateProcess()
    STARTUPINFO zStartupInfo; // param to CreateProcess()

    zStartupInfo.cb = sizeof(zStartupInfo);
    zStartupInfo.wShowWindow = SW_MINIMIZE;
    zStartupInfo.dwFlags = STARTF_USESHOWWINDOW;

    bReturn = CreateProcess(NULL,strCommandLine.GetBuffer(0),NULL,NULL,


    if (bReturn != TRUE)
        int iErrorCode = GetLastError();
        char szMessage[128];

        sprintf(szMessage,"Could not run login program.  (Error

Sat, 16 Oct 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. using CreateProcess() to start VB applications

2. Why the application failed to start?

3. Service sometimes won't automatically start on Windows2000

4. DCOM Proxy stub DLL fails to register - SOMETIMES ...

5. SetCooperativeLevel fails SOMETIMES...why?

6. Socket Error: WSAGetOverlappedResult fails sometimes

7. debug version works, release version sometimes fails

8. ICON fails to load sometimes

9. RpcNsBindingLookupBegin SOMETIMES fails

10. LoadFrame sometimes fails on NT, then requires reboot to fix

11. RegQueryValueEx failing sometimes.

12. GetMethod() sometimes fails in recursive call


Powered by phpBB® Forum Software