annotate loader/com.h @ 34175:a345e7162d0a

Move TranslateFilename() to util/string.c. Now that the Win32 GUI uses symbolic constants for its messages, the code of TranslateFilename() both GUIs use is almost identical. So, share the code.
author ib
date Wed, 26 Oct 2011 15:14:06 +0000
parents b8175cad9b8a
children 2211ce940290
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 */
f5537cc95b02 Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents: 9978
diff changeset
5
26045
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25849
diff changeset
6 #ifndef MPLAYER_COM_H
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25849
diff changeset
7 #define MPLAYER_COM_H
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
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
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
11 #ifdef HAVE_STDINT_H
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
12 #include <stdint.h>
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
13 #else
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
14 #include <inttypes.h>
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
15 #endif
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
16
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 /**
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 * Internal functions and structures for COM emulation code.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
21 #ifndef GUID_TYPE
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
22 #define GUID_TYPE
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 typedef struct
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 {
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
25 uint32_t f1;
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
26 uint16_t f2;
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
27 uint16_t f3;
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
28 uint8_t f4[8];
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 } GUID;
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
30 #endif
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31
34118
b8175cad9b8a Change comment.
ib
parents: 34115
diff changeset
32 // use copies of the IIDs to avoid symbol collisions
34115
3d7ee643b110 Port to Wine.
ib
parents: 30496
diff changeset
33 #define IID_IUnknown MP_IID_IUnknown
3d7ee643b110 Port to Wine.
ib
parents: 30496
diff changeset
34 #define IID_IClassFactory MP_IID_IClassFactory
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
35 extern const GUID IID_IUnknown;
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
36 extern const GUID IID_IClassFactory;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
38 typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv);
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
39 int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
40 int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 #ifndef STDCALL
1544
558c1b03b8d0 updated
arpi
parents: 302
diff changeset
43 #define STDCALL __attribute__((__stdcall__))
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 struct IUnknown;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 struct IClassFactory;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 struct IUnknown_vt
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 {
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 22325
diff changeset
50 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
51 long STDCALL (*AddRef)(struct IUnknown* this) ;
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 22325
diff changeset
52 long STDCALL (*Release)(struct IUnknown* this) ;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 } ;
3128
392316004607 avifile sync... maybe broken, tell me if so.
arpi
parents: 1544
diff changeset
54
392316004607 avifile sync... maybe broken, tell me if so.
arpi
parents: 1544
diff changeset
55 typedef struct IUnknown
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 struct IUnknown_vt* vt;
3128
392316004607 avifile sync... maybe broken, tell me if so.
arpi
parents: 1544
diff changeset
58 } IUnknown;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 struct IClassFactory_vt
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 {
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 22325
diff changeset
62 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
63 long STDCALL (*AddRef)(struct IUnknown* this) ;
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 22325
diff changeset
64 long STDCALL (*Release)(struct IUnknown* this) ;
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 22325
diff changeset
65 long STDCALL (*CreateInstance)(struct IClassFactory* this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 struct IClassFactory
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 struct IClassFactory_vt* vt;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 27726
diff changeset
73 #ifdef WIN32_LOADER
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74 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
75 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
76 void* CoTaskMemAlloc(unsigned long cb);
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents: 18783
diff changeset
77 void CoTaskMemFree(void* cb);
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents: 18783
diff changeset
78 #else
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents: 18783
diff changeset
79 long STDCALL CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter,
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3128
diff changeset
80 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
81 void* STDCALL CoTaskMemAlloc(unsigned long);
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents: 18783
diff changeset
82 void STDCALL CoTaskMemFree(void*);
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents: 18783
diff changeset
83 #endif
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84
26045
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25849
diff changeset
85 #endif /* MPLAYER_COM_H */