Changeset 1439 for trunk/dll/wrappers.c


Ignore:
Timestamp:
Jul 12, 2009, 11:57:04 PM (16 years ago)
Author:
Gregg Young
Message:

Changes to allow high mem loading of dll; Refactor .LONGNAME and .SUBJECT EA fetch to FetchCommonEAs. Add szFSType to FillInRecordFromFSA use to bypass EA scan and size formatting for tree container; Fix labels/FS type to work on scan on NOPRESCAN Drives; Fixed dbl directory names on restore of dir cnrs; (Tickets 47, 339, 363, 368, 369, 370)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/wrappers.c

    r1438 r1439  
    1717  25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis
    1818  17 Jun 09 SHL Correct missing rc set
     19  12 Jul 09 GKY Add xDosQueryAppType and xDoxAlloc... to allow FM/2 to load in high memory
    1920
    2021***********************************************************************/
     
    4546#include "info.h"                       // driveflags
    4647#include "notebook.h"                   // fVerify
     48#include "pathutil.h"                   // MaxComLineStrg
    4749
    4850// Data definitions
     
    5153#pragma data_seg(GLOBAL1)
    5254BOOL fNoLargeFileSupport;
     55
     56APIRET xDosQueryAppType(PCSZ pszName, PULONG pFlags)
     57{
     58  APIRET rc;
     59# ifdef HIMEM
     60  char *pszPgm;
     61
     62  rc = DosAllocMem((PVOID)&pszPgm,
     63                   MaxComLineStrg,
     64                   PAG_COMMIT | PAG_READ | PAG_WRITE);
     65  if (rc) {
     66    Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile,
     67              __LINE__, GetPString(IDS_OUTOFMEMORY));
     68    return -1;
     69  }
     70  strcpy(pszPgm, pszName);
     71  rc = DosQueryAppType(pszPgm, pFlags);
     72  DosFreeMem(pszPgm);
     73  return rc;
     74# else
     75  rc = DosQueryAppType(pszName, pFlags);
     76  return rc;
     77# endif
     78}
    5379
    5480APIRET xDosAllocSharedMem(PPVOID ppb,
     
    6086
    6187  rc = DosAllocSharedMem(ppb, pszName, cb, flag | OBJ_ANY);
    62   DbgMsg(pszSrcFile, __LINE__, "ppb %p", *ppb);
     88  //DbgMsg(pszSrcFile, __LINE__, "ppb %p", *ppb);
    6389  if (rc)
    6490    rc = DosAllocSharedMem(ppb, pszName, cb, flag);
     
    6894APIRET xDosAllocMem(PPVOID ppb,
    6995                    ULONG cb,
    70                     ULONG flag)
     96                    ULONG flag,
     97                    PCSZ pszSrcFile,
     98                    UINT uiLineNumber)
    7199{
    72100  APIRET rc;
    73101
    74102  rc = DosAllocMem(ppb, cb, flag | OBJ_ANY);
    75   DbgMsg(pszSrcFile, __LINE__, "ppb %p %x", *ppb, rc);
     103  //DbgMsg(pszSrcFile, uiLineNumber, "ppb %p %x", *ppb, rc);
    76104  if (rc)
    77105    rc = DosAllocMem(ppb, cb, flag);
    78   DbgMsg(pszSrcFile, __LINE__, "ppb %p", *ppb);
     106  //DbgMsg(pszSrcFile, uiLineNumber, "ppb %p", *ppb);
    79107  return rc;
    80108}
Note: See TracChangeset for help on using the changeset viewer.