Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

com.h

00001 /*
00002  * Modified for use with MPlayer, detailed CVS changelog at
00003  * http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
00004  * $Id: com.h 11593 2005-06-28 18:02:01Z courmisch $
00005  */
00006 
00007 #ifndef AVIFILE_COM_H
00008 #define AVIFILE_COM_H
00009 
00010 #include "config.h"
00011 
00012 #ifdef HAVE_STDINT_H
00013 #include <stdint.h>
00014 #else
00015 #include <inttypes.h>
00016 #endif
00017 
00022 #if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 void* CoTaskMemAlloc(unsigned long cb);
00029 void CoTaskMemFree(void* cb);
00030 
00031 #ifndef GUID_TYPE
00032 #define GUID_TYPE
00033 typedef struct
00034 {
00035     uint32_t f1;
00036     uint16_t f2;
00037     uint16_t f3;
00038     uint8_t  f4[8];
00039 } GUID;
00040 #endif
00041 
00042 extern const GUID IID_IUnknown;
00043 extern const GUID IID_IClassFactory;
00044 
00045 typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv);
00046 int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
00047 int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
00048 
00049 #ifndef STDCALL
00050 #define STDCALL __attribute__((__stdcall__))
00051 #endif
00052 
00053 struct IUnknown;
00054 struct IClassFactory;
00055 struct IUnknown_vt
00056 {
00057     long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv);
00058     long STDCALL (*AddRef)(struct IUnknown* _this) ;
00059     long STDCALL (*Release)(struct IUnknown* _this) ;
00060 } ;
00061 
00062 typedef struct IUnknown
00063 {
00064     struct IUnknown_vt* vt;
00065 } IUnknown;
00066 
00067 struct IClassFactory_vt
00068 {
00069     long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv);
00070     long STDCALL (*AddRef)(struct IUnknown* _this) ;
00071     long STDCALL (*Release)(struct IUnknown* _this) ;
00072     long STDCALL (*CreateInstance)(struct IClassFactory* _this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject);
00073 };
00074 
00075 struct IClassFactory
00076 {
00077     struct IClassFactory_vt* vt;
00078 };
00079 
00080 long CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter,
00081                       long dwClsContext, const GUID* riid, void** ppv);
00082 
00083 #ifdef __cplusplus
00084 };
00085 #endif /* __cplusplus */
00086 
00087 #endif /* WIN32 */
00088 
00089 #endif /* AVIFILE_COM_H */

Generated on Tue Dec 20 10:14:20 2005 for vlc-0.8.4a by  doxygen 1.4.2