The following sample code shows how to obtain the directory specification of the active 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]