Changeset 1449 for trunk/dll/errutil.c
- Timestamp:
- Jul 26, 2009, 10:00:52 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/errutil.c
r1447 r1449 33 33 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook. 34 34 08 Mar 09 GKY Remove Dos_Error2 (unused) and Runtime_Error2 (no advantage over using Runtime_Error) 35 23 Jul 09 GKY Bypass DosGetMessage for HIMEM builds (it traps) 35 23 Jul 09 GKY Add low mem buffers for the msg file name so DosGetMessage 36 works in HIMEM builds 36 37 37 38 ***********************************************************************/ … … 118 119 { 119 120 CHAR szMsg[4096]; 121 CHAR *szMsgFile, *szMsgFileH; 120 122 ULONG Class; // Error class 121 123 ULONG action; // Error action 122 ULONG Locus; // Error location 123 #ifndef HIMEM 124 ULONG Locus; // Error location 124 125 ULONG ulMsgLen; 125 126 CHAR *pszMsgStart; 126 127 CHAR *psz; 127 #endif128 128 va_list va; 129 129 … … 131 131 return MBID_ENTER; // Should not have been called 132 132 133 //Allocate low memory for DosGetMessage (16 bit) 134 DosAllocMem((PVOID) &szMsgFile, CCHMAXPATH, 135 PAG_COMMIT | PAG_READ | PAG_WRITE); 136 DosAllocMem((PVOID) &szMsgFileH, CCHMAXPATH, 137 PAG_COMMIT | PAG_READ | PAG_WRITE); 133 138 // Format caller's message 134 139 va_start(va, pszFmt); … … 157 162 GetPString(IDS_ERRACTION1TEXT + (action - 1)), 158 163 GetPString(IDS_ERRLOCUS1TEXT + (Locus - 1))); 159 #ifndef HIMEM160 164 pszMsgStart = szMsg + strlen(szMsg) + 1; 165 strcpy(szMsgFile, "OSO001.MSG"); 166 strcpy(szMsgFileH, "OSO001H.MSG"); 161 167 // Get message leaving space for NL separator 162 if (!DosGetMessage(NULL, 0L, (PCHAR) pszMsgStart + 1, 1024, ulRC, "OSO001.MSG", &ulMsgLen)168 if (!DosGetMessage(NULL, 0L, (PCHAR) pszMsgStart + 1, 1024, ulRC, szMsgFile, &ulMsgLen) 163 169 || !DosGetMessage(NULL, 0L, (PCHAR) pszMsgStart + 1, 1024, ulRC, 164 "OSO001H.MSG", &ulMsgLen)) { 170 szMsgFileH, &ulMsgLen)) { 171 DosFreeMem(szMsgFile); 172 DosFreeMem(szMsgFileH); 165 173 // Got message 166 174 pszMsgStart[ulMsgLen + 1] = 0; // Terminate … … 188 196 } 189 197 } 190 #endif191 198 192 199 return showMsg(mb_type | MB_ICONEXCLAMATION, hwndOwner, GetPString(IDS_DOSERR2TEXT),
Note:
See TracChangeset
for help on using the changeset viewer.