Fix teletext character set auto-detection.
[mplayer/glamo.git] / loader / com.h
blob6bbbc55b7d4f032aa3a3f8ec2360f432480f491b
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 #ifdef __cplusplus
22 extern "C" {
23 #endif
25 #ifndef GUID_TYPE
26 #define GUID_TYPE
27 typedef struct
29 uint32_t f1;
30 uint16_t f2;
31 uint16_t f3;
32 uint8_t f4[8];
33 } GUID;
34 #endif
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);
43 #ifndef STDCALL
44 #define STDCALL __attribute__((__stdcall__))
45 #endif
47 struct IUnknown;
48 struct IClassFactory;
49 struct IUnknown_vt
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) ;
54 } ;
56 typedef struct IUnknown
58 struct IUnknown_vt* vt;
59 } IUnknown;
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);
69 struct IClassFactory
71 struct IClassFactory_vt* vt;
74 #ifdef WIN32_LOADER
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);
79 #else
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*);
84 #endif
86 #ifdef __cplusplus
88 #endif /* __cplusplus */
90 #endif /* MPLAYER_COM_H */