How to make an app - Andromo App Maker


No announcement yet.

Embedding TrueUpdate?

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

  • #2
    Re: Embedding TrueUpdate?

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