Mercurial > mplayer.hg
annotate loader/com.h @ 15219:c931a567a395
Translation synced with 1.52
author | jheryan |
---|---|
date | Wed, 20 Apr 2005 07:41:24 +0000 |
parents | f5537cc95b02 |
children | 0783dd397f74 |
rev | line source |
---|---|
15166
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
1 /* |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
2 * Modified for use with MPlayer, detailed CVS changelog at |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
3 * http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/ |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
4 * $Id$ |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
5 */ |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
6 |
1544 | 7 #ifndef AVIFILE_COM_H |
8 #define AVIFILE_COM_H | |
9 | |
9967
b0d1b415320c
cygwin support patch by Sascha Sommer and some fixes by me
alex
parents:
7386
diff
changeset
|
10 #include "config.h" |
b0d1b415320c
cygwin support patch by Sascha Sommer and some fixes by me
alex
parents:
7386
diff
changeset
|
11 |
7386 | 12 #ifdef HAVE_STDINT_H |
13 #include <stdint.h> | |
14 #else | |
1544 | 15 #include <inttypes.h> |
7386 | 16 #endif |
1544 | 17 |
1 | 18 /** |
19 * Internal functions and structures for COM emulation code. | |
20 */ | |
21 | |
9978 | 22 #if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) |
1 | 23 |
24 #ifdef __cplusplus | |
25 extern "C" { | |
26 #endif | |
27 | |
28 void* CoTaskMemAlloc(unsigned long cb); | |
29 void CoTaskMemFree(void* cb); | |
30 | |
1544 | 31 #ifndef GUID_TYPE |
32 #define GUID_TYPE | |
1 | 33 typedef struct |
34 { | |
1544 | 35 uint32_t f1; |
36 uint16_t f2; | |
37 uint16_t f3; | |
38 uint8_t f4[8]; | |
1 | 39 } GUID; |
1544 | 40 #endif |
1 | 41 |
7386 | 42 extern const GUID IID_IUnknown; |
43 extern const GUID IID_IClassFactory; | |
1 | 44 |
7386 | 45 typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv); |
46 int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
47 int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
1 | 48 |
49 #ifndef STDCALL | |
1544 | 50 #define STDCALL __attribute__((__stdcall__)) |
1 | 51 #endif |
52 | |
53 struct IUnknown; | |
54 struct IClassFactory; | |
55 struct IUnknown_vt | |
56 { | |
7386 | 57 long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv); |
1 | 58 long STDCALL (*AddRef)(struct IUnknown* _this) ; |
59 long STDCALL (*Release)(struct IUnknown* _this) ; | |
60 } ; | |
3128 | 61 |
62 typedef struct IUnknown | |
1 | 63 { |
64 struct IUnknown_vt* vt; | |
3128 | 65 } IUnknown; |
1 | 66 |
67 struct IClassFactory_vt | |
68 { | |
7386 | 69 long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv); |
1 | 70 long STDCALL (*AddRef)(struct IUnknown* _this) ; |
71 long STDCALL (*Release)(struct IUnknown* _this) ; | |
7386 | 72 long STDCALL (*CreateInstance)(struct IClassFactory* _this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject); |
1 | 73 }; |
74 | |
75 struct IClassFactory | |
76 { | |
77 struct IClassFactory_vt* vt; | |
78 }; | |
79 | |
80 long CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter, | |
7386 | 81 long dwClsContext, const GUID* riid, void** ppv); |
1 | 82 |
83 #ifdef __cplusplus | |
84 }; | |
1544 | 85 #endif /* __cplusplus */ |
1 | 86 |
1544 | 87 #endif /* WIN32 */ |
302 | 88 |
1544 | 89 #endif /* AVIFILE_COM_H */ |