The following sample code fragment shows how to create a shadow of drive A on the desktop:

#define INCL_WINWORKPLACE
#include "os2.h"

HOBJECT   hObjectofObject;
HOBJECT   hObjecttoDest;
HOBJECT   hObjectofResult;
{
  hObjectofObject = WinQueryObject("<WP_DOS_DRV_A>");
  if (hObjectofObject != NULL)
  {
    /* WinQueryObject of DOS from Dive A: object was successful */
    hObjecttoDest = WinQueryObject("<WP_DESKTOP>");
    if (hObjecttoDest != NULL)
    {
      /* WinQueryObject of DOS from Dive A: object was successful */
      hObjectofResult = WinCreateShadow(hObjectofObject,hObjecttoDest,NULL);
      if (hObjectofResult != NULL)
      {
        /* Shadow of DOS from Drive A: object is placed on the Desktop */
      }
      else
      {
        /* WinCreateShadow failed */
      }
    }
  }
}


[Back] [Next]