#include "StdAfx.h" #include "Utils.h" #include "CalendarGuids.h" using namespace ATL; ///////////////////////////////////////////////////////////////////////////// // const LPCTSTR APP_DIR_NAME = TEXT("Calendar"); //////////////////////////////////////////////////////////////////////////////// // bool IsVistaOrHigher() { const DWORD dwVersion = ::GetVersion(); const DWORD dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion))); return dwMajorVersion >= 6; // Vista or higher } BOOL MakeSettingsFilename(CPath& pathFilename, BOOL bCreateDir) { TCHAR sz[MAX_PATH] = { TEXT('\0') }; BOOL bRes = ::SHGetSpecialFolderPath(NULL, sz, CSIDL_APPDATA, bCreateDir); ATLASSERT(bRes); if(!bRes) return FALSE; pathFilename.Combine(sz, APP_DIR_NAME); CPath pathBasename(APP_DIR_NAME); pathBasename.RenameExtension(TEXT(".ini")); pathFilename.Append(pathBasename); return TRUE; } ////////////////////////////////////////////////////////////////////////////////
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)