home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / codecs.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  5KB  |  133 lines

  1. //****************************************************************************
  2. //  File: CODECS.H
  3. //  Content:    
  4. //              
  5. //
  6. //  Copyright (c) Microsoft Corporation 1997
  7. //      All Rights Reserved
  8. //
  9. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF 
  10. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
  11. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 
  12. // PARTICULAR PURPOSE.
  13. //****************************************************************************
  14.  
  15. #include <pshpack8.h> /* Assume 8 byte packing throughout */
  16. #include "appavcap.h"
  17.  
  18. /*
  19.  *    Constants
  20.  */
  21.  
  22. // hresult codes, facility IC = 0x301
  23. #define IC_E_CAPS_INSTANTIATION_FAILURE        0x83010001    // could not instantiate a required caps object
  24. #define IC_E_CAPS_INITIALIZATION_FAILURE    0x83010002    // could not initialize a required bject
  25. #define IC_E_NO_FORMATS                        0x83010003    // no formats available
  26. #define IC_E_NO_SUCH_FORMAT                    0x83010005    // no matching AC</VCM format was found
  27. #define IC_E_INTERNAL_ERROR                    0x83010006    // the Network Audio/Video Controller
  28.                                                         // reported a system error
  29.  
  30. /*
  31.  *    Macros
  32.  */
  33.  
  34. /*
  35.  *    Data Structures
  36.  */
  37.  
  38. /*
  39.  *    Functions
  40.  */
  41.  
  42. /*
  43.  *    Interfaces
  44.  */
  45.  
  46. #ifndef DECLARE_INTERFACE_PTR
  47. #ifdef __cplusplus
  48. #define DECLARE_INTERFACE_PTR(iface, piface)                       \
  49.     interface iface; typedef iface FAR * piface
  50. #else
  51. #define DECLARE_INTERFACE_PTR(iface, piface)                       \
  52.     typedef interface iface iface, FAR * piface
  53. #endif
  54. #endif /* DECLARE_INTERFACE_PTR */
  55.  
  56.  
  57. #define IUNKNOWN_METHODS(IPURE)                                        \
  58.     STDMETHOD (QueryInterface)                                      \
  59.         (THIS_ REFIID riid, LPVOID FAR * ppvObj) IPURE;                \
  60.     STDMETHOD_(ULONG,AddRef)  (THIS) IPURE;                            \
  61.     STDMETHOD_(ULONG,Release) (THIS) IPURE;                            \
  62.  
  63. #define IINSTALLAUDIOCODECS_METHODS(IPURE)                            \
  64.     STDMETHOD(AddACMFormat)                                            \
  65.         (THIS_ LPWAVEFORMATEX lpwfx, PAUDCAP_INFO pAudCapInfo) IPURE;    \
  66.     STDMETHOD (RemoveACMFormat)                                        \
  67.         (THIS_ LPWAVEFORMATEX lpwfx) IPURE;    \
  68.     STDMETHOD (ReorderFormats)                                        \
  69.         (THIS_ PAUDCAP_INFO_LIST pAudCapInfoList) IPURE;            \
  70.     STDMETHOD (EnumFormats)                                            \
  71.         (THIS_ PAUDCAP_INFO_LIST *ppAudCapInfoList) IPURE;    \
  72.     STDMETHOD (FreeBuffer) (THIS_ LPVOID lpBuffer) IPURE;            \
  73.  
  74. #define IINSTALLVIDEOCODECS_METHODS(IPURE)                            \
  75.     STDMETHOD(AddVCMFormat)                                            \
  76.         (THIS_ PVIDCAP_INFO pVidCapInfo) IPURE;    \
  77.     STDMETHOD (RemoveVCMFormat)                                        \
  78.         (THIS_ PVIDCAP_INFO pVidCapInfo) IPURE;    \
  79.     STDMETHOD (ReorderFormats)                                        \
  80.         (THIS_ PVIDCAP_INFO_LIST pVidCapInfoList) IPURE;            \
  81.     STDMETHOD (EnumFormats)                                            \
  82.         (THIS_ PVIDCAP_INFO_LIST *ppVidCapInfoList) IPURE;    \
  83.     STDMETHOD (FreeBuffer) (THIS_ LPVOID lpBuffer) IPURE;            \
  84.  
  85. // IInstallAudioCodecs
  86. #undef       INTERFACE
  87. #define      INTERFACE  IInstallAudioCodecs
  88. DECLARE_INTERFACE_(IInstallAudioCodecs, IUnknown)
  89. {
  90.     IUNKNOWN_METHODS(PURE)
  91.     IINSTALLAUDIOCODECS_METHODS(PURE)
  92. };
  93. DECLARE_INTERFACE_PTR(IInstallAudioCodecs, LPINSTALLAUDIOCODECS);
  94.  
  95. // IInstallVideooCodecs
  96. #undef       INTERFACE
  97. #define      INTERFACE  IInstallVideoCodecs
  98. DECLARE_INTERFACE_(IInstallVideoCodecs, IUnknown)
  99. {
  100.     IUNKNOWN_METHODS(PURE)
  101.     IINSTALLVIDEOCODECS_METHODS(PURE)
  102. };
  103. DECLARE_INTERFACE_PTR(IInstallVideoCodecs, LPINSTALLVIDEOCODECS);
  104.  
  105. // IInstallAudioCodecs
  106. #undef       INTERFACE
  107. #define      INTERFACE  IInstallCodecs
  108. DECLARE_INTERFACE_(IInstallCodecs, IUnknown)
  109. {
  110.     IUNKNOWN_METHODS(PURE)
  111. };
  112. DECLARE_INTERFACE_PTR(IInstallCodecs, LPINSTALLCODECS);
  113.  
  114. EXTERN_C HRESULT WINAPI CreateInstallCodecs (
  115.                                 IUnknown *punkOuter,
  116.                                 REFIID riid,
  117.                                 void **ppv);
  118.  
  119. typedef HRESULT (WINAPI *PFNCREATEINSTALLCODECS)
  120.                 (IUnknown *punkOuter, REFIID riid, void **ppv);
  121.  
  122.  
  123. // {8ED14CC0-7A1F-11d0-92F6-00A0C922E6B2}
  124. DEFINE_GUID(CLSID_InstallCodecs, 0x8ed14cc0, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  125. // {8ED14CC1-7A1F-11d0-92F6-00A0C922E6B2}
  126. DEFINE_GUID(IID_IInstallCodecs, 0x8ed14cc1, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  127. // {8ED14CC2-7A1F-11d0-92F6-00A0C922E6B2}
  128. DEFINE_GUID(IID_IInstallAudioCodecs, 0x8ed14cc2, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  129. // {8ED14CC3-7A1F-11d0-92F6-00A0C922E6B2}
  130. DEFINE_GUID(IID_IInstallVideoCodecs, 0x8ed14cc3, 0x7a1f, 0x11d0, 0x92, 0xf6, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xb2);
  131.  
  132. #include <poppack.h> /* End byte packing */
  133.