The following sample code shows how to save the state of an object asynchronously:
#define INCL_WINWORKPLACE #include "os2.h" HOBJECT Object; BOOL fAsync = TRUE; BOOL fSuccess hObject = WinQueryObject("<WP_DESKTOP>"); if (hObject != NULL) { /* WinQueryObject was successful */ fSuccess = WinSaveObject(hObject,fAsync); if (fSuccess) { /* The state of the Desktop was saved asynchronously */ } else { /* Asynchronous save of the Desktop failed */ } }