summaryrefslogtreecommitdiff
path: root/src/PlatformUtils-win32.cc
blob: 61382ddd7a0873b4dd0c8a3b54176d9c88309420 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "PlatformUtils.h"
#include <windows.h>
#include <shlobj.h>

std::string PlatformUtils::documentsPath()
{
	std::string retval;
	CHAR my_documents[MAX_PATH];
	HRESULT result = SHGetFolderPath(NULL, CSIDL_MYDOCUMENTS, NULL, 
																	 SHGFP_TYPE_CURRENT, my_documents);
	
	if (result != S_OK) retval = "";
	else retval = my_documents;
	return retval;
}
contact: Jan Huwald // Impressum