2 * Modified for use with MPlayer, detailed changelog at
3 * http://svn.mplayerhq.hu/mplayer/trunk/
18 * Internal functions and structures for COM emulation code.
36 extern const GUID IID_IUnknown
;
37 extern const GUID IID_IClassFactory
;
39 typedef long (*GETCLASSOBJECT
) (GUID
* clsid
, const GUID
* iid
, void** ppv
);
40 int RegisterComClass(const GUID
* clsid
, GETCLASSOBJECT gcs
);
41 int UnregisterComClass(const GUID
* clsid
, GETCLASSOBJECT gcs
);
44 #define STDCALL __attribute__((__stdcall__))
51 long STDCALL (*QueryInterface
)(struct IUnknown
* this, const GUID
* iid
, void** ppv
);
52 long STDCALL (*AddRef
)(struct IUnknown
* this) ;
53 long STDCALL (*Release
)(struct IUnknown
* this) ;
56 typedef struct IUnknown
58 struct IUnknown_vt
* vt
;
61 struct IClassFactory_vt
63 long STDCALL (*QueryInterface
)(struct IUnknown
* this, const GUID
* iid
, void** ppv
);
64 long STDCALL (*AddRef
)(struct IUnknown
* this) ;
65 long STDCALL (*Release
)(struct IUnknown
* this) ;
66 long STDCALL (*CreateInstance
)(struct IClassFactory
* this, struct IUnknown
* pUnkOuter
, const GUID
* riid
, void** ppvObject
);
71 struct IClassFactory_vt
* vt
;
75 long CoCreateInstance(GUID
* rclsid
, struct IUnknown
* pUnkOuter
,
76 long dwClsContext
, const GUID
* riid
, void** ppv
);
77 void* CoTaskMemAlloc(unsigned long cb
);
78 void CoTaskMemFree(void* cb
);
80 long STDCALL
CoCreateInstance(GUID
* rclsid
, struct IUnknown
* pUnkOuter
,
81 long dwClsContext
, const GUID
* riid
, void** ppv
);
82 void* STDCALL
CoTaskMemAlloc(unsigned long);
83 void STDCALL
CoTaskMemFree(void*);
88 #endif /* __cplusplus */
90 #endif /* MPLAYER_COM_H */