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.
21 #if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
38 extern const GUID IID_IUnknown
;
39 extern const GUID IID_IClassFactory
;
41 typedef long (*GETCLASSOBJECT
) (GUID
* clsid
, const GUID
* iid
, void** ppv
);
42 int RegisterComClass(const GUID
* clsid
, GETCLASSOBJECT gcs
);
43 int UnregisterComClass(const GUID
* clsid
, GETCLASSOBJECT gcs
);
46 #define STDCALL __attribute__((__stdcall__))
53 long STDCALL (*QueryInterface
)(struct IUnknown
* this, const GUID
* iid
, void** ppv
);
54 long STDCALL (*AddRef
)(struct IUnknown
* this) ;
55 long STDCALL (*Release
)(struct IUnknown
* this) ;
58 typedef struct IUnknown
60 struct IUnknown_vt
* vt
;
63 struct IClassFactory_vt
65 long STDCALL (*QueryInterface
)(struct IUnknown
* this, const GUID
* iid
, void** ppv
);
66 long STDCALL (*AddRef
)(struct IUnknown
* this) ;
67 long STDCALL (*Release
)(struct IUnknown
* this) ;
68 long STDCALL (*CreateInstance
)(struct IClassFactory
* this, struct IUnknown
* pUnkOuter
, const GUID
* riid
, void** ppvObject
);
73 struct IClassFactory_vt
* vt
;
77 long CoCreateInstance(GUID
* rclsid
, struct IUnknown
* pUnkOuter
,
78 long dwClsContext
, const GUID
* riid
, void** ppv
);
79 void* CoTaskMemAlloc(unsigned long cb
);
80 void CoTaskMemFree(void* cb
);
82 long STDCALL
CoCreateInstance(GUID
* rclsid
, struct IUnknown
* pUnkOuter
,
83 long dwClsContext
, const GUID
* riid
, void** ppv
);
84 void* STDCALL
CoTaskMemAlloc(unsigned long);
85 void STDCALL
CoTaskMemFree(void*);
90 #endif /* __cplusplus */
94 #endif /* MPLAYER_COM_H */