annotate loader/com.h @ 25003:c79fa5c75d4e

Use proper inttypes.h types instead of broken uint32 etc. defines
author reimar
date Mon, 12 Nov 2007 20:40:13 +0000
parents 12afc06c044e
children 2c8cdb9123b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15166
f5537cc95b02 Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents: 9978
diff changeset
1 /*
18783
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 15166
diff changeset
2 * Modified for use with MPlayer, detailed changelog at
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 15166
diff changeset
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 * $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
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
7 #ifndef AVIFILE_COM_H
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
8 #define AVIFILE_COM_H
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
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
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
12 #ifdef HAVE_STDINT_H
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
13 #include <stdint.h>
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
14 #else
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
15 #include <inttypes.h>
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
16 #endif
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
17
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 /**
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 * Internal functions and structures for COM emulation code.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21
9978
11cee15b1a8f last mingw32 support patch by Sascha Sommer
alex
parents: 9967
diff changeset
22 #if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 #ifdef __cplusplus
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 extern "C" {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
28 #ifndef GUID_TYPE
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
29 #define GUID_TYPE
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 typedef struct
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 {
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
32 uint32_t f1;
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
33 uint16_t f2;
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
34 uint16_t f3;
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
35 uint8_t f4[8];
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 } GUID;
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
37 #endif
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
39 extern const GUID IID_IUnknown;
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
40 extern const GUID IID_IClassFactory;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
42 typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv);
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
43 int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
44 int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 #ifndef STDCALL
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
47 #define STDCALL __attribute__((__stdcall__))
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 struct IUnknown;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 struct IClassFactory;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 struct IUnknown_vt
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 {
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
54 long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 long STDCALL (*AddRef)(struct IUnknown* _this) ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 long STDCALL (*Release)(struct IUnknown* _this) ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 } ;
3128
392316004607 avifile sync... maybe broken, tell me if so.
arpi
parents: 1544
diff changeset
58
392316004607 avifile sync... maybe broken, tell me if so.
arpi
parents: 1544
diff changeset
59 typedef struct IUnknown
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 struct IUnknown_vt* vt;
3128
392316004607 avifile sync... maybe broken, tell me if so.
arpi
parents: 1544
diff changeset
62 } IUnknown;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 struct IClassFactory_vt
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 {
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
66 long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 long STDCALL (*AddRef)(struct IUnknown* _this) ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 long STDCALL (*Release)(struct IUnknown* _this) ;
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
69 long STDCALL (*CreateInstance)(struct IClassFactory* _this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 struct IClassFactory
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74 struct IClassFactory_vt* vt;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76
22325
12afc06c044e Replace __MINGW32__ by more consistent WIN32_LOADER. This should fix compilation under
voroshil
parents: 22305
diff changeset
77 #ifdef WIN32_LOADER
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 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
79 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
80 void* CoTaskMemAlloc(unsigned long cb);
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents: 18783
diff changeset
81 void CoTaskMemFree(void* cb);
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents: 18783
diff changeset
82 #else
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents: 18783
diff changeset
83 long STDCALL CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter,
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
84 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
85 void* STDCALL CoTaskMemAlloc(unsigned long);
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents: 18783
diff changeset
86 void STDCALL CoTaskMemFree(void*);
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents: 18783
diff changeset
87 #endif
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89 #ifdef __cplusplus
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 };
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
91 #endif /* __cplusplus */
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
93 #endif /* WIN32 */
302
a1fe76547e8f gcc 3.0 patch by Felix von Leitner
arpi_esp
parents: 1
diff changeset
94
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
95 #endif /* AVIFILE_COM_H */