Embedding TrueUpdate?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Matthias
    Forum Member
    • Jul 2002
    • 1

    Embedding TrueUpdate?

    I'm wondering how to embed trueupdate in a C or C++ application. I need to know whether TrueUpdate execution has been successful or not. The example in the documentation doesn't make much sense to me (trueupdateUsersGuide.pdf Page 176).
    HWND hWindow;
    int nResult;
    hWindow = GetSafeHwnd();
    nResult = ShellExecute(hWindow, "open",
    "C:\Program Files\Widget Designer\update.exe",
    "/R:1", NULL, SW_NORMAL);
    if(nResult > 32) // values above 32 indicate success
    {
    return TRUE; // update executed
    }
    else
    {
    return FALSE; // update not executed
    }
    The code is not synchronized therefore shellexecute will never actually be able to give a proper result code - it will return the process id of the spawned process instead.
    I've synchronized the code to wait for the shellexecute however it does always return the very same value.
    Does anyone have working sample code for this issue?
    Does the TrueUpdate executable return proper return values?

    Regards Matthias
  • Brett
    Indigo Rose Staff Member
    • Jan 2000
    • 2001

    #2
    Re: Embedding TrueUpdate?

    The TrueUpdate client process always returns a 0 as its exit code.

    Comment

    Working...
    X