docs: document --quvi-format
[mplayer.git] / loader / com.h
blob3e9a94bd679953223f1c6e05fd1b9a6fb2de8cd4
1 /*
2 * Modified for use with MPlayer, detailed changelog at
3 * http://svn.mplayerhq.hu/mplayer/trunk/
4 */
6 #ifndef MPLAYER_COM_H
7 #define MPLAYER_COM_H
9 #include "config.h"
11 #ifdef HAVE_STDINT_H
12 #include <stdint.h>
13 #else
14 #include <inttypes.h>
15 #endif
17 /**
18 * Internal functions and structures for COM emulation code.
21 #ifndef GUID_TYPE
22 #define GUID_TYPE
23 typedef struct
25 uint32_t f1;
26 uint16_t f2;
27 uint16_t f3;
28 uint8_t f4[8];
29 } GUID;
30 #endif
32 extern const GUID IID_IUnknown;
33 extern const GUID IID_IClassFactory;
35 typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv);
36 int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
37 int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
39 #ifndef STDCALL
40 #define STDCALL __attribute__((__stdcall__))
41 #endif
43 struct IUnknown;
44 struct IClassFactory;
45 struct IUnknown_vt
47 long STDCALL (*QueryInterface)(struct IUnknown* this, const GUID* iid, void** ppv);
48 long STDCALL (*AddRef)(struct IUnknown* this) ;
49 long STDCALL (*Release)(struct IUnknown* this) ;
50 } ;
52 typedef struct IUnknown
54 struct IUnknown_vt* vt;
55 } IUnknown;
57 struct IClassFactory_vt
59 long STDCALL (*QueryInterface)(struct IUnknown* this, const GUID* iid, void** ppv);
60 long STDCALL (*AddRef)(struct IUnknown* this) ;
61 long STDCALL (*Release)(struct IUnknown* this) ;
62 long STDCALL (*CreateInstance)(struct IClassFactory* this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject);
65 struct IClassFactory
67 struct IClassFactory_vt* vt;
70 #ifdef WIN32_LOADER
71 long CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter,
72 long dwClsContext, const GUID* riid, void** ppv);
73 void* CoTaskMemAlloc(unsigned long cb);
74 void CoTaskMemFree(void* cb);
75 #else
76 long STDCALL CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter,
77 long dwClsContext, const GUID* riid, void** ppv);
78 void* STDCALL CoTaskMemAlloc(unsigned long);
79 void STDCALL CoTaskMemFree(void*);
80 #endif
82 #endif /* MPLAYER_COM_H */