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.

71 lines
2.9 KiB

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