OS/2 File Manager API Differences

The following describes the implementation differences between the OS2Linux library and the real OS/2 File Manager APIs.

These APIs are included in your application by including the following definition in your application source file.

#define INCL_DOSFILEMGR

DosOpen

APIRET APIENTRY DosOpen(PSZ pszFileName, PHFILE pHf, PULONG pulAction,
                        ULONG cbFile, ULONG ulAttribute, ULONG fsOpenFlags,
                        ULONG fsOpenMode, PEAOP2 peaop2);

DosClose

APIRET APIENTRY DosClose(HFILE hFile);

DosRead

APIRET APIENTRY DosRead(HFILE hFile, PVOID pBuffer, ULONG cbRead,
                        PULONG pcbActual);

DosWrite

APIRET APIENTRY DosWrite(HFILE hFile, PVOID pBuffer, ULONG cbWrite,
                         PULONG pcbActual);

DosDelete

APIRET APIENTRY DosDelete(PSZ pszFile);

DosForceDelete

APIRET APIENTRY DosForceDelete(PSZ pszFile);

DosDupHandle

APIRET APIENTRY DosDupHandle(HFILE hFile, PHFILE pHfile);

DosQueryFHState

APIRET APIENTRY DosQueryFHState(HFILE hFile, PULONG pMode);

DosSetFHState

APIRET APIENTRY DosSetFHState(HFILE hFile, ULONG mode);

DosQueryHType

APIRET APIENTRY DosQueryHType(HFILE hFile, PULONG pType, PULONG pAttr);

DosFindFirst

APIRET APIENTRY DosFindFirst(PSZ pszFileSpec, PHDIR phdir, ULONG flAttribute,
                             PVOID pfindbuf, ULONG cbBuf, PULONG pcFileNames,
                             ULONG ulInfoLevel);

DosFindNext

APIRET APIENTRY DosFindNext(HDIR hDir, PVOID pfindbuf, ULONG cbfindbuf,
                            PULONG pcFilenames);

DosFindClose

APIRET APIENTRY DosFindClose(HDIR hDir);

DosFSAttach

APIRET APIENTRY DosFSAttach(PSZ pszDevice, PSZ pszFilesystem, PVOID pData,
                            ULONG cbData, ULONG flag);

DosQueryFSAttach

APIRET APIENTRY DosQueryFSAttach(PSZ pszDeviceName, ULONG ulOrdinal,
                                 ULONG ulFSAInfoLevel, PFSQBUFFER2 pfsqb,
                                 PULONG pcbBuffLength);

DosFSCtl

APIRET APIENTRY DosFSCtl(PVOID pData, ULONG cbData, PULONG pcbData,
                         PVOID pParms, ULONG cbParms, PULONG pcbParms,
                         ULONG function, PSZ pszRoute, HFILE hFile,
                         ULONG method);

DosSetFileSize

APIRET APIENTRY DosSetFileSize(HFILE hFile, ULONG cbSize);

DosResetBuffer

APIRET APIENTRY DosResetBuffer(HFILE hFile);

DosSetFilePtr

APIRET APIENTRY DosSetFilePtr(HFILE hFile, LONG ib, ULONG method,
                              PULONG ibActual);

DosMove

APIRET APIENTRY DosMove(PSZ pszOld, PSZ pszNew);

DosCopy

APIRET APIENTRY DosCopy(PSZ pszOld, PSZ pszNew, ULONG option);

DosEditName

APIRET APIENTRY DosEditName(ULONG metalevel, PSZ pszSource, PSZ pszEdit,
                            PBYTE pszTarget, ULONG cbTarget);

DosCreateDir

APIRET APIENTRY DosCreateDir(PSZ pszDirName, PEAOP2 peaop2);

DosDeleteDir

APIRET APIENTRY DosDeleteDir(PSZ pszDir);

DosSetDefaultDisk

APIRET APIENTRY DosSetDefaultDisk(ULONG disknum);

DosQueryCurrentDisk

APIRET APIENTRY DosQueryCurrentDisk(PULONG pdisknum, PULONG plogical);

DosSetCurrentDir

APIRET APIENTRY DosSetCurrentDir(PSZ pszDir);

DosQueryCurrentDir

APIRET APIENTRY DosQueryCurrentDir(ULONG disknum, PBYTE pBuf, PULONG pcbBuf);

DosQueryFSInfo

APIRET APIENTRY DosQueryFSInfo(ULONG disknum, ULONG infolevel, PVOID pBuf,
                               ULONG cbBuf);

DosSetFSInfo

APIRET APIENTRY DosSetFSInfo(ULONG disknum, ULONG infolevel, PVOID pBuf,
                             ULONG cbBuf);

DosQueryVerify

APIRET APIENTRY DosQueryVerify(PBOOL32 pBool);

