Changeset 1845 for trunk/dll/wrappers.h


Ignore:
Timestamp:
Aug 12, 2015, 9:54:49 PM (10 years ago)
Author:
John Small
Message:

Ticket #524: Ensure no "highmem-unsafe" functions are called directly
1) New functions have been added
2) Code for unsafe-but-not-yet-used-by-FM/2 has been added in an

"#if 0" block in wrappers.c for quick implementation should FM/2 start to use them.
Among these. xDosOpenL and xWinUpper still need work. The rest are ready for use.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/wrappers.h

    r1839 r1845  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2008, 2015 Steven H. Levine
     9  Copyright (c) 2008 Steven H. Levine
    1010
    1111  08 Dec 08 SHL Add missing OS2_INCLUDED check
     
    1313  26 Aug 11 GKY Add a low mem version of xDosAlloc* wrappers; move error checking into all the
    1414                xDosAlloc* wrappers.
    15   09 Aug 15 SHL Add xDosGetInfoBlocks
     15  12 Aug 15 JBS Ticket #524: Ensure no "highmem-unsafe" functions are called directly
     16                1) New functions have been added
     17                2) Code for unsafe-but-not-yet-used-by-FM/2 has been added in an
     18                   "#if 0" block in wrappers.c for quick implementation should FM/2 start to use them.
     19                   Among these. xDosOpenL and xWinUpper still need work. The rest are ready for use.
    1620
    1721***********************************************************************/
     
    2428#endif
    2529
    26 APIRET xDosQueryAppType(PCSZ pszName, PULONG pFlags);
     30// Functions wrapped because they are not safe with high memory addresses
    2731
    28 APIRET xDosAllocSharedMem(PPVOID ppb,
    29                           PSZ pszName,
    30                           ULONG cb,
    31                           PCSZ pszSrcFile,
    32                           UINT uiLineNumber);
     32APIRET xDosDupHandle(HFILE hFile,
     33                     PHFILE phFile);
     34
     35APIRET xDosForceDelete(PSZ pszFileName);
     36
     37APIRET xDosQueryHType(HFILE hFile,
     38                      PULONG pulType,
     39                      PULONG pulAttr);
     40
     41APIRET xDosQueryAppType(PCSZ pszName,
     42                        PULONG pFlags);
     43
     44#ifdef INCL_DOSSESMGR
     45APIRET xDosStartSession(PSTARTDATA psd,
     46                        PULONG pulSessionID,
     47                        PPID ppid);
     48#endif
     49
     50// Functions wrapped for other reasons
    3351
    3452APIRET xDosAllocMem(PPVOID ppb,
     
    4260                       UINT uiLineNumber);
    4361
     62APIRET xDosAllocSharedMem(PPVOID ppb,
     63                          PSZ pszName,
     64                          ULONG cb,
     65                          PCSZ pszSrcFile,
     66                          UINT uiLineNumber);
     67
    4468APIRET xDosFindFirst(PSZ pszFileSpec,
    4569                     PHDIR phdir,
    46                      ULONG flAttribute,
    47                      PVOID pfindbuf,
    48                      ULONG cbBuf,
     70                     ULONG  flAttribute,
     71                     PVOID  pfindbuf,
     72                     ULONG  cbBuf,
    4973                     PULONG pcFileNames,
    50                      ULONG ulInfoLevel);
    51 APIRET xDosFindNext(HDIR hDir,
    52                     PVOID pfindbuf,
    53                     ULONG cbfindbuf,
     74                     ULONG  ulInfoLevel);
     75
     76APIRET xDosFindNext(HDIR   hDir,
     77                    PVOID  pfindbuf,
     78                    ULONG  cbfindbuf,
    5479                    PULONG pcFilenames,
    55                     ULONG ulInfoLevel); // 06 Oct 07 SHL Added
     80                    ULONG  ulInfoLevel);        // 06 Oct 07 SHL Added
    5681
    57 #ifdef INCL_DOSPROCESS  // // PPIB PTIB
     82#ifdef INCL_DOSPROCESS  // // PPIB PTIB
    5883APIRET xDosGetInfoBlocks(PTIB *pptib,
    59                          PPIB *pppib);  // 2015-08-09 SHL added
     84                         PPIB *pppib);  // 2015-08-09 SHL added
    6085#endif
    6186
    62 APIRET xDosSetPathInfo(PSZ pszPathName,
     87APIRET xDosSetPathInfo(PSZ   pszPathName,
    6388                       ULONG ulInfoLevel,
    6489                       PVOID pInfoBuf,
    6590                       ULONG cbInfoBuf,
    6691                       ULONG flOptions);
     92
    6793PSZ xfgets(PSZ pszBuf, size_t cMaxBytes, FILE * fp, PCSZ pszSrcFile,
    6894           UINT uiLineNumber);
     
    79105PVOID xstrdup(PCSZ pszIn, PCSZ pszSrcFile, UINT uiLineNumber);
    80106
     107#define HIGH_MEMORY_ADDRESS(p) (((ULONG)p) >= (512*1024*1024))
     108
    81109// Data declarations
    82110extern BOOL fNoLargeFileSupport;
    83111
     112
    84113#endif // WRAPPERS_H
Note: See TracChangeset for help on using the changeset viewer.