Mercurial > mplayer.hg
annotate loader/com.h @ 31681:7e7c541566ad
cosmetics: Use 'elif' instead of 'else .. if'.
author | diego |
---|---|
date | Sat, 17 Jul 2010 09:19:39 +0000 |
parents | 26f673ba0675 |
children | 3d7ee643b110 |
rev | line source |
---|---|
15166
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
1 /* |
18783 | 2 * Modified for use with MPlayer, detailed changelog at |
3 * http://svn.mplayerhq.hu/mplayer/trunk/ | |
15166
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
4 */ |
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9978
diff
changeset
|
5 |
26045 | 6 #ifndef MPLAYER_COM_H |
7 #define MPLAYER_COM_H | |
1544 | 8 |
9967
b0d1b415320c
cygwin support patch by Sascha Sommer and some fixes by me
alex
parents:
7386
diff
changeset
|
9 #include "config.h" |
b0d1b415320c
cygwin support patch by Sascha Sommer and some fixes by me
alex
parents:
7386
diff
changeset
|
10 |
7386 | 11 #ifdef HAVE_STDINT_H |
12 #include <stdint.h> | |
13 #else | |
1544 | 14 #include <inttypes.h> |
7386 | 15 #endif |
1544 | 16 |
1 | 17 /** |
18 * Internal functions and structures for COM emulation code. | |
19 */ | |
20 | |
1544 | 21 #ifndef GUID_TYPE |
22 #define GUID_TYPE | |
1 | 23 typedef struct |
24 { | |
1544 | 25 uint32_t f1; |
26 uint16_t f2; | |
27 uint16_t f3; | |
28 uint8_t f4[8]; | |
1 | 29 } GUID; |
1544 | 30 #endif |
1 | 31 |
7386 | 32 extern const GUID IID_IUnknown; |
33 extern const GUID IID_IClassFactory; | |
1 | 34 |
7386 | 35 typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv); |
36 int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
37 int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs); | |
1 | 38 |
39 #ifndef STDCALL | |
1544 | 40 #define STDCALL __attribute__((__stdcall__)) |
1 | 41 #endif |
42 | |
43 struct IUnknown; | |
44 struct IClassFactory; | |
45 struct IUnknown_vt | |
46 { | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
47 long STDCALL (*QueryInterface)(struct IUnknown* this, const GUID* iid, void** ppv); |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
48 long STDCALL (*AddRef)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
49 long STDCALL (*Release)(struct IUnknown* this) ; |
1 | 50 } ; |
3128 | 51 |
52 typedef struct IUnknown | |
1 | 53 { |
54 struct IUnknown_vt* vt; | |
3128 | 55 } IUnknown; |
1 | 56 |
57 struct IClassFactory_vt | |
58 { | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
59 long STDCALL (*QueryInterface)(struct IUnknown* this, const GUID* iid, void** ppv); |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
60 long STDCALL (*AddRef)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
61 long STDCALL (*Release)(struct IUnknown* this) ; |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
22325
diff
changeset
|
62 long STDCALL (*CreateInstance)(struct IClassFactory* this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject); |
1 | 63 }; |
64 | |
65 struct IClassFactory | |
66 { | |
67 struct IClassFactory_vt* vt; | |
68 }; | |
69 | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27726
diff
changeset
|
70 #ifdef WIN32_LOADER |
1 | 71 long CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter, |
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
72 long dwClsContext, const GUID* riid, void** ppv); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
73 void* CoTaskMemAlloc(unsigned long cb); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
74 void CoTaskMemFree(void* cb); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
75 #else |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
76 long STDCALL CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter, |
7386 | 77 long dwClsContext, const GUID* riid, void** ppv); |
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
78 void* STDCALL CoTaskMemAlloc(unsigned long); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
79 void STDCALL CoTaskMemFree(void*); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
18783
diff
changeset
|
80 #endif |
1 | 81 |
26045 | 82 #endif /* MPLAYER_COM_H */ |