DosSetVerify

APIRET APIENTRY DosSetVerify(BOOL32 verify);

DosSetMaxFH

APIRET APIENTRY DosSetMaxFH(ULONG cFH);

DosSetRelMaxFH

APIRET APIENTRY DosSetRelMaxFH(PLONG pcbReqCount, PULONG pcbCurMaxFH);

DosQueryFileInfo

APIRET APIENTRY DosQueryFileInfo(HFILE hf, ULONG ulInfoLevel, PVOID pInfo,
                                 ULONG cbInfoBuf);

DosSetFileInfo

APIRET APIENTRY DosSetFileInfo(HFILE hf, ULONG ulInfoLevel, PVOID pInfoBuf,
                               ULONG cbInfoBuf);

DosQueryPathInfo

APIRET APIENTRY DosQueryPathInfo(PSZ pszPathName, ULONG ulInfoLevel,
                                 PVOID pInfo, ULONG cbInfoBuf);

DosSetPathInfo

APIRET APIENTRY DosSetPathInfo(PSZ pszPathName, ULONG ulInfoLevel,
                               PVOID pInfoBuf, ULONG cbInfoBuf, ULONG flOptions);

DosShutdown

APIRET APIENTRY DosShutdown(ULONG ulReserved);

DosEnumAttribute

APIRET APIENTRY DosEnumAttribute(ULONG ulRefType, PVOID pvFile, ULONG ulEntry,
                                 PVOID pvBuf, ULONG cbBuf, PULONG pulCount,
                                 ULONG ulInfoLevel);

DosSetFileLocks

APIRET APIENTRY DosSetFileLocks(HFILE hFile, PFILELOCK pflUnlock,
                                PFILELOCK pflLock, ULONG timeout, ULONG flags);

DosCancelLockRequest

APIRET APIENTRY DosCancelLockRequest(HFILE hFile, PFILELOCK pflLock);

DosProtectEnumAttribute

APIRET APIENTRY DosProtectEnumAttribute(ULONG ulRefType, PVOID pvFile,
                                        ULONG ulEntry, PVOID pvBuf, ULONG cbBuf,
                                        PULONG pulCount, ULONG ulInfoLevel,
                                        FHLOCK fhFileHandleLockID );

DosProtectSetFileLocks

APIRET APIENTRY DosProtectSetFileLocks(HFILE hFile, PFILELOCK pflUnlock,
                                       PFILELOCK pflLock, ULONG timeout,
                                       ULONG flags, FHLOCK fhFileHandleLockID);

DosProtectOpen

APIRET APIENTRY DosProtectOpen(PSZ pszFileName, PHFILE phf, PULONG pulAction,
                               ULONG cbFile, ULONG ulAttribute,
                               ULONG fsOpenFlags, ULONG fsOpenMode,
                               PEAOP2 peaop2, PFHLOCK pfhFileHandleLockID);

DosProtectClose

APIRET APIENTRY DosProtectClose(HFILE hFile, FHLOCK fhFileHandleLockID);

DosProtectRead

APIRET APIENTRY DosProtectRead(HFILE hFile, PVOID pBuffer, ULONG cbRead,
                               PULONG pcbActual, FHLOCK fhFileHandleLockID);

DosProtectWrite

APIRET APIENTRY  DosProtectWrite(HFILE hFile, PVOID pBuffer, ULONG cbWrite,
                                 PULONG pcbActual, FHLOCK fhFileHandleLockID);

DosProtectQueryFHState

APIRET APIENTRY DosProtectQueryFHState(HFILE hFile, PULONG pMode,
                                       FHLOCK fhFileHandleLockID);

DosProtectSetFHState

APIRET APIENTRY DosProtectSetFHState(HFILE hFile, ULONG mode,
                                     FHLOCK fhFileHandleLockID);

DosProtectSetFileSize

APIRET APIENTRY DosProtectSetFileSize(HFILE hFile, ULONG cbSize,
                                      FHLOCK fhFileHandleLockID);

DosProtectSetFilePtr

APIRET APIENTRY DosProtectSetFilePtr(HFILE hFile, LONG ib, ULONG method,
                                     PULONG ibActual, FHLOCK fhFileHandleLockID);

DosProtectQueryFileInfo

APIRET APIENTRY DosProtectQueryFileInfo(HFILE hf, ULONG ulInfoLevel,
                                        PVOID pInfo, ULONG cbInfoBuf,
                                        FHLOCK fhFileHandleLockID);

DosProtectSetFileInfoo

APIRET APIENTRY DosProtectSetFileInfo(HFILE hf, ULONG ulInfoLevel,
                                      PVOID pInfoBuf, ULONG cbInfoBuf,
                                      FHLOCK fhFileHandleLockID);