Changeset 1839
- Timestamp:
- Aug 12, 2015, 6:49:46 AM (10 years ago)
- Location:
- trunk/dll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/wrappers.c
r1639 r1839 6 6 Wrappers with error checking 7 7 8 Copyright (c) 2006, 20 08Steven H.Levine8 Copyright (c) 2006, 2015 Steven H.Levine 9 9 10 10 22 Jul 06 SHL Baseline … … 20 20 15 Nov 09 GKY Rework xDosQueryAppType to remove HIMEM ifdefs 21 21 26 Aug 11 GKY Add a low mem version of xDosAlloc* wrappers; move error checking into all the 22 22 xDosAlloc* wrappers. 23 23 09 Oct 11 GKY Modify xfsopen so it doesn't fail when called with r+ because the file doesn't exist. 24 We should be creating the file unless it is set to fail silently. 24 We should be creating the file unless it is set to fail silently. 25 09 Aug 15 SHL Add xDosGetInfoBlocks 25 26 26 27 ***********************************************************************/ … … 77 78 78 79 APIRET xDosAllocSharedMem(PPVOID ppb, 79 80 81 82 80 PSZ pszName, 81 ULONG cb, 82 PCSZ pszSrcFile, 83 UINT uiLineNumber) 83 84 { 84 85 APIRET rc; ; 85 86 86 87 rc = DosAllocSharedMem(ppb, pszName, cb, 87 88 PAG_COMMIT | OBJ_GIVEABLE | PAG_READ | PAG_WRITE | OBJ_ANY); 88 89 //DbgMsg(pszSrcFile, __LINE__, "ppb %p", *ppb); 89 90 if (rc) … … 102 103 103 104 APIRET xDosAllocMem(PPVOID ppb, 104 105 106 105 ULONG cb, 106 PCSZ pszSrcFile, 107 UINT uiLineNumber) 107 108 { 108 109 APIRET rc; … … 127 128 128 129 APIRET xDosAllocMemLow(PPVOID ppb, 129 130 131 130 ULONG cb, 131 PCSZ pszSrcFile, 132 UINT uiLineNumber) 132 133 { 133 134 APIRET rc; … … 138 139 //DbgMsg(pszSrcFile, uiLineNumber, "ppb %p", *ppb); 139 140 return rc; 141 } 142 143 APIRET xDosGetInfoBlocks(PTIB *pptib, 144 PPIB *pppib) 145 { 146 APIRET apiret = DosGetInfoBlocks(pptib, pppib); 147 148 if (apiret) { 149 Dos_Error(MB_CANCEL, apiret, HWND_DESKTOP, pszSrcFile, __LINE__, 150 PCSZ_DOSGETINFOBLOCKS); 151 *pppib = 0; 152 *pptib = 0; 153 } 154 return apiret; 140 155 } 141 156 … … 319 334 APIRET rc; 320 335 BOOL crosses = ((ULONG)pInfoBuf ^ 321 336 ((ULONG)pInfoBuf + cbInfoBuf - 1)) & ~0xffff; 322 337 BOOL fResetVerify = FALSE; 323 338 … … 328 343 switch (ulInfoLevel) { 329 344 case FIL_STANDARD: 330 345 if (crosses) { 331 346 fs3 = *(PFILESTATUS3)pInfoBuf; // Copy to buffer that does not cross 64K boundary 332 333 334 335 347 rc = DosSetPathInfo(pszPathName, ulInfoLevel, &fs3, cbInfoBuf, flOptions); 348 } 349 else 350 rc = DosSetPathInfo(pszPathName, ulInfoLevel, pInfoBuf, cbInfoBuf, flOptions); 336 351 break; 337 352 … … 372 387 eaop2 = *(PEAOP2)pInfoBuf; // Copy to buffer that does not cross 373 388 rc = DosSetPathInfo(pszPathName, ulInfoLevel, &eaop2, sizeof(eaop2), flOptions); 374 375 389 } 390 break; 376 391 default: 377 392 Runtime_Error(pszSrcFile, __LINE__, "ulInfoLevel %u unexpected", ulInfoLevel); … … 448 463 449 464 FILE *xfsopen(PCSZ pszFileName, PCSZ pszMode, INT fSharemode, PCSZ pszSrcFile, 450 465 UINT uiLineNumber, BOOL fSilent) 451 466 { 452 467 CHAR FileName[CCHMAXPATH]; -
trunk/dll/wrappers.h
r1628 r1839 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2008 Steven H. Levine9 Copyright (c) 2008, 2015 Steven H. Levine 10 10 11 11 08 Dec 08 SHL Add missing OS2_INCLUDED check 12 12 12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory 13 13 26 Aug 11 GKY Add a low mem version of xDosAlloc* wrappers; move error checking into all the 14 xDosAlloc* wrappers. 14 xDosAlloc* wrappers. 15 09 Aug 15 SHL Add xDosGetInfoBlocks 15 16 16 17 ***********************************************************************/ … … 26 27 27 28 APIRET xDosAllocSharedMem(PPVOID ppb, 28 29 30 31 29 PSZ pszName, 30 ULONG cb, 31 PCSZ pszSrcFile, 32 UINT uiLineNumber); 32 33 33 34 APIRET xDosAllocMem(PPVOID ppb, 34 35 36 35 ULONG cb, 36 PCSZ pszSrcFile, 37 UINT uiLineNumber); 37 38 38 39 APIRET xDosAllocMemLow(PPVOID ppb, 39 40 41 40 ULONG cb, 41 PCSZ pszSrcFile, 42 UINT uiLineNumber); 42 43 43 44 APIRET xDosFindFirst(PSZ pszFileSpec, 44 45 PHDIR phdir, 45 ULONG 46 PVOID 47 ULONG 46 ULONG flAttribute, 47 PVOID pfindbuf, 48 ULONG cbBuf, 48 49 PULONG pcFileNames, 49 ULONG 50 APIRET xDosFindNext(HDIR 51 PVOID 52 ULONG 50 ULONG ulInfoLevel); 51 APIRET xDosFindNext(HDIR hDir, 52 PVOID pfindbuf, 53 ULONG cbfindbuf, 53 54 PULONG pcFilenames, 54 ULONG ulInfoLevel); // 06 Oct 07 SHL Added 55 APIRET xDosSetPathInfo(PSZ pszPathName, 55 ULONG ulInfoLevel); // 06 Oct 07 SHL Added 56 57 #ifdef INCL_DOSPROCESS // // PPIB PTIB 58 APIRET xDosGetInfoBlocks(PTIB *pptib, 59 PPIB *pppib); // 2015-08-09 SHL added 60 #endif 61 62 APIRET xDosSetPathInfo(PSZ pszPathName, 56 63 ULONG ulInfoLevel, 57 64 PVOID pInfoBuf,
Note:
See TracChangeset
for help on using the changeset viewer.