Mercurial > mplayer.hg
annotate loader/com.h @ 11848:63fecc69c3fb
ppc970 support, patch by Romain Dolbeau
author | alex |
---|---|
date | Sun, 25 Jan 2004 18:18:21 +0000 |
parents | 11cee15b1a8f |
children | f5537cc95b02 |
rev | line source |
---|---|
1544 | 1 #ifndef AVIFILE_COM_H |
2 #define AVIFILE_COM_H | |
3 | |
9967
b0d1b415320c
cygwin support patch by Sascha Sommer and some fixes by me
alex
parents:
7386
diff
changeset
|
4 #include "config.h" |
b0d1b415320c
cygwin support patch by Sascha Sommer and some fixes by me
alex
parents:
7386
diff
changeset
|
5 |
7386 | 6 #ifdef HAVE_STDINT_H |
7 #include <stdint.h> | |
8 #else | |
1544 | 9 #include <inttypes.h> |
7386 | 10 #endif |
1544 | 11 |
1 | 12 /** |
13 * Internal functions and structures for COM emulation code. | |
14 */ | |
15 | |
9978 | 16 #if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) |
1 | 17 |
18 #ifdef __cplusplus | |
19 extern "C" { | |
20 #endif | |
21 | |
22 void* CoTaskMemAlloc(unsigned long cb); | |
23 void CoTaskMemFree(void* cb); | |
24 | |
1544 | 25 #ifndef GUID_TYPE |
26 #define GUID_TYPE | |
1 | 27 typedef struct |
28 { | |
1544 | 29 uint32_t f1; |
30 uint16_t f2; | |
31 uint16_t f3; | |
32 uint8_t f4[8]; | |
1 | 33 } GUID; |
1544 | 34 #endif |
1 | 35 |
7386 | 36 extern const GUID IID_IUnknown; |
37 extern const GUID IID_IClassFactory; | |
1 | 38 |
7386 | 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); | |
1 | 42 |
43 #ifndef STDCALL | |
1544 | 44 #define STDCALL __attribute__((__stdcall__)) |
1 | 45 #endif |
46 | |
47 struct IUnknown; | |
48 struct IClassFactory; | |
49 struct IUnknown_vt | |
50 { | |
7386 | 51 long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv); |
1 | 52 long STDCALL (*AddRef)(struct IUnknown* _this) ; |
53 long STDCALL (*Release)(struct IUnknown* _this) ; | |
54 } ; | |
3128 | 55 |
56 typedef struct IUnknown | |
1 | 57 { |
58 struct IUnknown_vt* vt; | |
3128 | 59 } IUnknown; |
1 | 60 |
61 struct IClassFactory_vt | |
62 { | |
7386 | 63 long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv); |
1 | 64 long STDCALL (*AddRef)(struct IUnknown* _this) ; |
65 long STDCALL (*Release)(struct IUnknown* _this) ; | |
7386 | 66 long STDCALL (*CreateInstance)(struct IClassFactory* _this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject); |
1 | 67 }; |
68 | |
69 struct IClassFactory | |
70 { | |
71 struct IClassFactory_vt* vt; | |
72 }; | |
73 | |
74 long CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter, | |
7386 | 75 long dwClsContext, const GUID* riid, void** ppv); |
1 | 76 |
77 #ifdef __cplusplus | |
78 }; | |
1544 | 79 #endif /* __cplusplus */ |
1 | 80 |
1544 | 81 #endif /* WIN32 */ |
302 | 82 |
1544 | 83 #endif /* AVIFILE_COM_H */ |