home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Multimedia Jumpstart 1.1a / CD_ROM.BIN / develpmt / source / waveconv / riffsup.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-12  |  3.4 KB  |  120 lines

  1. /** RIFFsup.h
  2.  *
  3.      (C) Copyright Microsoft Corp. 1991, 1992.  All rights reserved.
  4.  
  5.      You have a royalty-free right to use, modify, reproduce and 
  6.      distribute the Sample Files (and/or any modified version) in 
  7.      any way you find useful, provided that you agree that 
  8.      Microsoft has no warranty obligations or liability for any 
  9.      Sample Application Files which are modified. 
  10.      
  11.      If you did not get this from Microsoft Sources, then it may not be the
  12.      most current version.  This sample code in particular will be updated
  13.      and include more documentation.  
  14.  
  15.      Sources are:
  16.          The MM Sys File Transfer BBS: The phone number is 206 936-4082.
  17.     CompuServe: WINSDK forum, MDK section.
  18.     Anonymous FTP from ftp.uu.net vendors\microsoft\multimedia
  19.  *
  20.  ** */
  21.  
  22. #ifndef _RIFFSUP_H_
  23. #define _RIFFSUP_H_
  24.  
  25. //
  26. //
  27. //
  28.  
  29. #define IDD_INFOLIST        100
  30. #define IDD_INFOINFO        101
  31. #define    IDD_INFOTEXT        102
  32.  
  33. #ifdef RC_INVOKED
  34.  
  35. #define DLG_INFOEDIT        31
  36.  
  37. #else
  38.             
  39. #define DLG_INFOEDIT        MAKEINTRESOURCE(31)
  40.  
  41. #endif
  42.  
  43. ////////////////////////////////////////////////////////////////////////////
  44.  
  45. typedef struct tCHUNK
  46. {
  47.     FOURCC  fcc;
  48.     DWORD   cksize;
  49.     BYTE    data[];
  50. } CHUNK, * PCHUNK, far * LPCHUNK;
  51.  
  52.  
  53.  
  54. typedef struct tDISP
  55. {
  56.     DWORD   cfid;   // Clipboard id of data
  57.     HANDLE  h;        // handle to data
  58.     struct tDISP *  next;    // next in list
  59. } DISP;
  60.  
  61. typedef struct tINFODATA
  62. {
  63.     WORD    index;  // index into aINFO
  64.     WORD    wFlags; // flags for chunk
  65.     DWORD   dwINFOOffset;   // offset in file to INFO chunk
  66.     
  67. #define INFOCHUNK_MODIFIED  1
  68. #define INFOCHUNK_REVERT    2    // command to revert to original text
  69.  
  70.     LPSTR   lpText; // text of modified chunk.  None if NULL.
  71.  
  72.     struct tINFODATA  near *  pnext; // next read sub-chunk
  73. } INFODATA, * PINFODATA, FAR * LPINFODATA;
  74.  
  75. typedef struct tINFOCHUNK
  76. {
  77.     LPSTR   lpChunk;    // complete chunk in memory (GlobalPtr)
  78.     DWORD   cksize;    // size of chunk data
  79.     PINFODATA    pHead;    // first sub-chunk data
  80. } INFOCHUNK, * PINFOCHUNK, FAR * LPINFOCHUNK;
  81.  
  82. ////////////////////////////////////////////////////////////////////////////
  83. //
  84. //  error returns from RIFF functions
  85. //
  86. #define RIFFERR_BASE         (0)
  87. #define RIFFERR_NOERROR      (0)
  88. #define RIFFERR_ERROR        (RIFFERR_BASE+1)
  89. #define RIFFERR_BADPARAM     (RIFFERR_BASE+2)
  90. #define RIFFERR_FILEERROR    (RIFFERR_BASE+3)
  91. #define RIFFERR_NOMEM        (RIFFERR_BASE+4)
  92. #define RIFFERR_BADFILE         (RIFFERR_BASE+5)
  93.  
  94. ////////////////////////////////////////////////////////////////////////////
  95. //
  96. //  public function prototypes
  97. //
  98.  
  99. #define RIFFAPI  FAR PASCAL
  100.  
  101.  
  102. BOOL RIFFAPI riffCopyList(HMMIO hmmioSrc, HMMIO hmmioDst, const LPMMCKINFO lpck);
  103. BOOL RIFFAPI riffCopyChunk(HMMIO hmmioSrc, HMMIO hmmioDst, const LPMMCKINFO lpck);
  104.  
  105. LRESULT RIFFAPI  riffInitINFO(INFOCHUNK FAR * FAR * lplpInfo);
  106. LRESULT RIFFAPI  riffReadINFO(HMMIO hmmio, const LPMMCKINFO lpck, LPINFOCHUNK lpInfo);
  107. LRESULT RIFFAPI  riffEditINFO(HWND hwnd, LPINFOCHUNK lpInfo, HINSTANCE hInst);
  108. LRESULT RIFFAPI  riffFreeINFO(INFOCHUNK FAR * FAR * lpnpInfo);
  109. LRESULT RIFFAPI riffWriteINFO(HMMIO hmmioDst, LPINFOCHUNK lpInfo);
  110.  
  111.  
  112. LRESULT RIFFAPI  riffReadDISP(HMMIO hmmio, LPMMCKINFO lpck, DISP FAR * FAR * lpnpDisp);
  113. LRESULT RIFFAPI  riffFreeDISP(DISP FAR * FAR * lpnpDisp);
  114. LRESULT RIFFAPI riffWriteDISP(HMMIO hmmio, DISP FAR * FAR * lpnpDisp);
  115.  
  116.  
  117. #endif
  118.  
  119. /** EOF: RIFFsup.h **/
  120.