PDA

View Full Version : Embedding TrueUpdate?



Matthias
07-22-2002, 12:39 PM
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
08-12-2002, 11:36 AM
The TrueUpdate client process always returns a 0 as its exit code.