This example finds the directory specification of the current desktop.

#define INCL_WINWORKPLACE
#include <os2.h>

CHAR    szPath[CCHMAXPATH + 1];
BOOL    fSuccess;

fSuccess = WinQueryActiveDesktopPathname(szPath,sizeof(szPath));
if (fSuccess)
{
  /* WinQueryActiveDesktopPathname was successful */
}
else
{
  /* WinQueryActiveDesktopPathname failed */
}


[Back] [Next]