You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
340 B
21 lines
340 B
9 years ago
|
#include <windows.h>
|
||
|
#include <initguid.h>
|
||
|
#include <KnownFolders.h>
|
||
|
#include <ShlObj.h>
|
||
|
#include <wchar.h>
|
||
|
|
||
|
int wmain(void) {
|
||
|
|
||
|
PWSTR path = NULL;
|
||
|
|
||
|
HRESULT hr = SHGetKnownFolderPath(&FOLDERID_Documents, 0, NULL, &path);
|
||
|
|
||
|
if (SUCCEEDED(hr)) {
|
||
|
wprintf(L"%ls\n", path);
|
||
|
}
|
||
|
|
||
|
CoTaskMemFree(path);
|
||
|
|
||
|
return 0;
|
||
|
}
|