16 lines
305 B
C++
16 lines
305 B
C++
|
#define WIN32_LEAN_AND_MEAN
|
||
|
#define STRICT
|
||
|
#include <shlobj.h>
|
||
|
#include <errno.h>
|
||
|
|
||
|
int xvt_fsys_get_desktop(char* dir)
|
||
|
{
|
||
|
int err = EINVAL;
|
||
|
if (dir)
|
||
|
{
|
||
|
::SHGetFolderPathA(NULL, CSIDL_DESKTOPDIRECTORY, NULL, SHGFP_TYPE_CURRENT, dir);
|
||
|
err = *dir ? 0 : ENOENT;
|
||
|
}
|
||
|
return err;
|
||
|
}
|