This example copies the drives object into the startup folder; the drives folder will be opened at the startup of the system.
#define INCL_WINWORKPLACE #include "os2.h" HOBJECT hObjectofDest; HOBJECT hObjectofObject; HOBJECT hObjectofResult; hObjectofObject = WinQueryObject("<WP_DRIVES>"); if (hObjectofObject != NULL) { /* WinQueryObject of Drives was successful */ hObjectofDest = WinQueryObject("<WP_START>"); if (hObjectofDest != NULL) { /* WinQueryObject of Startup was successful */ hObjectofResult = WinCopyObject(hObjectofObject, hObjectofDest, 0); if (hObjectofResult != NULL) { /* Drives Object was successfully copied to the Startup Folder */ } else { /* Copy failed */ } } }