13 * Internal functions and structures for COM emulation code.
16 #if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
22 void* CoTaskMemAlloc(unsigned long cb
);
23 void CoTaskMemFree(void* cb
);
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
;
74 long CoCreateInstance(GUID
* rclsid
, struct IUnknown
* pUnkOuter
,
75 long dwClsContext
, const GUID
* riid
, void** ppv
);
79 #endif /* __cplusplus */
83 #endif /* AVIFILE_COM_H */