View Full Version : Embedding TrueUpdate?

07-22-2002, 11:39 AM
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",
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

08-12-2002, 10:36 AM
The TrueUpdate client process always returns a 0 as its exit code.