annotate loader/com.h @ 714:eb58bada8bce

removed debug printf
author arpi_esp
date Sun, 06 May 2001 21:58:44 +0000
parents a1fe76547e8f
children 558c1b03b8d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 /**
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 * Internal functions and structures for COM emulation code.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 #ifndef COM_H
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 #define COM_H
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 #ifdef __cplusplus
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 extern "C" {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 void* CoTaskMemAlloc(unsigned long cb);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 void CoTaskMemFree(void* cb);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 typedef struct
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 long f1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 short f2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 short f3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 char f4[8];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 } GUID;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 extern GUID IID_IUnknown;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 extern GUID IID_IClassFactory;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 typedef long (*GETCLASSOBJECT) (GUID* clsid, GUID* iid, void** ppv);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 int RegisterComClass(GUID* clsid, GETCLASSOBJECT gcs);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 #ifndef STDCALL
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 #define STDCALL __attribute__((__stdcall__))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 struct IUnknown;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 struct IClassFactory;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 struct IUnknown_vt
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 long STDCALL (*QueryInterface)(struct IUnknown* _this, GUID* iid, void** ppv);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 long STDCALL (*AddRef)(struct IUnknown* _this) ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 long STDCALL (*Release)(struct IUnknown* _this) ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 } ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 struct IUnknown
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 struct IUnknown_vt* vt;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 struct IClassFactory_vt
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 long STDCALL (*QueryInterface)(struct IUnknown* _this, GUID* iid, void** ppv);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 long STDCALL (*AddRef)(struct IUnknown* _this) ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 long STDCALL (*Release)(struct IUnknown* _this) ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 long STDCALL (*CreateInstance)(struct IClassFactory* _this, struct IUnknown* pUnkOuter, GUID* riid, void** ppvObject);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 struct IClassFactory
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 struct IClassFactory_vt* vt;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 long CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 long dwClsContext, GUID* riid, void** ppv);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 #ifdef __cplusplus
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65
302
a1fe76547e8f gcc 3.0 patch by Felix von Leitner
arpi_esp
parents: 1
diff changeset
66 #endif
a1fe76547e8f gcc 3.0 patch by Felix von Leitner
arpi_esp
parents: 1
diff changeset
67