Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

546 lines
20 KiB

  1. /*****************************************************************************
  2. * *
  3. * IMVFS.H *
  4. * *
  5. * *
  6. * Copyright (C) Microsoft Corporation 1990 - 1994. *
  7. * All Rights reserved. *
  8. * *
  9. ******************************************************************************
  10. * *
  11. * Module intent *
  12. * *
  13. * Declares all privately available MVFS.DLL routines *
  14. * *
  15. ******************************************************************************
  16. * *
  17. * Current Owner: BINHN *
  18. * *
  19. *****************************************************************************/
  20. #ifndef __IMVFS_H__
  21. #define __IMVFS_H__
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #pragma pack(1) // avoid problems when Zp!=1
  26. // requires windows.h, mvopsys.h, misc.h, orkin.h
  27. #include <fileoff.h>
  28. typedef USHORT RC; // for those not coming via HELP.H
  29. /*****************************************************************************
  30. *
  31. * File Moniker
  32. *
  33. *****************************************************************************/
  34. #define fmNil ((FM)0)
  35. #define qafmNil ((QAFM)0)
  36. /*
  37. When creating an FM (in other WORDs, specifying the location of a new
  38. or extant file), the caller must specify the directory in which that file
  39. is located. There are a finite number of directories available to Help.
  40. These are:
  41. */
  42. #define dirNil 0x0000 // No directory specified
  43. #define dirCurrent 0x0001 // Whatever the OS thinks the current dir. is
  44. #define dirTemp 0x0002 // The directory temporary files are created in
  45. #define dirHelp 0x0004 // Wherever the Help Application lives
  46. #define dirSystem 0x0008 // The Windows and Windows System directories
  47. #define dirPath 0x0010 // Searches the $PATH
  48. // (includes Current dir and System dirs)
  49. #define dirAll 0xFFFF // Search all directories, in the above order
  50. #define dirFirst dirCurrent // The lowest bit that can be set
  51. #define dirLast dirPath // The highest bit that can be set
  52. /*
  53. To specify which parts of a full filename you want to extract, add
  54. (logical or) the following part codes:
  55. */
  56. #define partNone 0x0000 // return nothing
  57. #define partDrive 0x0001 // D: Vol
  58. #define partDir 0x0002 // dir\dir\ :dir:dir:
  59. #define partBase 0x0004 // basename filename
  60. #define partExt 0x0008 // ext <usu. nothing>
  61. #define partAll 0xFFFF
  62. // Get from stdlib.h
  63. #if !defined(_M_MPPC) && !defined(_M_M68K)
  64. #define _MAX_PATH 260 /* max. length of full pathname */
  65. #else /* ndef defined(_M_M68K) || defined(_M_MPPC) */
  66. #define _MAX_PATH 256 /* max. length of full pathname */
  67. #endif /* defined(_M_M68K) || defined(_M_MPPC) */
  68. /*
  69. max. string lengths of file names
  70. */
  71. #define cchMaxPath _MAX_PATH // = _MAX_PATH in <stdlib.h>
  72. typedef HANDLE HFS;
  73. typedef short HF;
  74. /*
  75. An FM is a magic cookie which refers to some structure describing the
  76. location of a file, including the volume/drive, path, and filename.
  77. */
  78. typedef struct {
  79. char rgch[cchMaxPath]; // Fully canonicalized pathname
  80. } AFM; // RAllocation of FMS
  81. typedef AFM FAR *QAFM;
  82. typedef LPSTR FM; // An FM is now just a string, allocated through
  83. // the NewMemory()/DisposeMemory() API
  84. typedef USHORT DIR; // Help directory flag
  85. #define FValidFm(fm) ((fm)!=fmNil)
  86. /*** MATTSMI 2/5/92 -- ADDED FROM DOS VERSION OF THIS HEADER TO SUPPORT WMVC ***/
  87. #define VerifyFm(fm) // assert(fm == fmNil || FCheckGh((HANDLE) fm))
  88. // VerifyFm(fm) not needed for FM being LPSTR
  89. FM EXPORT_API FAR PASCAL FmNewSzDir (LPSTR, DIR, LPVOID);
  90. FM EXPORT_API PASCAL FAR FmNew(LPSTR, LPVOID);
  91. FM EXPORT_API FAR PASCAL FmNewExistSzDir (LPSTR, DIR, LPVOID);
  92. FM EXPORT_API FAR PASCAL FmNewExistSzIni (LPSTR, LPSTR, LPSTR, LPVOID);
  93. FM EXPORT_API FAR PASCAL FmNewTemp (LPSTR, LPVOID);
  94. FM EXPORT_API FAR PASCAL FmNewSameDirFmSz (FM, LPSTR, LPVOID);
  95. VOID EXPORT_API FAR PASCAL DisposeFm (FM);
  96. FM EXPORT_API FAR PASCAL FmCopyFm(FM, LPVOID);
  97. BOOL EXPORT_API FAR PASCAL FExistFm(FM);
  98. int EXPORT_API FAR PASCAL CbPartsFm(FM, int);
  99. LPSTR EXPORT_API FAR PASCAL SzPartsFm(FM, LPSTR, int, int);
  100. BOOL EXPORT_API FAR PASCAL FSameFmFm (FM, FM);
  101. /*****************************************************************************
  102. *
  103. * FIDs - file access (fid.c)
  104. *
  105. *****************************************************************************/
  106. #define wRead 0x0001
  107. #define wWrite 0x0002
  108. #define wReadOnly wRead
  109. #define wReadWrite (wRead | wWrite)
  110. #define wRWMask (wRead | wWrite)
  111. #define wShareRead 0x0004
  112. #define wShareWrite 0x0008
  113. #define wShareAll (wShareRead | wShareWrite)
  114. #define wShareNone 0x000
  115. #define wShareMask (wShareRead | wShareWrite)
  116. #define wShareShift 2
  117. #define wSeekSet 0 /* SEEK_SET from stdio.h */
  118. #define wSeekCur 1 /* SEEK_CUR from stdio.h */
  119. #define wSeekEnd 2 /* SEEK_END from stdio.h */
  120. #ifdef _WIN32
  121. typedef HANDLE FID;
  122. #define fidNil INVALID_HANDLE_VALUE
  123. #else
  124. typedef HFILE FID;
  125. #define fidNil HFILE_ERROR
  126. #endif
  127. FID EXPORT_API FAR PASCAL FidCreateFm(FM fm, WORD wOpenMode, WORD wPerm,
  128. LPVOID);
  129. FID EXPORT_API FAR PASCAL FidOpenFm(FM fm, WORD wOpenMode,
  130. LPVOID);
  131. BOOL EXPORT_API FAR PASCAL FidFlush(FID fid);
  132. #define FUnlinkFm(fm) ((BOOL)(RcUnlinkFm(fm)==ERR_SUCCESS))
  133. RC EXPORT_API FAR PASCAL RcUnlinkFm(FM);
  134. LONG EXPORT_API FAR PASCAL LcbReadFid(FID, LPVOID, LONG, LPVOID);
  135. #define FCloseFid(fid) ((BOOL)(RcCloseFid((int)fid) == ERR_SUCCESS))
  136. RC EXPORT_API FAR PASCAL RcCloseFid(FID);
  137. LONG EXPORT_API FAR PASCAL LcbWriteFid(FID, LPVOID, LONG, LPVOID);
  138. LONG EXPORT_API FAR PASCAL LTellFid(FID, LPVOID);
  139. LONG EXPORT_API FAR PASCAL LSeekFid(FID, LONG, WORD, LPVOID);
  140. FILEOFFSET EXPORT_API FAR PASCAL FoSeekFid(FID, FILEOFFSET, WORD, LPERRB);
  141. int EXPORT_API PASCAL FAR FEofFid(FID);
  142. #define FChSizeFid(fid, lcb) (RcChSizeFid ((fid), (lcb)) == 0)
  143. RC EXPORT_API PASCAL FAR RcChSizeFid(FID, LONG);
  144. BOOL EXPORT_API PASCAL FAR FDriveOk(LPSTR);
  145. /*****************************************************************************
  146. *
  147. * BTREE api
  148. *
  149. *****************************************************************************/
  150. #define bBtreeVersionBonehead 0 /* fixed size key, array */
  151. #define wBtreeMagic 0x293B /* magic number for btrees; a winky: ;) */
  152. #define bBtreeVersion 2 /* back to strcmp for 'z' keys */
  153. #define bkNil ((BK)-1)/* nil value for BK */
  154. #define wMaxFormat 15 /* length of format string */
  155. #define cbBtreeBlockDefault 8192 /* default btree block size */
  156. #define fFSDirty (BYTE)0x08 // file (FS) is dirty and needs writing
  157. /* key types */
  158. #define KT_SZI 'i'
  159. #define KT_SZDELMIN 'k' /* not supported */
  160. #define KT_SZMIN 'm' /* not supported */
  161. #define KT_SZDEL 'r' /* not supported */
  162. #define KT_ST 't' /* not supported */
  163. #define KT_SZ 'z'
  164. #define KT_VSTI 'V' // variable-byte prefixed Pascal string
  165. #define KT_STI 'I'
  166. #define KT_STDELMIN 'K' /* not supported */
  167. #define KT_LONG 'L'
  168. #define KT_STMIN 'M' /* not supported */
  169. #define KT_STDEL 'R' /* not supported */
  170. #define KT_SZISCAND 'S'
  171. #define KT_SZMAP 'P'
  172. #define FBtreeKeyTypeIsSz(c) ((c) == KT_SZ || (c) == KT_SZMAP || (c) == KT_SZI || \
  173. (c) == KT_SZISCAND)
  174. /*
  175. Btree record formats
  176. In addition to these #defines, '1'..'9', 'a'..'f' for fixed length
  177. keys & records of 1..15 bytes are accepted.
  178. */
  179. #define FMT_VNUM_FO 'O' // Variable byte offset or length
  180. #define FMT_BYTE_PREFIX 't'
  181. #define FMT_WORD_PREFIX 'T'
  182. #define FMT_SZ 'z'
  183. #define FBtreeRecordTypeIsSz(c) ((c) == FMT_SZ)
  184. /* elevator constants */
  185. #define btelevMax ((BT_ELEV)32767)
  186. #define btelevNil ((BT_ELEV)-1)
  187. typedef LONG KEY; /* btree key */
  188. typedef BYTE KT; /* key type */
  189. typedef HANDLE HBT; /* handle to a btree */
  190. typedef HANDLE HMAPBT; /* handle to a btree map */
  191. // @DOC INTERNAL
  192. // @struct BTREE_PARAMS | Btree parameters passed in for creation
  193. typedef struct _btree_params
  194. {
  195. HFS hfs; // @field File system that btree lives in
  196. int cbBlock; // @field Number of bytes in a btree block.
  197. // Key or Data cannot exceed 1/2 this amount.
  198. VOID FAR * qCharMapTable; // @field Character map table.
  199. BYTE bFlags; // @field HFOPEN_ flags (same as used in opening an hFile).
  200. char rgchFormat[wMaxFormat+1]; // @field Key and record format string.
  201. } BTREE_PARAMS;
  202. typedef DWORD BK; // btree block index - extended to DWORD, davej 12/95
  203. // @DOC INTERNAL
  204. // @struct BTPOS | Btree position structure.
  205. typedef struct
  206. {
  207. BK bk; // @field Block number.
  208. int cKey; // @field Which key in block (0 means first).
  209. int iKey; // @field Key's index db.rgbBlock (in bytes).
  210. } BTPOS, FAR *QBTPOS;
  211. typedef int BTELEV, FAR *QBTELEV; /* elevator location: 0 .. 32767 legal */
  212. HBT EXPORT_API FAR PASCAL HbtCreateBtreeSz(LPSTR, BTREE_PARAMS FAR *,
  213. LPVOID);
  214. RC EXPORT_API FAR PASCAL RcDestroyBtreeSz(LPSTR, HFS);
  215. HBT EXPORT_API FAR PASCAL HbtOpenBtreeSz (LPSTR, HFS, BYTE,
  216. VOID FAR*, LPVOID);
  217. RC EXPORT_API FAR PASCAL RcCloseBtreeHbt (HBT);
  218. RC EXPORT_API FAR PASCAL RcAbandonHbt (HBT);
  219. LPVOID EXPORT_API PASCAL FAR BtreeGetCMap (HANDLE);
  220. #if defined(_DEBUG)
  221. VOID EXPORT_API FAR PASCAL VerifyHbt (HBT);
  222. #else
  223. #define VerifyHbt(hbt)
  224. #endif //!def _DEBUG
  225. RC EXPORT_API FAR PASCAL RcLookupByPos (HBT, QBTPOS, KEY, int, LPVOID);
  226. RC EXPORT_API FAR PASCAL RcLookupByKeyAux(HBT, KEY, QBTPOS, LPVOID, BOOL);
  227. WORD EXPORT_API FAR PASCAL wGetNextNEntries(HBT, WORD wFlags, WORD wEntries, QBTPOS, LPVOID, LONG, LPERRB);
  228. // Flags for wGetNextNEntries
  229. #define GETNEXT_KEYS 1
  230. #define GETNEXT_RECS 2
  231. #define GETNEXT_RESET 4
  232. #define RcLookupByKey( hbt, key, qbtpos, qv) \
  233. RcLookupByKeyAux((hbt), (key), (qbtpos), (qv), FALSE)
  234. RC EXPORT_API FAR PASCAL RcFirstHbt (HBT, KEY, LPVOID, QBTPOS);
  235. RC EXPORT_API FAR PASCAL RcLastHbt (HBT, KEY, LPVOID, QBTPOS);
  236. RC EXPORT_API FAR PASCAL RcNextPos (HBT, QBTPOS, QBTPOS);
  237. RC EXPORT_API FAR PASCAL RcOffsetPos (HBT, QBTPOS, LONG, LPLONG, QBTPOS);
  238. #if defined(__DEBUG)
  239. #define FValidPos(qbtpos) \
  240. ((qbtpos) == NULL ? FALSE : (qbtpos)->bk != bkNil)
  241. #else /* !_DEBUG */
  242. #define FValidPos(qbtpos) ((qbtpos)->bk != bkNil)
  243. #endif /* !_DEBUG */
  244. // Callback passed to RcTraverseHbt
  245. typedef DWORD (FAR PASCAL *TRAVERSE_FUNC) (KEY key, BYTE FAR *rec, DWORD dwUser);
  246. #define TRAVERSE_DONE 0
  247. #define TRAVERSE_DELETE 1
  248. #define TRAVERSE_INTERRUPT 2
  249. RC EXPORT_API FAR PASCAL RcInsertHbt (HBT, KEY, LPVOID);
  250. RC EXPORT_API FAR PASCAL RcInsertMacBrsHbt(HBT, KEY, QV);
  251. RC EXPORT_API FAR PASCAL RcDeleteHbt (HBT, KEY);
  252. RC EXPORT_API FAR PASCAL RcUpdateHbt (HBT, KEY, LPVOID);
  253. RC EXPORT_API FAR PASCAL RcTraverseHbt (HBT, TRAVERSE_FUNC, DWORD);
  254. RC EXPORT_API FAR PASCAL RcPackHbt (HBT); /* >>>> unimplemented */
  255. RC EXPORT_API FAR PASCAL RcCheckHbt (HBT); /* >>>> unimplemented */
  256. RC EXPORT_API FAR PASCAL RcLeafBlockHbt (HBT, KEY, LPVOID); /* >>>> unimplemented */
  257. HBT EXPORT_API FAR PASCAL HbtInitFill (LPSTR, BTREE_PARAMS FAR *,
  258. LPVOID);
  259. RC EXPORT_API FAR PASCAL RcFillHbt (HBT, KEY, LPVOID);
  260. RC EXPORT_API FAR PASCAL RcFiniFillHbt (HBT);
  261. RC EXPORT_API FAR PASCAL RcFreeCacheHbt (HBT);
  262. RC EXPORT_API FAR PASCAL RcFlushHbt (HBT);
  263. RC EXPORT_API FAR PASCAL RcCloseOrFlushHbt(HBT, BOOL);
  264. RC EXPORT_API FAR PASCAL RcPos2Elev(HBT, QBTPOS, QBTELEV); /* >>>> unimplemented */
  265. RC FAR PASCAL RcElev2Pos(HBT, QBTELEV, QBTPOS); /* >>>> unimplemented */
  266. RC EXPORT_API FAR PASCAL RcGetBtreeInfo(HBT, LPBYTE, LPLONG, LPWORD);
  267. HF EXPORT_API PASCAL FAR HfOpenDiskBt(HFS, HBT, LPSTR, BYTE, LPVOID);
  268. /* Map utility functions */
  269. RC EXPORT_API FAR PASCAL RcCreateBTMapHfs(HFS, HBT, LPSTR);
  270. HMAPBT EXPORT_API FAR PASCAL HmapbtOpenHfs(HFS, LPSTR, LPVOID);
  271. RC EXPORT_API FAR PASCAL RcCloseHmapbt(HMAPBT);
  272. RC EXPORT_API FAR PASCAL RcIndexFromKeyHbt(HBT, HMAPBT, LPLONG, KEY);
  273. RC EXPORT_API FAR PASCAL RcKeyFromIndexHbt(HBT, HMAPBT, KEY, int, LONG);
  274. BOOL EXPORT_API FAR PASCAL FIsPrefix(HBT, KEY, KEY);
  275. VOID EXPORT_API FAR PASCAL BtreeSetCMap (HBT, LPVOID);
  276. VOID EXPORT_API FAR PASCAL BtreeSetLanguageFlag(HBT, int);
  277. VOID EXPORT_API FAR PASCAL BtreeSetSortFlag(HBT, int);
  278. /*****************************************************************************
  279. *
  280. * FS - file system (subfile.c, filesys.c)
  281. *
  282. *****************************************************************************/
  283. /* FS magic number */
  284. #define wFileSysMagic 0x5F3F // ?_ - the help icon (with shadow)
  285. //#define bFileSysVersion 2 // sorted free list
  286. /* Current FS version */
  287. #define bFileSysVersionOld (BYTE)3 // different sorting functions
  288. #define bFileSysVersion (BYTE)0x04 // M20 format quite different from M14
  289. /* flags for FlushHfs */
  290. #define fFSCloseFile (BYTE)0x01 // close fid associated with the FS
  291. #define fFSFreeBtreeCache (BYTE)0x02 // free the btree's cache
  292. /* seek origins */
  293. #define wFSSeekSet 0 // seek relative to start of file
  294. #define wFSSeekCur 1 // seek relative to current position
  295. #define wFSSeekEnd 2 // seek relative to end of file
  296. #define FSH_READWRITE (BYTE)0x01
  297. #define FSH_READONLY (BYTE)0x02
  298. #define FSH_CREATE (BYTE)0x04
  299. #define FSH_M14 (BYTE)0x08 // Not used really, since we return
  300. // an error if reading M14 to force
  301. // caller to use M14 APIs instead (we
  302. // could make this transparent to
  303. // user?)
  304. #define FSH_FASTUPDATE (BYTE)0x10 // System Btree is not copied to temp file
  305. // unless absolutely necessary
  306. #define FSH_DISKBTREE (BYTE)0x20 // System Btree is always copied to disk if
  307. // possible for speed. Btree may be very very
  308. // large, and this is NOT recommended for on-line
  309. #define HFOPEN_READWRITE (BYTE)0x01
  310. #define HFOPEN_READ (BYTE)0x02
  311. #define HFOPEN_CREATE (BYTE)0x04
  312. #define HFOPEN_SYSTEM (BYTE)0x08
  313. #define HFOPEN_NOTEMP (BYTE)0x10 // No temp file in r/w mode
  314. #define HFOPEN_FORCETEMP (BYTE)0x20 // Temp file created in r mode
  315. #define HFOPEN_ENABLELOGGING (BYTE)0x40
  316. #define FACCESS_READWRITE (BYTE)0x01
  317. #define FACCESS_READ (BYTE)0x02
  318. #define FACCESS_EXISTS (BYTE)0x04
  319. #define FACCESS_LIVESINFS (BYTE)0x08
  320. #define FACCESS_LIVESINTEMP (BYTE)0x10
  321. #define SFH_LOCKED (BYTE)0x01 // File may not be written to or deleted
  322. #define SFH_EXTRABYTES (BYTE)0x02 // (not used yet) Should use if extra bytes appear in header of file
  323. // file header should contain the number of header bytes as the first byte.
  324. #define SFH_COMPRESSED (BYTE)0x04 // (not used yet). Perhaps use to indicate an overall file compression
  325. #define SFH_LOGGING (BYTE)0x08
  326. #define SFH_INVALID (BYTE)0x80 // This is the value if file does not
  327. // really exist in fs yet.
  328. // These are the flags that users can manipulate
  329. #define SFH_FILEFLAGS (SFH_LOGGING|SFH_LOCKED)
  330. // Compatibility
  331. //#define fFSReadOnly (BYTE)0x01 // file (FS) is readonly
  332. //#define fFSOpenReadOnly (BYTE)0x02 // file (FS) is opened in readonly mode
  333. //#define fFSReadWrite (BYTE)0x00 // file (FS) is readwrite
  334. //#define fFSOpenReadWrite (BYTE)0x00 // file (FS) is opened in read/write mode
  335. //#define fFSOptCdRom (BYTE)0x20 // align file optimally for CDROM
  336. //#define fFSNoFlushDir (BYTE)0x40 // don't flush directory when closing
  337. #define fFSReadOnly HFOPEN_READ // file (FS) is readonly
  338. #define fFSOpenReadOnly HFOPEN_READ // file (FS) is opened in readonly mode
  339. #define fFSReadWrite HFOPEN_READWRITE // file (FS) is readwrite
  340. #define fFSOpenReadWrite HFOPEN_READWRITE // file (FS) is opened in read/write mode
  341. #define fFSOptCdRom 0x00 // align file optimally for CDROM
  342. #define fFSNoFlushDir 0x00 // don't flush directory when closing
  343. typedef HANDLE HSFB; // Handle to a SFB
  344. typedef BOOL (FAR PASCAL * PROGFUNC)(WORD);
  345. #define hfNil (short)0
  346. // @DOC INTERNAL API
  347. // @struct FS_PARAMS | File system parameters to be passed in to
  348. // <f HfsCreateFileSysFm>. Only the <p cbBlock> parameter is used right now.
  349. typedef struct _fs_params
  350. {
  351. USHORT wFreeListSize; // @field Free List Entries (0=default, else max entries in free list)
  352. USHORT cbBlock; // @field Size of directory btree block. Usually 1024 to 8192.
  353. } FS_PARAMS;
  354. typedef struct fsfilefind_tag
  355. {
  356. FILEOFFSET foSize;
  357. FILEOFFSET foStart;
  358. BYTE bFlags;
  359. char szFilename[256];
  360. int magic;
  361. BTPOS btpos;
  362. HFS hfs;
  363. } FSFILEFIND, FAR * LPFSFILEFIND;
  364. VOID EXPORT_API FAR PASCAL CleanErrorList (BOOL);
  365. VOID EXPORT_API FAR PASCAL MVFSShutDown (void);
  366. /* File System Operations */
  367. HFS PASCAL FAR EXPORT_API HfsCreateFileSysFm( FM, FS_PARAMS FAR *, LPERRB );
  368. RC PASCAL FAR EXPORT_API RcDestroyFileSysFm( FM );
  369. HFS PASCAL FAR EXPORT_API HfsOpenFm( FM, BYTE, LPERRB );
  370. RC PASCAL FAR EXPORT_API RcCloseHfs( HFS );
  371. RC PASCAL FAR EXPORT_API RcFlushHfs( HFS );
  372. BOOL PASCAL FAR EXPORT_API FHfsAccess(HFS hfs, BYTE bFlags);
  373. RC PASCAL FAR EXPORT_API RcFindFirstFile(HFS hfs, LPCSTR szFilename, FSFILEFIND * pfind);
  374. RC PASCAL FAR EXPORT_API RcFindNextFile(FSFILEFIND * pfind);
  375. #define VerifyHfs(hfs)
  376. /* File Operations */
  377. HF PASCAL FAR EXPORT_API HfCreateFileHfs( HFS, LPCSTR, BYTE, LPERRB );
  378. RC PASCAL FAR EXPORT_API RcUnlinkFileHfs( HFS, LPCSTR );
  379. HF PASCAL FAR EXPORT_API HfOpenHfs( HFS, LPCSTR, BYTE, LPERRB );
  380. HF PASCAL FAR EXPORT_API HfOpenHfsReserve( HFS, LPCSTR, BYTE, FILEOFFSET, LPERRB );
  381. RC PASCAL FAR EXPORT_API RcFlushHf( HF );
  382. RC PASCAL FAR EXPORT_API RcCloseHf( HF );
  383. LONG PASCAL FAR EXPORT_API LcbReadHf( HF, LPVOID, LONG, LPERRB );
  384. LONG PASCAL FAR EXPORT_API LcbWriteHf( HF, LPVOID, LONG, LPERRB );
  385. BOOL PASCAL FAR EXPORT_API FEofHf( HF, LPERRB );
  386. BOOL PASCAL FAR EXPORT_API FChSizeHf( HF, FILEOFFSET, LPERRB );
  387. BOOL PASCAL FAR EXPORT_API FAccessHfs( HFS, LPCSTR, BYTE, LPERRB );
  388. RC PASCAL FAR EXPORT_API RcAbandonHf( HF );
  389. RC PASCAL FAR EXPORT_API RcRenameFileHfs( HFS, LPCSTR, LPCSTR );
  390. BYTE PASCAL FAR EXPORT_API GetFileFlags(HFS, LPCSTR, LPERRB );
  391. RC PASCAL FAR EXPORT_API SetFileFlags(HFS, LPCSTR, BYTE );
  392. BOOL PASCAL FAR EXPORT_API FHfValid( HF );
  393. HFS PASCAL FAR EXPORT_API HfsGetFromHf( HF );
  394. RC PASCAL FAR EXPORT_API RcCopyDosFileHfs(HFS, LPCSTR, LPCSTR, BYTE, PROGFUNC );
  395. FILEOFFSET PASCAL FAR EXPORT_API FoTellHf( HF, LPERRB );
  396. FILEOFFSET PASCAL FAR EXPORT_API FoSeekHf(HF, FILEOFFSET, WORD, LPERRB);
  397. FILEOFFSET PASCAL FAR EXPORT_API FoSizeHf( HF, LPERRB );
  398. FILEOFFSET PASCAL FAR EXPORT_API FoOffsetHf(HF hf, LPERRB lperrb);
  399. #define VerifyHf(hf)
  400. // These functions require the FID type. They only make sense
  401. // if the caller already needs H_LLFILE.
  402. //#ifdef H_LLFILE
  403. //RC EXPORT_API FAR PASCAL RcLLInfoFromHf (HF, WORD, FID FAR *, LPLONG, LPLONG);
  404. //RC EXPORT_API FAR PASCAL RcLLInfoFromHfsSz (HFS, LPSTR, WORD, FID FAR *, LPLONG, LPLONG);
  405. //#endif // H_LLFILE
  406. /*****************************************************************************
  407. *
  408. * MediaView File Handling
  409. *
  410. *****************************************************************************/
  411. BOOL EXPORT_API FAR PASCAL LooseFileCompare(LPSTR, LPSTR);
  412. FM EXPORT_API FAR PASCAL LocateFile(LPSTR, LPVOID);
  413. HANDLE EXPORT_API FAR PASCAL LocateDLL(LPSTR, LPVOID);
  414. RC EXPORT_API FAR PASCAL CopyOrReplaceFileToSubfile(HFS, LPSTR, LPSTR, LONG, BYTE, PROGFUNC, BOOL);
  415. #pragma pack() // avoid problems when Zp!=1
  416. #ifdef __cplusplus
  417. }
  418. #endif
  419. #endif // __IMVFS_H__