Mercurial > mplayer.hg
comparison loader/com.h @ 1:3b5f5d1c5041
Initial revision
author | arpi_esp |
---|---|
date | Sat, 24 Feb 2001 20:28:24 +0000 |
parents | |
children | a1fe76547e8f |
comparison
equal
deleted
inserted
replaced
0:c1bb2c071d63 | 1:3b5f5d1c5041 |
---|---|
1 /** | |
2 * Internal functions and structures for COM emulation code. | |
3 */ | |
4 | |
5 #ifndef COM_H | |
6 #define COM_H | |
7 | |
8 #ifdef __cplusplus | |
9 extern "C" { | |
10 #endif | |
11 | |
12 void* CoTaskMemAlloc(unsigned long cb); | |
13 void CoTaskMemFree(void* cb); | |
14 | |
15 typedef struct | |
16 { | |
17 long f1; | |
18 short f2; | |
19 short f3; | |
20 char f4[8]; | |
21 } GUID; | |
22 | |
23 extern GUID IID_IUnknown; | |
24 extern GUID IID_IClassFactory; | |
25 | |
26 typedef long (*GETCLASSOBJECT) (GUID* clsid, GUID* iid, void** ppv); | |
27 int RegisterComClass(GUID* clsid, GETCLASSOBJECT gcs); | |
28 | |
29 #ifndef STDCALL | |
30 #define STDCALL __attribute__((__stdcall__)) | |
31 #endif | |
32 | |
33 struct IUnknown; | |
34 struct IClassFactory; | |
35 struct IUnknown_vt | |
36 { | |
37 long STDCALL (*QueryInterface)(struct IUnknown* _this, GUID* iid, void** ppv); | |
38 long STDCALL (*AddRef)(struct IUnknown* _this) ; | |
39 long STDCALL (*Release)(struct IUnknown* _this) ; | |
40 } ; | |
41 struct IUnknown | |
42 { | |
43 struct IUnknown_vt* vt; | |
44 }; | |
45 | |
46 struct IClassFactory_vt | |
47 { | |
48 long STDCALL (*QueryInterface)(struct IUnknown* _this, GUID* iid, void** ppv); | |
49 long STDCALL (*AddRef)(struct IUnknown* _this) ; | |
50 long STDCALL (*Release)(struct IUnknown* _this) ; | |
51 long STDCALL (*CreateInstance)(struct IClassFactory* _this, struct IUnknown* pUnkOuter, GUID* riid, void** ppvObject); | |
52 }; | |
53 | |
54 struct IClassFactory | |
55 { | |
56 struct IClassFactory_vt* vt; | |
57 }; | |
58 | |
59 long CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter, | |
60 long dwClsContext, GUID* riid, void** ppv); | |
61 | |
62 #ifdef __cplusplus | |
63 }; | |
64 #endif | |
65 | |
66 #endif |