The following sample code shows how to copy the drives object into the Startup folder, so the Drives folder will be opened during system startup:
#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 moved to the Startup folder */
}
else
{
/* Copy failed */
}
}
}