Changeset 153
- Timestamp:
- 3/9/2008 9:01:26 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
Eraser.cpp (modified) (2 diffs)
-
EraserDoc.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Eraser.cpp
r56 r153 112 112 // end the execution of this instance. 113 113 114 #ifndef ERASER_STANDALONE 114 115 { 115 116 char temp[512]; … … 131 132 } 132 133 } 133 // no_registry = true; 134 #else 135 no_registry = true; 136 #endif 137 134 138 if (no_registry) { 135 139 char temp[512]; -
trunk/EraserDoc.cpp
r107 r153 136 136 { 137 137 // Create the Application Data path to store the Default ers file 138 #ifndef ERASER_STANDALONE 138 139 if (!SUCCEEDED(SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, m_strAppDataPath.GetBuffer(MAX_PATH)))) 139 140 AfxMessageBox("Could not determine path to Application Data", MB_ICONERROR); 140 141 m_strAppDataPath.ReleaseBuffer(); 141 142 CreateDirectory((m_strAppDataPath += "\\") += szAppDataPath, NULL); 143 #else 144 TCHAR moduleName[MAX_PATH]; 145 SetLastError(0); 146 DWORD charsWritten = GetModuleFileName(AfxGetInstanceHandle(), moduleName, MAX_PATH); 147 if (!charsWritten || GetLastError() != 0) 148 AfxMessageBox("Could not determine path to Application Data", MB_ICONERROR); 149 150 TCHAR drive[5]; 151 TCHAR dir[MAX_PATH]; 152 TCHAR ext[MAX_PATH]; 153 TCHAR filename[MAX_PATH]; 154 _splitpath(moduleName, drive, dir, filename, ext); 155 m_strAppDataPath = drive; 156 m_strAppDataPath += dir; 157 #endif 142 158 143 159 // read preferences
Note: See TracChangeset
for help on using the changeset viewer.
