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.

79 lines
3.6 KiB

  1. // Copyright (c) 1992 Microsoft Corporation
  2. /* mmiocf.h
  3. *
  4. * Multimedia File I/O Library.
  5. *
  6. * This include file contains declarations required for compound file support.
  7. *
  8. */
  9. /* Revision history:
  10. LaurieGr: Jan 92 Ported from win16. Source tree fork, not common code.
  11. */
  12. #ifndef MMIOCF_H
  13. #define MMIOCF_H
  14. typedef HANDLE HMMCF; // a handle to an open RIFF compound file
  15. typedef struct _MMCFINFO // structure for representing CTOC header info.
  16. {
  17. DWORD dwHeaderSize; // size of CTOC header (w/o entries)
  18. DWORD dwEntriesTotal; // no. of entries in table of contents
  19. DWORD dwEntriesDeleted; // no. of entries ref. to. del. ent.
  20. DWORD dwEntriesUnused; // no. of entries that are not used
  21. DWORD dwBytesTotal; // total bytes of CGRP contents
  22. DWORD dwBytesDeleted; // total bytes of deleted CGRP elements
  23. DWORD dwHeaderFlags; // flags
  24. WORD wEntrySize; // size of each <CTOC-table-entry>
  25. WORD wNameSize; // size of each <achName> field
  26. WORD wExHdrFields; // number of "extra header fields"
  27. WORD wExEntFields; // number of "extra entry fields"
  28. } MMCFINFO, FAR *LPMMCFINFO;
  29. typedef struct _MMCTOCENTRY // structure for representing CTOC entry info.
  30. {
  31. DWORD dwOffset; // offset of element inside CGRP chunk
  32. DWORD dwSize; // size of element inside CGRP chunk
  33. DWORD dwMedType; // media element type of CF element
  34. DWORD dwMedUsage; // media element usage information
  35. DWORD dwCompressTech; // media element compression technique
  36. DWORD dwUncompressBytes; // size after decompression
  37. DWORD adwExEntField[1]; // extra CTOC table entry fields
  38. } MMCTOCENTRY, FAR *LPMMCTOCENTRY;
  39. /* <dwFlags> field of MMIOINFO structure -- many same as OpenFile() flags */
  40. #define MMIO_CTOCFIRST 0x00020000 // mmioCFOpen(): put CTOC before CGRP
  41. /* flags for other functions */
  42. #define MMIO_FINDFIRST 0x0010 // mmioCFFindEntry(): find first entry
  43. #define MMIO_FINDNEXT 0x0020 // mmioCFFindEntry(): find next entry
  44. #define MMIO_FINDUNUSED 0x0040 // mmioCFFindEntry(): find unused entry
  45. #define MMIO_FINDDELETED 0x0080 // mmioCFFindEntry(): find deleted entry
  46. /* message numbers for MMIOPROC */
  47. #define MMIOM_GETCF 10 // get HMMCF of CF element
  48. #define MMIOM_GETCFENTRY 11 // get ptr. to CTOC table entry
  49. /* four character codes used to identify standard built-in I/O procedures */
  50. #define FOURCC_BND mmioFOURCC('B', 'N', 'D', ' ')
  51. /* <dwHeaderFlags> field of MMCFINFO structure */
  52. #define CTOC_HF_SEQUENTIAL 0x00000001 // CF elements in same order as CTOC
  53. #define CTOC_HF_MEDSUBTYPE 0x00000002 // <dwMedUsage> is a med. el. subtype
  54. /* CTOC table entry flags */
  55. #define CTOC_EF_DELETED 0x01 // CF element is deleted
  56. #define CTOC_EF_UNUSED 0x02 // CTOC entry is unused
  57. /* CF I/O prototypes */
  58. HMMCF FAR PASCAL mmioCFOpen(LPWSTR szFileName, DWORD dwFlags);
  59. HMMCF FAR PASCAL mmioCFAccess(HMMIO hmmio, LPMMCFINFO lpmmcfinfo,
  60. DWORD dwFlags);
  61. MMRESULT FAR PASCAL mmioCFClose(HMMCF hmmcf, UINT uFlags);
  62. DWORD FAR PASCAL mmioCFGetInfo(HMMCF hmmcf, LPMMCFINFO lpmmcfinfo, DWORD cb);
  63. DWORD FAR PASCAL mmioCFSetInfo(HMMCF hmmcf, LPMMCFINFO lpmmcfinfo, DWORD cb);
  64. LPMMCTOCENTRY FAR PASCAL mmioCFFindEntry(HMMCF hmmcf, LPWSTR szName,
  65. UINT uFlags, LONG lParam);
  66. #endif // MMIOCF_H