Changeset 640 for trunk/include


Ignore:
Timestamp:
Aug 23, 1999, 12:52:05 AM (26 years ago)
Author:
sandervl
Message:

Updated Wine headers

Location:
trunk/include/win/wine
Files:
4 added
38 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/win/wine/keyboard16.h

    r94 r640  
    1 /* $Id: keyboard16.h,v 1.3 1999-06-10 16:21:52 achimha Exp $ */
    2 #ifndef _KEYBOARD16_H
    3 #define _KEYBOARD16_H
     1#ifndef __WINE_WINE_KEYBOARD16_H
     2#define __WINE_WINE_KEYBOARD16_H
    43
    54#include "windef.h"
     
    1312
    1413
    15 #endif /* _KEYBOARD16_H */
     14#endif /* __WINE_WINE_KEYBOARD16_H */
  • trunk/include/win/wine/obj_base.h

    r261 r640  
    1 /* $Id: obj_base.h,v 1.6 1999-07-04 09:35:04 sandervl Exp $ */
    21/*
    3  * This file defines the macros and types necessary to define COM interfaces,
     2 * This file defines the macros and types necessary to define COM interfaces, 
    43 * and the three most basic COM interfaces: IUnknown, IMalloc and IClassFactory.
    54 */
     
    87#define __WINE_WINE_OBJ_BASE_H
    98
     9/*****************************************************************************
     10 * define ICOM_MSVTABLE_COMPAT
     11 * to implement the microsoft com vtable compatibility workaround for g++.
     12 *
     13 * NOTE: Turning this option on will produce a winelib that is incompatible
     14 * with the binary emulator.
     15 *
     16 * If the compiler supports the com_interface attribute, leave this off, and
     17 * define the ICOM_USE_COM_INTERFACE_ATTRIBUTE macro below.
     18 *
     19 * If you aren't interested in WineLib C++ compatability at all, leave both
     20 * options off.
     21 */
     22/* #define ICOM_MSVTABLE_COMPAT 1 */
     23/* #define ICOM_USE_COM_INTERFACE_ATTRIBUTE 1 */
    1024
    1125/*****************************************************************************
     
    1428#include "wtypes.h"
    1529
     30
     31#define LISet32(li, v)   ((li).HighPart = (v) < 0 ? -1 : 0, (li).LowPart = (v))
     32#define ULISet32(li, v)  ((li).HighPart = 0, (li).LowPart = (v))
    1633
    1734/*****************************************************************************
     
    2138#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
    2239        extern const GUID name = \
    23    { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }
     40        { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }
    2441#else
    2542#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
     
    2845
    2946#define DEFINE_OLEGUID(name, l, w1, w2) \
    30    DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
     47        DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
    3148
    3249#define DEFINE_SHLGUID(name, l, w1, w2) DEFINE_OLEGUID(name,l,w1,w2)
     
    5067BOOL WINAPI IsEqualGUID32(REFGUID rguid1,REFGUID rguid2);
    5168/*#define IsEqualGUID WINELIB_NAME(IsEqualGUID)*/
    52 #ifdef __cplusplus
     69#if defined(__cplusplus) && !defined(CINTERFACE)
    5370#define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID)))
    54 #else
     71#else /* defined(__cplusplus) && !defined(CINTERFACE) */
    5572#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
    56 #endif /* cplusplus */
     73#endif /* defined(__cplusplus) && !defined(CINTERFACE) */
    5774#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
    5875#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
    5976
    60 #ifdef __cplusplus
     77#if defined(__cplusplus) && !defined(CINTERFACE)
    6178inline BOOL operator==(const GUID& guidOne, const GUID& guidOther)
    6279{
     
    6784    return !(guidOne == guidOther);
    6885}
    69 #endif
     86#endif 
    7087
    7188
     
    7491 */
    7592/*
    76  * The goal of the following set of definitions is to provide a way to use the same
    77  * header file definitions to provide both a C interface and a C++ object oriented
    78  * interface to COM interfaces. The type of interface is selected automatically
    79  * depending on the language but it is always possible to get the C interface in C++
     93 * The goal of the following set of definitions is to provide a way to use the same 
     94 * header file definitions to provide both a C interface and a C++ object oriented 
     95 * interface to COM interfaces. The type of interface is selected automatically 
     96 * depending on the language but it is always possible to get the C interface in C++ 
    8097 * by defining CINTERFACE.
    8198 *
    8299 * It is based on the following assumptions:
    83100 *  - all COM interfaces derive from IUnknown, this should not be a problem.
    84  *  - the header file only defines the interface, the actual fields are defined
     101 *  - the header file only defines the interface, the actual fields are defined 
    85102 *    separately in the C file implementing the interface.
    86103 *
    87  * The natural approach to this problem would be to make sure we get a C++ class and
     104 * The natural approach to this problem would be to make sure we get a C++ class and 
    88105 * virtual methods in C++ and a structure with a table of pointer to functions in C.
    89  * Unfortunately the layout of the virtual table is compiler specific, the layout of
    90  * g++ virtual tables is not the same as that of an egcs virtual table which is not the
    91  * same as that generated by Visual C+. There are workarounds to make the virtual tables
     106 * Unfortunately the layout of the virtual table is compiler specific, the layout of 
     107 * g++ virtual tables is not the same as that of an egcs virtual table which is not the 
     108 * same as that generated by Visual C+. There are workarounds to make the virtual tables 
    92109 * compatible via padding but unfortunately the one which is imposed to the WINE emulator
    93110 * by the Windows binaries, i.e. the Visual C++ one, is the most compact of all.
    94111 *
    95  * So the solution I finally adopted does not use virtual tables. Instead I use inline
     112 * So the solution I finally adopted does not use virtual tables. Instead I use inline 
    96113 * non virtual methods that dereference the method pointer themselves and perform the call.
    97114 *
     
    127144 *
    128145 * Comments:
    129  *  - The ICOM_INTERFACE macro is used in the ICOM_METHOD macros to define the type of the 'this'
    130  *    pointer. Defining this macro here saves us the trouble of having to repeat the interface
    131  *    name everywhere. Note however that because of the way macros work, a macro like ICOM_METHOD1
    132  *    cannot use 'ICOM_INTERFACE##_VTABLE' because this would give 'ICOM_INTERFACE_VTABLE' and not
     146 *  - The ICOM_INTERFACE macro is used in the ICOM_METHOD macros to define the type of the 'this' 
     147 *    pointer. Defining this macro here saves us the trouble of having to repeat the interface 
     148 *    name everywhere. Note however that because of the way macros work, a macro like ICOM_METHOD1 
     149 *    cannot use 'ICOM_INTERFACE##_VTABLE' because this would give 'ICOM_INTERFACE_VTABLE' and not 
    133150 *    'IDirect3D_VTABLE'.
    134  *  - ICOM_METHODS defines the methods specific to this interface. It is then aggregated with the
     151 *  - ICOM_METHODS defines the methods specific to this interface. It is then aggregated with the 
    135152 *    inherited methods to form ICOM_IMETHODS.
    136  *  - ICOM_IMETHODS defines the list of methods that are inheritable from this interface. It must
    137  *    be written manually (rather than using a macro to generate the equivalent code) to avoid
     153 *  - ICOM_IMETHODS defines the list of methods that are inheritable from this interface. It must 
     154 *    be written manually (rather than using a macro to generate the equivalent code) to avoid 
    138155 *    macro recursion (which compilers don't like).
    139  *  - The ICOM_DEFINE finally declares all the structures necessary for the interface. We have to
     156 *  - The ICOM_DEFINE finally declares all the structures necessary for the interface. We have to 
    140157 *    explicitly use the interface name for macro expansion reasons again.
    141  *    Inherited methods are inherited in C by using the IDirect3D_METHODS macro and the parent's
    142  *    Xxx_IMETHODS macro. In C++ we need only use the IDirect3D_METHODS since method inheritance
     158 *    Inherited methods are inherited in C by using the IDirect3D_METHODS macro and the parent's 
     159 *    Xxx_IMETHODS macro. In C++ we need only use the IDirect3D_METHODS since method inheritance 
    143160 *    is taken care of by the language.
    144  *  - In C++ the ICOM_METHOD macros generate a function prototype and a call to a function pointer
    145  *    method. This means using once 't1 p1, t2 p2, ...' and once 'p1, p2' without the types. The
    146  *    only way I found to handle this is to have one ICOM_METHOD macro per number of parameters and
     161 *  - In C++ the ICOM_METHOD macros generate a function prototype and a call to a function pointer 
     162 *    method. This means using once 't1 p1, t2 p2, ...' and once 'p1, p2' without the types. The 
     163 *    only way I found to handle this is to have one ICOM_METHOD macro per number of parameters and 
    147164 *    to have it take only the type information (with const if necessary) as parameters.
    148  *    The 'undef ICOM_INTERFACE' is here to remind you that using ICOM_INTERFACE in the following
    149  *    macros will not work. This time it's because the ICOM_CALL macro expansion is done only once
    150  *    the 'IDirect3D_Xxx' macro is expanded. And by that time ICOM_INTERFACE will be long gone
     165 *    The 'undef ICOM_INTERFACE' is here to remind you that using ICOM_INTERFACE in the following 
     166 *    macros will not work. This time it's because the ICOM_CALL macro expansion is done only once 
     167 *    the 'IDirect3D_Xxx' macro is expanded. And by that time ICOM_INTERFACE will be long gone 
    151168 *    anyway.
    152  *  - You may have noticed the double commas after each parameter type. This allows you to put the
    153  *    name of that parameter which I think is good for documentation. It is not required and since
    154  *    I did not know what to put there for this example (I could only find doc about IDirect3D2),
     169 *  - You may have noticed the double commas after each parameter type. This allows you to put the 
     170 *    name of that parameter which I think is good for documentation. It is not required and since 
     171 *    I did not know what to put there for this example (I could only find doc about IDirect3D2), 
    155172 *    I left them blank.
    156  *  - Finally the set of 'IDirect3D_Xxx' macros is a standard set of macros defined to ease access
    157  *    to the interface methods in C. Unfortunately I don't see any way to avoid having to duplicate
    158  *    the inherited method definitions there. This time I could have used a trick to use only one
     173 *  - Finally the set of 'IDirect3D_Xxx' macros is a standard set of macros defined to ease access 
     174 *    to the interface methods in C. Unfortunately I don't see any way to avoid having to duplicate 
     175 *    the inherited method definitions there. This time I could have used a trick to use only one 
    159176 *    macro whatever the number of parameters but I prefered to have it work the same way as above.
    160  *  - You probably have noticed that we don't define the fields we need to actually implement this
    161  *    interface: reference count, pointer to other resources and miscellaneous fields. That's
    162  *    because these interfaces are just that: interfaces. They may be implemented more than once, in
    163  *    different contexts and sometimes not even in Wine. Thus it would not make sense to impose
     177 *  - You probably have noticed that we don't define the fields we need to actually implement this 
     178 *    interface: reference count, pointer to other resources and miscellaneous fields. That's 
     179 *    because these interfaces are just that: interfaces. They may be implemented more than once, in 
     180 *    different contexts and sometimes not even in Wine. Thus it would not make sense to impose 
    164181 *    that the interface contains some specific fields.
    165182 *
     
    180197 *        HRESULT (*fnCreateViewport)(IDirect3D* me, LPDIRECT3DVIEWPORT* a, IUnknown* b);
    181198 *        HRESULT (*fnFindDevice)(IDirect3D* me, LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b);
    182  *    };
     199 *    }; 
    183200 *
    184201 *    #ifdef ICOM_CINTERFACE
     
    197214 *
    198215 * Comments:
    199  *  - IDirect3D only contains a pointer to the IDirect3D virtual/jump table. This is the only thing
    200  *    the user needs to know to use the interface. Of course the structure we will define to
     216 *  - IDirect3D only contains a pointer to the IDirect3D virtual/jump table. This is the only thing 
     217 *    the user needs to know to use the interface. Of course the structure we will define to 
    201218 *    implement this interface will have more fields but the first one will match this pointer.
    202  *  - The code generated by ICOM_DEFINE defines both the structure representing the interface and
    203  *    the structure for the jump table. ICOM_DEFINE uses the parent's Xxx_IMETHODS macro to
    204  *    automatically repeat the prototypes of all the inherited methods and then uses IDirect3D_METHODS
     219 *  - The code generated by ICOM_DEFINE defines both the structure representing the interface and 
     220 *    the structure for the jump table. ICOM_DEFINE uses the parent's Xxx_IMETHODS macro to 
     221 *    automatically repeat the prototypes of all the inherited methods and then uses IDirect3D_METHODS 
    205222 *    to define the IDirect3D methods.
    206  *  - Each method is declared as a pointer to function field in the jump table. The implementation
    207  *    will fill this jump table with appropriate values, probably using a static variable, and
     223 *  - Each method is declared as a pointer to function field in the jump table. The implementation 
     224 *    will fill this jump table with appropriate values, probably using a static variable, and 
    208225 *    initialize the lpvtbl field to point to this variable.
    209  *  - The IDirect3D_Xxx macros then just derefence the lpvtbl pointer and use the function pointer
    210  *    corresponding to the macro name. This emulates the behavior of a virtual table and should be
     226 *  - The IDirect3D_Xxx macros then just derefence the lpvtbl pointer and use the function pointer 
     227 *    corresponding to the macro name. This emulates the behavior of a virtual table and should be 
    211228 *    just as fast.
    212  *  - This C code should be quite compatible with the Windows headers both for code that uses COM
     229 *  - This C code should be quite compatible with the Windows headers both for code that uses COM 
    213230 *    interfaces and for code implementing a COM interface.
    214231 *
     
    234251 *        public: inline HRESULT FindDevice(LPD3DFINDDEVICESEARCH a, LPD3DFINDDEVICERESULT b)
    235252 *            { return ((IDirect3D*)t.lpvtbl)->fnFindDevice(this,a,b); };
    236  *    };
     253 *    }; 
    237254 *
    238255 * Comments:
    239  *  - In C++ IDirect3D does double duty as both the virtual/jump table and as the interface
    240  *    definition. The reason for this is to avoid having to duplicate the mehod definitions: once
    241  *    to have the function pointers in the jump table and once to have the methods in the interface
    242  *    class. Here one macro can generate both. This means though that the first pointer, t.lpvtbl
    243  *    defined in IUnknown,  must be interpreted as the jump table pointer if we interpret the
    244  *    structure as the the interface class, and as the function pointer to the QueryInterface
    245  *    method, t.fnQueryInterface, if we interpret the structure as the jump table. Fortunately this
     256 *  - In C++ IDirect3D does double duty as both the virtual/jump table and as the interface 
     257 *    definition. The reason for this is to avoid having to duplicate the mehod definitions: once 
     258 *    to have the function pointers in the jump table and once to have the methods in the interface 
     259 *    class. Here one macro can generate both. This means though that the first pointer, t.lpvtbl 
     260 *    defined in IUnknown,  must be interpreted as the jump table pointer if we interpret the 
     261 *    structure as the the interface class, and as the function pointer to the QueryInterface 
     262 *    method, t.fnQueryInterface, if we interpret the structure as the jump table. Fortunately this 
    246263 *    gymnastic is entirely taken care of in the header of IUnknown.
    247  *  - Of course in C++ we use inheritance so that we don't have to duplicate the method definitions.
    248  *  - Since IDirect3D does double duty, each ICOM_METHOD macro defines both a function pointer and
    249  *    a non-vritual inline method which dereferences it and calls it. This way this method behaves
    250  *    just like a virtual method but does not create a true C++ virtual table which would break the
    251  *    structure layout. If you look at the implementation of these methods you'll notice that they
    252  *    would not work for void functions. We have to return something and fortunately this seems to
     264 *  - Of course in C++ we use inheritance so that we don't have to duplicate the method definitions. 
     265 *  - Since IDirect3D does double duty, each ICOM_METHOD macro defines both a function pointer and 
     266 *    a non-vritual inline method which dereferences it and calls it. This way this method behaves 
     267 *    just like a virtual method but does not create a true C++ virtual table which would break the 
     268 *    structure layout. If you look at the implementation of these methods you'll notice that they 
     269 *    would not work for void functions. We have to return something and fortunately this seems to 
    253270 *    be what all the COM methods do (otherwise we would need another set of macros).
    254  *  - Note how the ICOM_METHOD generates both function prototypes mixing types and formal parameter
    255  *    names and the method invocation using only the formal parameter name. This is the reason why
     271 *  - Note how the ICOM_METHOD generates both function prototypes mixing types and formal parameter 
     272 *    names and the method invocation using only the formal parameter name. This is the reason why 
    256273 *    we need different macros to handle different numbers of parameters.
    257  *  - Finally there is no IDirect3D_Xxx macro. These are not needed in C++ unless the CINTERFACE
     274 *  - Finally there is no IDirect3D_Xxx macro. These are not needed in C++ unless the CINTERFACE 
    258275 *    macro is defined in which case we would not be here.
    259  *  - This C++ code works well for code that just uses COM interfaces. But it will not work with
    260  *    C++ code implement a COM interface. That's because such code assumes the interface methods
     276 *  - This C++ code works well for code that just uses COM interfaces. But it will not work with 
     277 *    C++ code implement a COM interface. That's because such code assumes the interface methods 
    261278 *    are declared as virtual C++ methods which is not the case here.
    262279 *
     
    293310 *
    294311 * Comments:
    295  *  - We first define what the interface really contains. This is th e_IDirect3D structure. The
     312 *  - We first define what the interface really contains. This is th e_IDirect3D structure. The 
    296313 *    first field must of course be the virtual table pointer. Everything else is free.
    297  *  - Then we predeclare our static virtual table variable, we will need its address in some
     314 *  - Then we predeclare our static virtual table variable, we will need its address in some 
    298315 *    methods to initialize the virtual table pointer of the returned interface objects.
    299  *  - Then we implement the interface methods. To match what has been declared in the header file
    300  *    they must take a pointer to a IDirect3D structure and we must cast it to an _IDirect3D so that
     316 *  - Then we implement the interface methods. To match what has been declared in the header file 
     317 *    they must take a pointer to a IDirect3D structure and we must cast it to an _IDirect3D so that 
    301318 *    we can manipulate the fields. This is performed by the ICOM_THIS macro.
    302319 *  - Finally we initialize the virtual table.
     
    314331/* C++ interface */
    315332
    316 #ifndef ICOM_VIRTUAL_METHODS
    317 /* Uses these macros, i.e. do not define ICOM_VIRTUAL_METHODS, if your C++ compiler does not generate
    318  * virtual tables with the right layout (i.e. currently most g++ derivatives).
    319  */
    320 
    321333#define ICOM_METHOD(ret,xfn) \
    322     private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me); \
    323     public: inline ret (CALLBACK xfn)(void) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this); };
     334     public: virtual ret (CALLBACK xfn)(void) = 0;
    324335
    325336#define ICOM_METHOD1(ret,xfn,ta,na) \
    326     private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a); \
    327     public: inline ret (CALLBACK xfn)(ta a) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a); };
     337     public: virtual ret (CALLBACK xfn)(ta a) = 0;
    328338
    329339#define ICOM_METHOD2(ret,xfn,ta,na,tb,nb) \
    330     private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b); \
    331     public: inline ret (CALLBACK xfn)(ta a,tb b) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b); };
     340     public: virtual ret (CALLBACK xfn)(ta a,tb b) = 0;
    332341
    333342#define ICOM_METHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
    334     private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c); \
    335     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c); };
     343     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c) = 0;
    336344
    337345#define ICOM_METHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
    338     private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d); \
    339     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d); };
     346     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d) = 0;
    340347
    341348#define ICOM_METHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
    342     private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e); \
    343     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e); };
     349     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) = 0;
    344350
    345351#define ICOM_METHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
    346     private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f); \
    347     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f); };
     352     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) = 0;
    348353
    349354#define ICOM_METHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
    350     private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g); \
    351     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g); };
     355     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) = 0;
    352356
    353357#define ICOM_METHOD8(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh) \
    354     private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g,th h); \
    355     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g,h); };
     358     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) = 0;
    356359
    357360#define ICOM_METHOD9(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh,ti,ni) \
    358     private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g,th h,ti i); \
    359     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h,ti i) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g,h,i); };
     361     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h,ti i) = 0;
    360362
    361363#define ICOM_METHOD10(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh,ti,ni,tj,nj) \
    362     private: ret (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g,th h,ti i,tj j); \
    363     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h,ti i,tj j) { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g,h,i,j); };
     364     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h,ti i,tj j) = 0;
    364365
    365366
    366367#define ICOM_CMETHOD(ret,xfn) \
    367     private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me); \
    368     public: inline ret (CALLBACK xfn)(void) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this); };
     368     public: virtual ret (CALLBACK xfn)(void) const = 0;
    369369
    370370#define ICOM_CMETHOD1(ret,xfn,ta,na) \
    371     private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a); \
    372     public: inline ret (CALLBACK xfn)(ta a) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a); };
     371     public: virtual ret (CALLBACK xfn)(ta a) const = 0;
    373372
    374373#define ICOM_CMETHOD2(ret,xfn,ta,na,tb,nb) \
    375     private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b); \
    376     public: inline ret (CALLBACK xfn)(ta a,tb b) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b); };
     374     public: virtual ret (CALLBACK xfn)(ta a,tb b) const = 0;
    377375
    378376#define ICOM_CMETHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
    379     private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c); \
    380     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c); };
     377     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c) const = 0;
    381378
    382379#define ICOM_CMETHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
    383     private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d); \
    384     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d); };
     380     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d) const = 0;
    385381
    386382#define ICOM_CMETHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
    387     private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e); \
    388     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e); };
     383     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) const = 0;
    389384
    390385#define ICOM_CMETHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
    391     private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f); \
    392     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f); };
     386     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) const = 0;
    393387
    394388#define ICOM_CMETHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
    395     private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g); \
    396     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g); };
     389     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) const = 0;
    397390
    398391#define ICOM_CMETHOD8(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh) \
    399     private: ret (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g,th h); \
    400     public: inline ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) const { return ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g,h); };
     392     public: virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) const = 0;
    401393
    402394
    403395#define ICOM_VMETHOD(xfn) \
    404     private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me); \
    405     public: inline void (CALLBACK xfn)(void) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this); };
     396     public: virtual void (CALLBACK xfn)(void) = 0;
    406397
    407398#define ICOM_VMETHOD1(xfn,ta,na) \
    408     private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a); \
    409     public: inline void (CALLBACK xfn)(ta a) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a); };
     399     public: virtual void (CALLBACK xfn)(ta a) = 0;
    410400
    411401#define ICOM_VMETHOD2(xfn,ta,na,tb,nb) \
    412     private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b); \
    413     public: inline void (CALLBACK xfn)(ta a,tb b) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b); };
     402     public: virtual void (CALLBACK xfn)(ta a,tb b) = 0;
    414403
    415404#define ICOM_VMETHOD3(xfn,ta,na,tb,nb,tc,nc) \
    416     private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c); \
    417     public: inline void (CALLBACK xfn)(ta a,tb b,tc c) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c); };
     405     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c) = 0;
    418406
    419407#define ICOM_VMETHOD4(xfn,ta,na,tb,nb,tc,nc,td,nd) \
    420     private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d); \
    421     public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d); };
     408     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d) = 0;
    422409
    423410#define ICOM_VMETHOD5(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
    424     private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e); \
    425     public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e); };
     411     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) = 0;
    426412
    427413#define ICOM_VMETHOD6(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
    428     private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f); \
    429     public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f); };
     414     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) = 0;
    430415
    431416#define ICOM_VMETHOD7(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
    432     private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g); \
    433     public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g); };
     417     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) = 0;
    434418
    435419#define ICOM_VMETHOD8(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh) \
    436     private: void (CALLBACK *fn##xfn)(ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g,th h); \
    437     public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g,h); };
     420     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) = 0;
    438421
    439422
    440423#define ICOM_CVMETHOD(xfn) \
    441     private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me); \
    442     public: inline void (CALLBACK xfn)(void) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this); };
     424     public: virtual void (CALLBACK xfn)(void) const = 0;
    443425
    444426#define ICOM_CVMETHOD1(xfn,ta,na) \
    445     private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a); \
    446     public: inline void (CALLBACK xfn)(ta a) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a); };
     427     public: virtual void (CALLBACK xfn)(ta a) const = 0;
    447428
    448429#define ICOM_CVMETHOD2(xfn,ta,na,tb,nb) \
    449     private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b); \
    450     public: inline void (CALLBACK xfn)(ta a,tb b) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b); };
     430     public: virtual void (CALLBACK xfn)(ta a,tb b) const = 0;
    451431
    452432#define ICOM_CVMETHOD3(xfn,ta,na,tb,nb,tc,nc) \
    453     private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c); \
    454     public: inline void (CALLBACK xfn)(ta a,tb b,tc c) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c); };
     433     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c) const = 0;
    455434
    456435#define ICOM_CVMETHOD4(xfn,ta,na,tb,nb,tc,nc,td,nd) \
    457     private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d); \
    458     public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d); };
     436     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d) const = 0;
    459437
    460438#define ICOM_CVMETHOD5(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
    461     private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e); \
    462     public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e); };
     439     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) const = 0;
    463440
    464441#define ICOM_CVMETHOD6(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
    465     private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f); \
    466     public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f); };
     442     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) const = 0;
    467443
    468444#define ICOM_CVMETHOD7(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
    469     private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g); \
    470     public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g); };
     445     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) const = 0;
    471446
    472447#define ICOM_CVMETHOD8(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh) \
    473     private: void (CALLBACK *fn##xfn)(const ICOM_INTERFACE* me,ta a,tb b,tc c,td d,te e,tf f,tg g,th h); \
    474     public: inline void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) const { ((ICOM_INTERFACE*)t.lpvtbl)->fn##xfn(this,a,b,c,d,e,f,g,h); };
    475 
     448     public: virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) const = 0;
     449
     450#ifdef ICOM_USE_COM_INTERFACE_ATTRIBUTE
     451
     452#define ICOM_DEFINE(iface,ibase) \
     453    typedef struct iface: public ibase { \
     454        iface##_METHODS \
     455            } __attribute__ ((com_interface));
     456
     457#else
    476458
    477459#define ICOM_DEFINE(iface,ibase) \
     
    480462    };
    481463
    482 #else
    483 /* This case can be used if the layout of the virtual tables generated by the C++
    484  * compiler matches that of Visual C++.
    485  */
    486 
    487 #define ICOM_METHOD(ret,xfn) \
    488     virtual ret (CALLBACK xfn)(void) = 0;
    489 
    490 #define ICOM_METHOD1(ret,xfn,ta,na) \
    491     virtual ret (CALLBACK xfn)(ta a) = 0;
    492 
    493 #define ICOM_METHOD2(ret,xfn,ta,na,tb,nb) \
    494     virtual ret (CALLBACK xfn)(ta a,tb b) = 0;
    495 
    496 #define ICOM_METHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
    497     virtual ret (CALLBACK xfn)(ta a,tb b,tc c) = 0;
    498 
    499 #define ICOM_METHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
    500     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d) = 0;
    501 
    502 #define ICOM_METHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
    503     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) = 0;
    504 
    505 #define ICOM_METHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
    506     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) = 0;
    507 
    508 #define ICOM_METHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
    509     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) = 0;
    510 
    511 #define ICOM_METHOD8(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh) \
    512     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) = 0;
    513 
    514 #define ICOM_METHOD9(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh,ti,ni) \
    515     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h,ti i) = 0;
    516 
    517 #define ICOM_METHOD10(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh,ti,ni,tj,nj) \
    518     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h,ti i,tj j) = 0;
    519 
    520 
    521 #define ICOM_CMETHOD(ret,xfn) \
    522     virtual ret (CALLBACK xfn)(void) const = 0;
    523 
    524 #define ICOM_CMETHOD1(ret,xfn,ta,na) \
    525     virtual ret (CALLBACK xfn)(ta a) const = 0;
    526 
    527 #define ICOM_CMETHOD2(ret,xfn,ta,na,tb,nb) \
    528     virtual ret (CALLBACK xfn)(ta a,tb b) const = 0;
    529 
    530 #define ICOM_CMETHOD3(ret,xfn,ta,na,tb,nb,tc,nc) \
    531     virtual ret (CALLBACK xfn)(ta a,tb b,tc c) const = 0;
    532 
    533 #define ICOM_CMETHOD4(ret,xfn,ta,na,tb,nb,tc,nc,td,nd) \
    534     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d) const = 0;
    535 
    536 #define ICOM_CMETHOD5(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
    537     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) const = 0;
    538 
    539 #define ICOM_CMETHOD6(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
    540     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) const = 0;
    541 
    542 #define ICOM_CMETHOD7(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
    543     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) const = 0;
    544 
    545 #define ICOM_CMETHOD8(ret,xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh) \
    546     virtual ret (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) const = 0;
    547 
    548 
    549 #define ICOM_VMETHOD(xfn) \
    550     virtual void (CALLBACK xfn)(void) = 0;
    551 
    552 #define ICOM_VMETHOD1(xfn,ta,na) \
    553     virtual void (CALLBACK xfn)(ta a) = 0;
    554 
    555 #define ICOM_VMETHOD2(xfn,ta,na,tb,nb) \
    556     virtual void (CALLBACK xfn)(ta a,tb b) = 0;
    557 
    558 #define ICOM_VMETHOD3(xfn,ta,na,tb,nb,tc,nc) \
    559     virtual void (CALLBACK xfn)(ta a,tb b,tc c) = 0;
    560 
    561 #define ICOM_VMETHOD4(xfn,ta,na,tb,nb,tc,nc,td,nd) \
    562     virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d) = 0;
    563 
    564 #define ICOM_VMETHOD5(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
    565     virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) = 0;
    566 
    567 #define ICOM_VMETHOD6(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
    568     virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) = 0;
    569 
    570 #define ICOM_VMETHOD7(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
    571     virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) = 0;
    572 
    573 #define ICOM_VMETHOD8(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh) \
    574     virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) = 0;
    575 
    576 
    577 #define ICOM_CVMETHOD(xfn) \
    578     virtual void (CALLBACK xfn)(void) const = 0;
    579 
    580 #define ICOM_CVMETHOD1(xfn,ta,na) \
    581     virtual void (CALLBACK xfn)(ta a) const = 0;
    582 
    583 #define ICOM_CVMETHOD2(xfn,ta,na,tb,nb) \
    584     virtual void (CALLBACK xfn)(ta a,tb b) const = 0;
    585 
    586 #define ICOM_CVMETHOD3(xfn,ta,na,tb,nb,tc,nc) \
    587     virtual void (CALLBACK xfn)(ta a,tb b,tc c) const = 0;
    588 
    589 #define ICOM_CVMETHOD4(xfn,ta,na,tb,nb,tc,nc,td,nd) \
    590     virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d) const = 0;
    591 
    592 #define ICOM_CVMETHOD5(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne) \
    593     virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e) const = 0;
    594 
    595 #define ICOM_CVMETHOD6(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf) \
    596     virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f) const = 0;
    597 
    598 #define ICOM_CVMETHOD7(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng) \
    599     virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g) const = 0;
    600 
    601 #define ICOM_CVMETHOD8(xfn,ta,na,tb,nb,tc,nc,td,nd,te,ne,tf,nf,tg,ng,th,nh) \
    602     virtual void (CALLBACK xfn)(ta a,tb b,tc c,td d,te e,tf f,tg g,th h) const = 0;
    603 
    604 #endif
    605 
    606 
    607 #define ICOM_DEFINE(iface,ibase) \
    608     typedef struct iface: public ibase { \
    609         iface##_METHODS \
    610     };
     464#endif /* ICOM_USE_COM_INTERFACE_ATTRIBUTE */
    611465
    612466#define ICOM_CALL(xfn, p)                        this_is_a_syntax_error
     
    743597
    744598
     599#ifdef ICOM_MSVTABLE_COMPAT
     600#define ICOM_DEFINE(iface,ibase) \
     601    typedef struct ICOM_VTABLE(iface) ICOM_VTABLE(iface); \
     602    struct iface { \
     603        const ICOM_VTABLE(iface)* lpvtbl; \
     604    }; \
     605    struct ICOM_VTABLE(iface) { \
     606        long dummyRTTI1; \
     607        long dummyRTTI2; \
     608        ibase##_IMETHODS \
     609        iface##_METHODS \
     610    };
     611#define ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 0,0,
     612
     613#else
    745614#define ICOM_DEFINE(iface,ibase) \
    746615    typedef struct ICOM_VTABLE(iface) ICOM_VTABLE(iface); \
     
    752621        iface##_METHODS \
    753622    };
     623#define ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
     624#endif /* ICOM_MSVTABLE_COMPAT */
    754625
    755626
     
    763634#define ICOM_CALL7(xfn, p,a,b,c,d,e,f,g) (p)->lpvtbl->fn##xfn(p,a,b,c,d,e,f,g)
    764635#define ICOM_CALL8(xfn, p,a,b,c,d,e,f,g,h) (p)->lpvtbl->fn##xfn(p,a,b,c,d,e,f,g,h)
     636#define ICOM_CALL9(xfn, p,a,b,c,d,e,f,g,h,i) (p)->lpvtbl->fn##xfn(p,a,b,c,d,e,f,g,h,i)
    765637#define ICOM_CALL10(xfn, p,a,b,c,d,e,f,g,h,i,j) (p)->lpvtbl->fn##xfn(p,a,b,c,d,e,f,g,h,i,j)
    766638
     
    775647 * Predeclare the interfaces
    776648 */
    777 DEFINE_OLEGUID(IID_IClassFactory,        0x00000001L, 0, 0);
     649DEFINE_OLEGUID(IID_IClassFactory,       0x00000001L, 0, 0);
    778650typedef struct IClassFactory IClassFactory, *LPCLASSFACTORY;
    779651
    780 DEFINE_OLEGUID(IID_IMalloc,                 0x00000002L, 0, 0);
     652DEFINE_OLEGUID(IID_IMalloc,             0x00000002L, 0, 0);
    781653typedef struct IMalloc16 IMalloc16,*LPMALLOC16;
    782654typedef struct IMalloc IMalloc,*LPMALLOC;
    783655
    784 DEFINE_OLEGUID(IID_IUnknown,                0x00000000L, 0, 0);
     656DEFINE_OLEGUID(IID_IUnknown,            0x00000000L, 0, 0);
    785657typedef struct IUnknown IUnknown, *LPUNKNOWN;
    786658
     
    798670struct IUnknown {
    799671    ICOM_VTABLE(IUnknown)* lpvtbl;
     672#if defined(ICOM_USE_COM_INTERFACE_ATTRIBUTE) && !defined(ICOM_CINTERFACE)
     673} __attribute__ ((com_interface));
     674#else
    800675};
     676#endif /* ICOM_US_COM_INTERFACE_ATTRIBUTE, !ICOM_CINTERFACE */
     677
    801678struct ICOM_VTABLE(IUnknown) {
    802     ICOM_METHOD2(HRESULT,QueryInterface,REFIID,riid, LPVOID*,ppvObj)
     679#ifdef ICOM_MSVTABLE_COMPAT
     680    long dummyRTTI1;
     681    long dummyRTTI2;
     682#endif /* ICOM_MSVTABLE_COMPAT */
     683
    803684#else /* ICOM_CINTERFACE */
    804685struct IUnknown {
    805 #ifndef ICOM_VIRTUAL_METHODS
    806     union {
    807         const void* lpvtbl;
    808         HRESULT (CALLBACK *fnQueryInterface)(IUnknown* me, REFIID riid, LPVOID* ppvObj);
    809     } t;
    810     inline int QueryInterface(REFIID a, LPVOID* b) { return ((IUnknown*)t.lpvtbl)->t.fnQueryInterface(this,a,b); }
    811 #else /* ICOM_VIRTUAL_METHODS */
     686
     687#endif /* ICOM_CINTERFACE */
     688
    812689    ICOM_METHOD2(HRESULT,QueryInterface,REFIID,riid, LPVOID*,ppvObj)
    813 #endif /* ICOM_VIRTUAL_METHODS */
    814 #endif /* ICOM_CINTERFACE */
    815690    ICOM_METHOD (ULONG,AddRef)
    816691    ICOM_METHOD (ULONG,Release)
     
    824699#define IUnknown_Release(p)            ICOM_CALL (Release,p)
    825700#endif
    826 
    827701
    828702/*****************************************************************************
     
    908782#define IMalloc_DidAlloc(p,a)   ICOM_CALL1(DidAlloc,p,a)
    909783#define IMalloc_HeapMinimize(p) ICOM_CALL (HeapMinimize,p)
    910 
    911 #ifndef __WINE__
    912 /* Duplicated for WINELIB */
    913 /*** IUnknown methods ***/
    914 #define IMalloc_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
    915 #define IMalloc_AddRef(p)             ICOM_CALL (AddRef,p)
    916 #define IMalloc_Release(p)            ICOM_CALL (Release,p)
    917 /*** IMalloc methods ***/
    918 #define IMalloc_Alloc(p,a)      ICOM_CALL1(Alloc,p,a)
    919 #define IMalloc_Realloc(p,a,b)  ICOM_CALL2(Realloc,p,a,b)
    920 #define IMalloc_Free(p,a)       ICOM_CALL1(Free,p,a)
    921 #define IMalloc_GetSize(p,a)    ICOM_CALL1(GetSize,p,a)
    922 #define IMalloc_DidAlloc(p,a)   ICOM_CALL1(DidAlloc,p,a)
    923 #define IMalloc_HeapMinimize(p) ICOM_CALL (HeapMinimize,p)
    924 #endif
    925784#endif
    926785
     
    993852HRESULT WINAPI CoRevokeClassObject(DWORD dwRegister);
    994853
    995 /*****************************************************************************
    996  * COM Server dll - exports
     854void WINAPI CoUninitialize16(void);
     855void WINAPI CoUninitialize(void);
     856
     857/*****************************************************************************
     858 *      COM Server dll - exports
    997859 */
    998860HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv);
  • trunk/include/win/wine/obj_cache.h

    r94 r640  
    1 /* $Id: obj_cache.h,v 1.3 1999-06-10 16:21:52 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to structured data storage.
     
    1211#include "winbase.h"
    1312
     13#ifdef __cplusplus
     14extern "C" {
     15#endif /* defined(__cplusplus) */
    1416
    1517/*****************************************************************************
     
    113115#define IOleCacheControl_OnStop(p)                  ICOM_CALL (OnStop,p)
    114116#endif
    115                                  
    116117
     118
     119#ifdef __cplusplus
     120} /* extern "C" */
     121#endif /* defined(__cplusplus) */
    117122
    118123#endif /* __WINE_WINE_OBJ_CONTROL_H */
  • trunk/include/win/wine/obj_channel.h

    r94 r640  
    1 /* $Id: obj_channel.h,v 1.3 1999-06-10 16:21:53 achimha Exp $ */
    21/*
    32 * Defines undocumented Microsoft COM interfaces and APIs seemingly related to some 'channel' notion.
     
    87
    98#include "wine/obj_base.h"
     9
     10#ifdef __cplusplus
     11extern "C" {
     12#endif /* defined(__cplusplus) */
    1013
    1114/*****************************************************************************
     
    184187#endif
    185188
     189#ifdef __cplusplus
     190} /* extern "C" */
     191#endif /* defined(__cplusplus) */
    186192
    187193#endif /* __WINE_WINE_OBJ_CHANNEL_H */
  • trunk/include/win/wine/obj_clientserver.h

    r94 r640  
    1 /* $Id: obj_clientserver.h,v 1.3 1999-06-10 16:21:53 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to client/server aspects.
     
    87
    98#include "wine/obj_base.h"
     9
     10#ifdef __cplusplus
     11extern "C" {
     12#endif /* defined(__cplusplus) */
    1013
    1114/*****************************************************************************
     
    257260HRESULT WINAPI CoResumeClassObjects(void);
    258261
     262#ifdef __cplusplus
     263} /* extern "C" */
     264#endif /* defined(__cplusplus) */
    259265
    260266#endif /* __WINE_WINE_OBJ_CLIENTSERVER_H */
  • trunk/include/win/wine/obj_commdlgbrowser.h

    r94 r640  
    1 /* $Id: obj_commdlgbrowser.h,v 1.3 1999-06-10 16:21:54 achimha Exp $ */
    21/************************************************************
    32 *    ICommDlgBrowser
    43 */
    54
    6 #ifndef __WINE_WINE_OBJ_ICOMMDLGBROWSER_H
    7 #define __WINE_WINE_OBJ_ICOMMDLGBROWSER_H
     5#ifndef __WINE_WINE_OBJ_COMMDLGBROWSER_H
     6#define __WINE_WINE_OBJ_COMMDLGBROWSER_H
    87
    98#include "winbase.h"
     
    1110#include "wine/obj_base.h"
    1211#include "wine/obj_shellview.h"
     12
     13#ifdef __cplusplus
     14extern "C" {
     15#endif /* defined(__cplusplus) */
    1316
    1417DEFINE_SHLGUID(IID_ICommDlgBrowser,     0x000214F1L, 0, 0);
     
    4245#endif
    4346
     47#ifdef __cplusplus
     48} /* extern "C" */
     49#endif /* defined(__cplusplus) */
    4450
    45 #endif /* __WINE_WINE_OBJ_ICOMMDLGBROWSER_H */
     51#endif /* __WINE_WINE_OBJ_COMMDLGBROWSER_H */
  • trunk/include/win/wine/obj_connection.h

    r94 r640  
    1 /* $Id: obj_connection.h,v 1.3 1999-06-10 16:21:54 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to structured data storage.
     
    1211#include "winbase.h"
    1312
     13#ifdef __cplusplus
     14extern "C" {
     15#endif /* defined(__cplusplus) */
    1416
    1517/*****************************************************************************
     
    146148#endif
    147149                               
    148 
    149 
     150#ifdef __cplusplus
     151} /* extern "C" */
     152#endif /* defined(__cplusplus) */
    150153
    151154#endif /* __WINE_WINE_OBJ_CONTROL_H */
  • trunk/include/win/wine/obj_contextmenu.h

    r94 r640  
    1 /* $Id: obj_contextmenu.h,v 1.3 1999-06-10 16:21:54 achimha Exp $ */
    21/************************************************************
    32 *    IContextMenu
    43 */
    54
    6 #ifndef __WINE_WINE_OBJ_ICONTEXTMENU_H
    7 #define __WINE_WINE_OBJ_ICONTEXTMENU_H
     5#ifndef __WINE_WINE_OBJ_CONTEXTMENU_H
     6#define __WINE_WINE_OBJ_CONTEXTMENU_H
    87
    98#include "winbase.h"
    109#include "winuser.h"
    1110#include "wine/obj_base.h"
     11
     12#ifdef __cplusplus
     13extern "C" {
     14#endif /* defined(__cplusplus) */
    1215
    1316DEFINE_SHLGUID(IID_IContextMenu,        0x000214E4L, 0, 0);
     
    126129#endif
    127130
     131#ifdef __cplusplus
     132} /* extern "C" */
     133#endif /* defined(__cplusplus) */
    128134
    129 #endif /* __WINE_WINE_OBJ_ICONTEXTMENU_H */
     135#endif /* __WINE_WINE_OBJ_CONTEXTMENU_H */
  • trunk/include/win/wine/obj_control.h

    r94 r640  
    1 /* $Id: obj_control.h,v 1.3 1999-06-10 16:21:54 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to structured data storage.
     
    1211#include "winbase.h"
    1312#include "wine/obj_oleaut.h" /* for DISPID */
     13
     14#ifdef __cplusplus
     15extern "C" {
     16#endif /* defined(__cplusplus) */
    1417
    1518/*****************************************************************************
     
    465468#endif
    466469
    467 
     470#ifdef __cplusplus
     471} /* extern "C" */
     472#endif /* defined(__cplusplus) */
    468473
    469474#endif /* __WINE_WINE_OBJ_CONTROL_H */
  • trunk/include/win/wine/obj_dataobject.h

    r94 r640  
    1 /* $Id: obj_dataobject.h,v 1.3 1999-06-10 16:21:54 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to IDataObject.
     
    98#define __WINE_WINE_OBJ_DATAOBJECT_H
    109
     10#if defined(__cplusplus) && !defined(NONAMELESSUNION)
     11#define DUMMYUNIONNAME
     12#else /* defined(__cplusplus) && !defined(NONAMELESSUNION) */
     13#define DUMMYUNIONNAME u
     14#endif /* defined(__cplusplus) && !defined(NONAMELESSUNION) */
     15
    1116#ifdef __cplusplus
    12 #define DUMMY_UNION_NAME
    13 #else
    14 #define DUMMY_UNION_NAME u
    15 #endif
     17extern "C" {
     18#endif /* defined(__cplusplus) */
    1619
    1720/*****************************************************************************
     
    98101} TYMED;
    99102 
     103typedef struct tagRemSTGMEDIUM
     104{
     105        DWORD tymed;
     106        DWORD dwHandleType;
     107        unsigned long pData;
     108        unsigned long pUnkForRelease;
     109        unsigned long cbData;
     110        byte data[1];
     111} RemSTGMEDIUM;
     112
    100113/* dataobject as answer to a request */
    101114struct STGMEDIUM
     
    110123        IStream *pstm;
    111124        IStorage *pstg;
    112     } DUMMY_UNION_NAME;
     125    } DUMMYUNIONNAME;
    113126    IUnknown *pUnkForRelease;
    114127};   
     
    323336HRESULT WINAPI CreateDataCache(LPUNKNOWN pUnkOuter, REFCLSID rclsid, REFIID iid, LPVOID* ppv);
    324337
     338#ifdef __cplusplus
     339} /* extern "C"  */
     340#endif /* defined(__cplusplus) */
    325341
    326342#endif /* __WINE_WINE_OBJ_DATAOBJECT_H */
  • trunk/include/win/wine/obj_dockingwindowframe.h

    r94 r640  
    1 /* $Id: obj_dockingwindowframe.h,v 1.3 1999-06-10 16:21:54 achimha Exp $ */
    21/************************************************************
    32 *    IDockingWindowFrame
    43 */
    54
    6 #ifndef __WINE_WINE_OBJ_IDOCKINGWINDOWFRAME_H
    7 #define __WINE_WINE_OBJ_IDOCKINGWINDOWFRAME_H
     5#ifndef __WINE_WINE_OBJ_DOCKINGWINDOWFRAME_H
     6#define __WINE_WINE_OBJ_DOCKINGWINDOWFRAME_H
    87
    98#include "winbase.h"
     
    1110#include "wine/obj_base.h"
    1211#include "wine/obj_inplace.h"
     12
     13#ifdef __cplusplus
     14extern "C" {
     15#endif /* defined(__cplusplus) */
    1316
    1417typedef struct IDockingWindowFrame IDockingWindowFrame, *LPDOCKINGWINDOWFRAME;
     
    4144#endif
    4245
     46#ifdef __cplusplus
     47} /* extern "C" */
     48#endif /* defined(__cplusplus) */
    4349
    44 #endif /* __WINE_WINE_OBJ_IDOCKINGWINDOWFRAME_H */
     50#endif /* __WINE_WINE_OBJ_DOCKINGWINDOWFRAME_H */
  • trunk/include/win/wine/obj_dragdrop.h

    r94 r640  
    1 /* $Id: obj_dragdrop.h,v 1.3 1999-06-10 16:21:54 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to OLE Drag and Drop.
     
    1110#include "wine/obj_base.h"
    1211#include "wine/obj_dataobject.h"
     12
     13#ifdef __cplusplus
     14extern "C" {
     15#endif /* defined(__cplusplus) */
    1316
    1417/*****************************************************************************
     
    4447    ICOM_METHOD1(HRESULT, GiveFeedback, DWORD, dwEffect)
    4548#define IDropSource_IMETHODS \
    46   ICOM_INHERITS(IDropSource,IUnknown)
     49        IUnknown_IMETHODS \
     50        IDropSource_METHODS
    4751ICOM_DEFINE(IDropSource,IUnknown)
    4852#undef ICOM_INTERFACE
     
    5357#define IDropSource_AddRef(p)             ICOM_CALL (AddRef,p)
    5458#define IDropSource_Release(p)            ICOM_CALL (Release,p)
    55 /*** IDropTarget methods ***/
     59/*** IDropSource methods ***/
    5660#define IDropSource_QueryContinueDrag(p,a,b) ICOM_CALL2(QueryContinueDrag,p,a,b)
    5761#define IDropSource_GiveFeedback(p,a)        ICOM_CALL1(GiveFeedback,p,a)
     
    6872    ICOM_METHOD4(HRESULT, Drop, IDataObject*, pDataObject, DWORD, grfKeyState, POINTL, pt, DWORD*, pdwEffect)
    6973#define IDropTarget_IMETHODS \
    70   ICOM_INHERITS(IDropTarget,IUnknown)
     74        IUnknown_IMETHODS \
     75        IDropTarget_METHODS
    7176ICOM_DEFINE(IDropTarget,IUnknown)
    7277#undef ICOM_INTERFACE
     
    8489#endif
    8590
     91#ifdef __cplusplus
     92} /* extern "C" */
     93#endif /* defined(__cplusplus) */
     94
    8695#endif /*  __WINE_WINE_OBJ_DRAGDROP_H */
    8796
  • trunk/include/win/wine/obj_enumidlist.h

    r94 r640  
    1 /* $Id: obj_enumidlist.h,v 1.3 1999-06-10 16:21:54 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to EnumIDList
     
    1312#include "winbase.h"
    1413
     14#ifdef __cplusplus
     15extern "C" {
     16#endif /* defined(__cplusplus) */
     17
    1518/*****************************************************************************
    1619 * Predeclare the interfaces
     
    2427    ICOM_METHOD1(HRESULT, Skip, ULONG, celt) \
    2528    ICOM_METHOD (HRESULT, Reset) \
    26     ICOM_METHOD1(HRESULT, Clone, IEnumIDList**, ppenum) \
    27     ICOM_METHOD2(BOOL, CreateEnumList, LPCSTR,, DWORD,) \
    28     ICOM_METHOD1(BOOL, AddToEnumList, LPITEMIDLIST,) \
    29     ICOM_METHOD (BOOL, DeleteList)
     29    ICOM_METHOD1(HRESULT, Clone, IEnumIDList**, ppenum)
    3030#define IEnumIDList_IMETHODS \
    3131    IUnknown_IMETHODS \
     
    4444#define IEnumIDList_Reset(p)                    ICOM_CALL(Reset,p)
    4545#define IEnumIDList_Clone(p,a)                  ICOM_CALL1(Clone,p,a)
    46 #define IEnumIDList_CreateEnumList(p,a,b)       ICOM_CALL2(CreateEnumList,p,a,b)
    47 #define IEnumIDList_AddToEnumList(p,a)          ICOM_CALL1(AddToEnumList,p,a)
    48 #define IEnumIDList_DeleteList(p)               ICOM_CALL(DeleteList,p)
    4946#endif
    5047
     48#ifdef __cplusplus
     49} /* extern "C" */
     50#endif /* defined(__cplusplus) */
     51
    5152#endif /* __WINE_WINE_OBJ_ENUMIDLIST_H */
  • trunk/include/win/wine/obj_extracticon.h

    r94 r640  
    1 /* $Id: obj_extracticon.h,v 1.3 1999-06-10 16:21:54 achimha Exp $ */
    21/************************************************************
    32 *    IExtractIconA
    43 */
    54
    6 #ifndef __WINE_WINE_OBJ_IEXTRACTICONA_H
    7 #define __WINE_WINE_OBJ_IEXTRACTICONA_H
     5#ifndef __WINE_WINE_OBJ_EXTRACTICON_H
     6#define __WINE_WINE_OBJ_EXTRACTICON_H
    87
    98#include "winbase.h"
    109#include "winuser.h"
    1110#include "wine/obj_base.h"
     11
     12#ifdef __cplusplus
     13extern "C" {
     14#endif /* defined(__cplusplus) */
    1215
    1316DEFINE_SHLGUID(IID_IExtractIconA,       0x000214EBL, 0, 0);
     
    4851#define IExtractIcon        IExtractIconA
    4952
    50 #endif /* __WINE_WINE_OBJ_IEXTRACTICONA_H */
     53#ifdef __cplusplus
     54} /* extern "C" */
     55#endif /* defined(__cplusplus) */
     56
     57#endif /* __WINE_WINE_OBJ_EXTRACTICON_H */
     58
  • trunk/include/win/wine/obj_inplace.h

    r94 r640  
    1 /* $Id: obj_inplace.h,v 1.3 1999-06-10 16:21:54 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to structured data storage.
     
    1312#include "winuser.h"
    1413#include "wine/obj_moniker.h"
     14
     15#ifdef __cplusplus
     16extern "C" {
     17#endif /* defined(__cplusplus) */
    1518
    1619/*****************************************************************************
     
    9598} BINDSPEED;
    9699
     100typedef enum tagOLECONTF
     101{
     102        OLECONTF_EMBEDDINGS = 1,
     103        OLECONTF_LINKS = 2,
     104        OLECONTF_OTHERS = 4,
     105        OLECONTF_OLNYUSER = 8,
     106        OLECONTF_ONLYIFRUNNING = 16
     107} OLECONTF;
     108 
    97109typedef HGLOBAL HOLEMENU;
    98110typedef LPRECT LPBORDERWIDTHS;
     
    421433#define ICOM_INTERFACE IOleItemContainer
    422434#define IOleItemContainer_METHODS \
    423         ICOM_METHOD5(HRESULT,GetObject, LPOLESTR,pszItem, DWORD,dwSpeedNeeded, IBindCtx*,pbc, REFIID,riid, void*,ppvObject) \
    424         ICOM_METHOD4(HRESULT,GetObjectStorage, LPOLESTR,pszItem, IBindCtx*,pbc, REFIID,riid, void*,ppvStorage) \
     435        ICOM_METHOD5(HRESULT,GetObject, LPOLESTR,pszItem, DWORD,dwSpeedNeeded, IBindCtx*,pbc, REFIID,riid, void**,ppvObject) \
     436        ICOM_METHOD4(HRESULT,GetObjectStorage, LPOLESTR,pszItem, IBindCtx*,pbc, REFIID,riid, void**,ppvStorage) \
    425437        ICOM_METHOD1(HRESULT,IsRunning, LPOLESTR,pszItem)
    426438#define IOleItemContainer_IMETHODS \
     
    483495#endif
    484496
     497#ifdef __cplusplus
     498} /* extern "C" */
     499#endif /* defined(__cplusplus) */
    485500
    486501#endif /* __WINE_WINE_OBJ_INPLACE_H */
  • trunk/include/win/wine/obj_marshal.h

    r94 r640  
    1 /* $Id: obj_marshal.h,v 1.3 1999-06-10 16:21:54 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs that allow an interface to
     
    109#include "wine/obj_base.h"
    1110#include "wine/obj_storage.h"
     11
     12#ifdef __cplusplus
     13extern "C" {
     14#endif /* defined(__cplusplus) */
    1215
    1316/*****************************************************************************
     
    109112HRESULT WINAPI CoUnmarshalInterface(LPSTREAM pStm, REFIID riid, LPVOID* ppv);
    110113
     114#ifdef __cplusplus
     115} /* extern "C" */
     116#endif /* defined(__cplusplus) */
    111117
    112118#endif /* __WINE_WINE_OBJ_MARSHAL_H */
  • trunk/include/win/wine/obj_misc.h

    r94 r640  
    1 /* $Id: obj_misc.h,v 1.3 1999-06-10 16:21:55 achimha Exp $ */
    21/*
    32 * Defines miscellaneous COM interfaces and APIs defined in objidl.h.
     
    1110
    1211#include "wine/obj_base.h"
     12
     13#ifdef __cplusplus
     14extern "C" {
     15#endif /* defined(__cplusplus) */
    1316
    1417/*****************************************************************************
     
    186189                                  ULONG         cmq,
    187190                                  MULTI_QI*     pResults);
     191#ifdef __cplusplus
     192} /*  extern "C" */
     193#endif /* defined(__cplusplus) */
    188194
    189195#endif /* __WINE_WINE_OBJ_MISC_H */
  • trunk/include/win/wine/obj_moniker.h

    r94 r640  
    1 /* $Id: obj_moniker.h,v 1.3 1999-06-10 16:21:55 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to the moniker functionality.
     
    98#include "wine/obj_storage.h"
    109#include "wine/obj_misc.h"
     10
     11#ifdef __cplusplus
     12extern "C" {
     13#endif /* defined(__cplusplus) */
    1114
    1215/*****************************************************************************
     
    342345#endif
    343346
    344 HRESULT WINAPI GetRunningObjectTable(DWORD reserved, LPVOID *pprot);
    345 HRESULT WINAPI GetRunningObjectTable16(DWORD reserved, LPVOID *pprot);
     347HRESULT WINAPI GetRunningObjectTable(DWORD reserved, LPRUNNINGOBJECTTABLE *pprot);
     348HRESULT WINAPI GetRunningObjectTable16(DWORD reserved, LPRUNNINGOBJECTTABLE *pprot);
    346349
    347350/*****************************************************************************
     
    355358HRESULT WINAPI CoGetInstanceFromIStorage(COSERVERINFO* pServerInfo, CLSID* pClsid, IUnknown* punkOuter, DWORD dwClsCtx, IStorage* pstg, DWORD dwCount, MULTI_QI* pResults);
    356359
     360#ifdef __cplusplus
     361} /* extern "C" */
     362#endif /* defined(__cplusplus) */
    357363
    358364#endif /* __WINE_WINE_OBJ_MONIKER_H */
  • trunk/include/win/wine/obj_oleaut.h

    r94 r640  
    1 /* $Id: obj_oleaut.h,v 1.3 1999-06-10 16:21:55 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to OLE automation support.
     
    6362 * Automation data types
    6463 */
    65 #ifdef __cplusplus
    66 #define DUMMY_UNION_NAME
    67 #else
    68 #define DUMMY_UNION_NAME u
    69 #endif
     64#if defined(__cplusplus) && !defined(NONAMELESSUNION)
     65#define DUMMYUNIONNAME
     66#else /* defined(__cplusplus) && !defined(NONAMELESSUNION) */
     67#define DUMMYUNIONNAME u
     68#endif /* defined(__cplusplus) && !defined(NONAMELESSUNION) */
    7069
    7170/*****************************************************************
     
    110109        CC_MPWPASCAL  = CC_MPWCDECL + 1,
    111110        CC_MAX    = CC_MPWPASCAL + 1
    112 } CALLCONV;
     111} CALLCONV_OLE2;
    113112
    114113typedef CY CURRENCY;
     
    134133        WORD wReserved2;
    135134        WORD wReserved3;
    136         union /*DUMMY_UNION_NAME*/
     135        union /* DUMMYUNIONNAME */
    137136        {
    138137        /* By value. */
     
    179178                IDispatch** ppdispVal;
    180179                SAFEARRAY** pparray;
    181         } DUMMY_UNION_NAME;
     180        } DUMMYUNIONNAME;
    182181};
    183182
     
    200199#define DISPID_DESTRUCTOR ( -7 )
    201200#define DISPID_COLLECT  ( -8 )
     201
     202#define MEMBERID_NIL DISPID_UNKNOWN
     203
     204#define IMPLTYPEFLAG_FDEFAULT         (0x1)
     205#define IMPLTYPEFLAG_FSOURCE          (0x2)
     206#define IMPLTYPEFLAG_FRESTRICTED      (0x4)
     207#define IMPLTYPEFLAG_FDEFAULTVTABLE   (0x8)
    202208
    203209typedef struct  tagDISPPARAMS
     
    240246} PARAMDESC;
    241247
     248#define PARAMFLAG_NONE          (0x00)
     249#define PARAMFLAG_FIN           (0x01)
     250#define PARAMFLAG_FOUT          (0x02)
     251#define PARAMFLAG_FLCID         (0x04)
     252#define PARAMFLAG_FRETVAL       (0x08)
     253#define PARAMFLAG_FOPT          (0x10)
     254#define PARAMFLAG_FHASDEFAULT   (0x20)
     255
     256
    242257typedef struct tagTYPEDESC
    243258{
     
    246261                struct tagARRAYDESC *lpadesc;
    247262                HREFTYPE hreftype;
    248         } DUMMY_UNION_NAME;
     263        } DUMMYUNIONNAME;
    249264        VARTYPE vt;
    250265} TYPEDESC;
     
    256271                IDLDESC idldesc;
    257272                PARAMDESC paramdesc;
    258         } DUMMY_UNION_NAME;
     273        } DUMMYUNIONNAME;
    259274} ELEMDESC, *LPELEMDESC;
    260275
     
    286301        WORD cImplTypes;
    287302        WORD cbSizeVft;
    288         WORD cAlignment;
     303        WORD cbAlignment;
    289304        WORD wTypeFlags;
    290305        WORD wMajorVerNum;
     
    324339        ELEMDESC *lprgelemdescParam;
    325340        FUNCKIND funckind;
    326         INVOKEKIND invKind;
    327         CALLCONV callconv;
     341        INVOKEKIND invkind;
     342        CALLCONV_OLE2 callconv;
    328343        SHORT cParams;
    329344        SHORT cParamsOpt;
     
    349364                ULONG oInst;
    350365                VARIANT *lpvarValue;
    351         } DUMMY_UNION_NAME;
     366        } DUMMYUNIONNAME;
    352367        ELEMDESC elemdescVar;
    353368        WORD wVarFlags;
     
    500515 */
    501516
     517
     518typedef struct  tagCUSTDATAITEM {
     519    GUID guid;
     520    VARIANTARG varValue;
     521} CUSTDATAITEM, *LPCUSTDATAITEM;
     522
     523typedef struct  tagCUSTDATA {
     524    INT cCustData;
     525    LPCUSTDATAITEM prgCustData; /* count cCustdata */
     526} CUSTDATA, *LPCUSTDATA;
     527
     528
     529
    502530/*****************************************************************************
    503531 * IDispatch interface
     
    538566        ICOM_METHOD2(HRESULT,GetVarDesc, UINT,index, VARDESC**,ppVarDesc) \
    539567        ICOM_METHOD4(HRESULT,GetNames, MEMBERID,memid, BSTR*,rgBstrNames, UINT,cMaxNames, UINT*,pcNames) \
    540         ICOM_METHOD2(HRESULT,GetRefTypeOfImplType, UINT,index, INT*,pImplTypeFlags) \
    541         ICOM_METHOD2(HRESULT,GetImplTypeFlags, UINT,index, INT*,pImplTypeFlags) \
     568        ICOM_METHOD2(HRESULT,GetRefTypeOfImplType, UINT,index, HREFTYPE*, pRefType) \
     569        ICOM_METHOD2(HRESULT,GetImplTypeFlags, UINT,index, INT*,pImplTypeFlags)\
    542570        ICOM_METHOD3(HRESULT,GetIDsOfNames, LPOLESTR*,rgszNames, UINT,cNames, MEMBERID*,pMemId) \
    543571        ICOM_METHOD7(HRESULT,Invoke, PVOID,pvInstance, MEMBERID,memid, WORD,wFlags, DISPPARAMS*,pDispParams, VARIANT*,pVarResult, EXCEPINFO*,pExcepInfo, UINT*,puArgErr) \
     
    551579        ICOM_METHOD1(HRESULT,ReleaseTypeAttr, TYPEATTR*,pTypeAttr) \
    552580        ICOM_METHOD1(HRESULT,ReleaseFuncDesc, FUNCDESC*,pFuncDesc) \
    553         ICOM_METHOD1(HRESULT,ReleaseVarDesc, VARDESC*,pVarDesc)
     581        ICOM_METHOD1(HRESULT,ReleaseVarDesc, VARDESC*,pVarDesc)\
     582\
     583\
     584        /* itypeinfo2 methods */\
     585        ICOM_METHOD1(HRESULT, GetTypeKind, TYPEKIND*, pTypeKind) \
     586        ICOM_METHOD1(HRESULT, GetTypeFlags, UINT*, pTypeFlags) \
     587        ICOM_METHOD3(HRESULT, GetFuncIndexOfMemId, MEMBERID, memid, INVOKEKIND,\
     588                invKind, UINT*, pFuncIndex) \
     589        ICOM_METHOD2(HRESULT, GetVarIndexOfMemId, MEMBERID, memid, UINT*, \
     590                pVarIndex) \
     591        ICOM_METHOD2(HRESULT, GetCustData, REFGUID, guid, VARIANT*, pVarVal) \
     592        ICOM_METHOD3(HRESULT, GetFuncCustData, UINT, index, REFGUID, guid,\
     593                VARIANT*, pVarVal) \
     594        ICOM_METHOD4(HRESULT, GetParamCustData, UINT, indexFunc, UINT,\
     595                indexParam, REFGUID, guid, VARIANT*, pVarVal) \
     596        ICOM_METHOD3(HRESULT, GetVarCustData, UINT, index, REFGUID, guid,\
     597                VARIANT*, pVarVal) \
     598        ICOM_METHOD3(HRESULT, GetImplTypeCustData, UINT, index, REFGUID, guid,\
     599                VARIANT*, pVarVal) \
     600        ICOM_METHOD5(HRESULT, GetDocumentation2, MEMBERID, memid, LCID, lcid,\
     601                BSTR*, pbstrHelpString, INT*, pdwHelpStringContext,\
     602                BSTR*, pbstrHelpStringDll) \
     603        ICOM_METHOD1(HRESULT, GetAllCustData, CUSTDATA*, pCustData) \
     604        ICOM_METHOD2(HRESULT, GetAllFuncCustData, UINT, index, CUSTDATA*,\
     605                pCustData)\
     606        ICOM_METHOD3(HRESULT, GetAllParamCustData, UINT, indexFunc, UINT,\
     607                indexParam, CUSTDATA*, pCustData) \
     608        ICOM_METHOD2(HRESULT, GetAllVarCustData, UINT, index, CUSTDATA*,\
     609                pCustData) \
     610        ICOM_METHOD2(HRESULT, GetAllImplTypeCustData, UINT, index, CUSTDATA*,\
     611                pCustData)
     612       
    554613#define ITypeInfo_IMETHODS \
    555614        IUnknown_IMETHODS \
     
    564623#define ITypeInfo_Release(p)                    ICOM_CALL (Release,p)
    565624/*** ITypeInfo methods ***/
    566 #define ITypeInfo_GetTypeAttr(p,a,b)            ICOM_CALL2(GetTypeAttr,p,a,b)
     625#define ITypeInfo_GetTypeAttr(p,a)              ICOM_CALL1(GetTypeAttr,p,a)
    567626#define ITypeInfo_GetTypeComp(p,a)              ICOM_CALL1(GetTypeComp,p,a)
    568627#define ITypeInfo_GetFuncDesc(p,a,b)            ICOM_CALL2(GetFuncDesc,p,a,b)
    569628#define ITypeInfo_GetVarDesc(p,a,b)             ICOM_CALL2(GetVarDesc,p,a,b)
    570629#define ITypeInfo_GetNames(p,a,b,c,d)           ICOM_CALL4(GetNames,p,a,b,c,d)
    571 #define ITypeInfo_GetRefTypeOfImplType(p,a,b)   ICOM_CALL2(GetRefTypeOfImplType,p,a)
     630#define ITypeInfo_GetRefTypeOfImplType(p,a,b)   ICOM_CALL2(GetRefTypeOfImplType,p,a,b)
    572631#define ITypeInfo_GetImplTypeFlags(p,a,b)       ICOM_CALL2(GetImplTypeFlags,p,a,b)
    573632#define ITypeInfo_GetIDsOfNames(p,a,b,c)        ICOM_CALL3(GetImplTypeFlags,p,a,b,c)
     
    591650#define ICOM_INTERFACE ITypeLib
    592651#define ITypeLib_METHODS \
    593         ICOM_METHOD (HRESULT,GetTypeInfoCount) \
     652        ICOM_METHOD (UINT,GetTypeInfoCount) \
    594653        ICOM_METHOD2(HRESULT,GetTypeInfo, UINT,index, ITypeInfo**,ppTInfo) \
    595654        ICOM_METHOD2(HRESULT,GetTypeInfoType, UINT,index, TYPEKIND*,pTKind) \
     
    600659        ICOM_METHOD3(HRESULT,IsName, LPOLESTR,szNameBuf, ULONG,lHashVal, BOOL*,bfName) \
    601660        ICOM_METHOD5(HRESULT,FindName, LPOLESTR,szNameBuf, ULONG,lHashVal, ITypeInfo**,ppTInfo, MEMBERID*,rgMemId, USHORT*,pcFound) \
    602         ICOM_METHOD1(HRESULT,ReleaseTLibAttr, TLIBATTR*,pTLibAttr)
     661        ICOM_METHOD1(VOID,ReleaseTLibAttr, TLIBATTR*,pTLibAttr)\
     662\
     663        ICOM_METHOD2(HRESULT,GetCustData, REFGUID,guid, VARIANT*, pVarVal)\
     664        ICOM_METHOD2(HRESULT, GetLibStatistics, UINT *,pcUniqueNames, \
     665                        UINT*, pcchUniqueNames) \
     666        ICOM_METHOD5(HRESULT, GetDocumentation2, INT, index, LCID, lcid,\
     667                BSTR*, pbstrHelpString, INT*, pdwHelpStringContext,\
     668                BSTR*, pbstrHelpStringDll)\
     669        ICOM_METHOD1(HRESULT, GetAllCustData, CUSTDATA *, pCustData)
     670       
    603671#define ITypeLib_IMETHODS \
    604672        IUnknown_IMETHODS \
  • trunk/include/win/wine/obj_olefont.h

    r94 r640  
    1 /* $Id: obj_olefont.h,v 1.3 1999-06-10 16:21:55 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to OLE font support.
     
    1110#include "wine/obj_base.h"
    1211#include "wingdi.h"     /* TEXTMETRIC*/
     12
     13#ifdef __cplusplus
     14extern "C" {
     15#endif /* defined(__cplusplus) */
    1316
    1417/*****************************************************************************
     
    5356  ICOM_METHOD1(HRESULT, SetHdc, HDC, hdc)     
    5457#define IFont_IMETHODS \
    55   ICOM_INHERITS(IFont,IUnknown)
     58        IUnknown_IMEHTODS \
     59        IFont_METHODS
    5660ICOM_DEFINE(IFont,IUnknown)
    5761#undef ICOM_INTERFACE
     
    114118#endif
    115119
     120#ifdef __cplusplus
     121} /* extern "C" */
     122#endif /* defined(__cplusplus) */
    116123
    117124#endif /* __WINE_WINE_OBJ_OLEFONT_H */
  • trunk/include/win/wine/obj_oleobj.h

    r94 r640  
    1 /* $Id: obj_oleobj.h,v 1.3 1999-06-10 16:21:55 achimha Exp $ */
    21/*
    32 * Defines IOleObject COM and other oleidl.h interfaces
     
    1312#include "winuser.h"
    1413#include "wine/obj_base.h"
     14
     15#ifdef __cplusplus
     16extern "C" {
     17#endif /* defined(__cplusplus) */
    1518
    1619/*****************************************************************************
     
    4144        OLEMISC_ACTIVATEWHENVISIBLE = 0x100,
    4245        OLEMISC_RENDERINGISDEVICEINDEPENDENT = 0x200,
    43         OLEMISC_INVISABLEATRUNTIME = 0x400,
     46        OLEMISC_INVISIBLEATRUNTIME = 0x400,
    4447        OLEMISC_ALWAYSRUN = 0x800,
    4548        OLEMISC_ACTSLIKEBUTTON = 0x1000,
     
    111114#define IOleObject_Release(p)                 ICOM_CALL (Release,p)
    112115/*** IOleObject methods ***/
    113 #define IOleObject_SetClientSite(p,a,b,c,d) ICOM_CALL1(SetClientSite,p,a)
     116#define IOleObject_SetClientSite(p,a)      ICOM_CALL1(SetClientSite,p,a)
    114117#define IOleObject_GetClientSite(p,a,b)     ICOM_CALL1(GetClientSite,p,a)
    115118#define IOleObject_SetHostNames(p,a,b)      ICOM_CALL2(SetHostNames,p,a,b)
     
    158161#define IOleAdviseHolder_Release(p)                 ICOM_CALL (Release,p)
    159162/*** IOleAdviseHolder methods ***/
    160 #define IOleAdviseHolder_Advise(p,a,b)              ICOM_CALL2(UpdateCache,p,a,b)
    161 #define IOleAdviseHolder_Unadvise(p,a)              ICOM_CALL1(OnStop,p,a)
    162 #define IOleAdviseHolder_EnumAdvise(p,a)            ICOM_CALL1(OnStop,p,a)
    163 #define IOleAdviseHolder_SendOnRename(p,a)          ICOM_CALL1(OnStop,p,a)
    164 #define IOleAdviseHolder_SendOnSave(p)              ICOM_CALL (OnStop,p)
    165 #define IOleAdviseHolder_SendOnClose(p)             ICOM_CALL (OnStop,p)
     163#define IOleAdviseHolder_Advise(p,a,b)              ICOM_CALL2(Advise,p,a,b)
     164#define IOleAdviseHolder_Unadvise(p,a)              ICOM_CALL1(Unadvise,p,a)
     165#define IOleAdviseHolder_EnumAdvise(p,a)            ICOM_CALL1(EnumAdvise,p,a)
     166#define IOleAdviseHolder_SendOnRename(p,a)          ICOM_CALL1(SendOnRename,p,a)
     167#define IOleAdviseHolder_SendOnSave(p)              ICOM_CALL (SendOnSave,p)
     168#define IOleAdviseHolder_SendOnClose(p)             ICOM_CALL (SendOnClose,p)
    166169#endif
    167170                                 
     
    193196#define IEnumOLEVERB_Clone(p,a)             ICOM_CALL1(Clone,p,a)
    194197#endif
     198
     199#ifdef __cplusplus
     200} /* extern "C" */
     201#endif /* defined(__cplusplus) */
    195202                                 
    196203#endif /* __WINE_WINE_OBJ_OLEOBJ_H */
  • trunk/include/win/wine/obj_oleundo.h

    r94 r640  
    1 /* $Id: obj_oleundo.h,v 1.3 1999-06-10 16:21:55 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs from ocidl.h which pertain to Undo/Redo
     
    1110
    1211#include "winbase.h"
     12
     13#ifdef __cplusplus
     14extern "C" {
     15#endif /* defined(__cplusplus) */
    1316
    1417/*****************************************************************************
     
    113116#define IPointerInactive_METHODS \
    114117        ICOM_METHOD1(HRESULT,GetActivationPolicy, DWORD*,pdwPolicy) \
    115         ICOM_METHOD4(HRESULT,OnInactiveMoveMouse, LPCRECT,pRectBounds, LONG,x, LONG,y, DWORD,grfKeyState) \
     118        ICOM_METHOD4(HRESULT,OnInactiveMouseMove, LPCRECT,pRectBounds, LONG,x, LONG,y, DWORD,grfKeyState) \
    116119        ICOM_METHOD5(HRESULT,OnInactiveSetCursor, LPCRECT,pRectBounds, LONG,x, LONG,y, DWORD,dwMouseMsg, BOOL,fSetAlways)
    117120#define IPointerInactive_IMETHODS \
     
    296299#endif
    297300
    298 
     301#ifdef __cplusplus
     302} /* extern "C" */
     303#endif /* defined(__cplusplus) */
    299304
    300305#endif /* __WINE_WINE_OBJ_OLEUNDO_H */
  • trunk/include/win/wine/obj_oleview.h

    r94 r640  
    1 /* $Id: obj_oleview.h,v 1.3 1999-06-10 16:21:55 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to ViewObject
     
    1211#include "winbase.h"
    1312
     13#ifdef __cplusplus
     14extern "C" {
     15#endif /* defined(__cplusplus) */
    1416
    1517/*****************************************************************************
     
    3537#define ICOM_INTERFACE IViewObject
    3638#define IViewObject_METHODS \
    37         ICOM_METHOD10(HRESULT,Draw, DWORD,dwDrawAspect, LONG,lindex, void*,pvAspect, DVTARGETDEVICE*,ptd, HDC,hdcTargetDev, HDC,hdcDraw, LPCRECTL,lprcBounds, LPCRECTL,lprcWBounds, IVO_ContCallback, pfnContinue, DWORD,dwContinue)
     39        ICOM_METHOD10(HRESULT,Draw, DWORD,dwDrawAspect, LONG,lindex, void*,pvAspect, DVTARGETDEVICE*,ptd, HDC,hdcTargetDev, HDC,hdcDraw, LPCRECTL,lprcBounds, LPCRECTL,lprcWBounds, IVO_ContCallback, pfnContinue, DWORD,dwContinue) \
    3840        ICOM_METHOD6(HRESULT,GetColorSet, DWORD,dwDrawAspect, LONG,lindex, void*,pvAspect, DVTARGETDEVICE*,ptd, HDC,hicTargetDevice, LOGPALETTE**,ppColorSet) \
    3941        ICOM_METHOD4(HRESULT,Freeze, DWORD,dwDrawAspect, LONG,lindex, void*,pvAspect, DWORD*,pdwFreeze) \
     
    9193#endif
    9294
    93 
     95#ifdef __cplusplus
     96} /* extern "C" */
     97#endif /* defined(__cplusplus) */
    9498
    9599#endif /* __WINE_WINE_OBJ_OLEVIEW_H */
  • trunk/include/win/wine/obj_picture.h

    r94 r640  
    1 /* $Id: obj_picture.h,v 1.3 1999-06-10 16:21:55 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to OLE picture support.
     
    1110#include "windows.h"
    1211#include "windef.h"
     12
     13#ifdef __cplusplus
     14extern "C" {
     15#endif /* defined(__cplusplus) */
    1316
    1417/*****************************************************************************
     
    104107#endif
    105108
    106 
     109#ifdef __cplusplus
     110} /* extern "C" */
     111#endif /* defined(__cplusplus) */
    107112
    108113#endif /* __WINE_WINE_OBJ_PICTURE_H */
  • trunk/include/win/wine/obj_property.h

    r94 r640  
    1 /* $Id: obj_property.h,v 1.3 1999-06-10 16:21:55 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs from ocidl.h related to property
     
    1211#include "winbase.h"
    1312#include "wine/obj_oleaut.h" /* for DISPID */
     13
     14#ifdef __cplusplus
     15extern "C" {
     16#endif /* defined(__cplusplus) */
    1417
    1518/*****************************************************************************
     
    431434#endif
    432435
     436#ifdef __cplusplus
     437} /* extern "C" */
     438#endif /* defined(__cplusplus) */
    433439
    434440#endif /* __WINE_WINE_OBJ_PROPERTY_H */
  • trunk/include/win/wine/obj_propertystorage.h

    r94 r640  
    1 /* $Id: obj_propertystorage.h,v 1.3 1999-06-10 16:21:56 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to saving properties to file.
     
    109#include "wine/obj_storage.h"
    1110
     11#ifdef __cplusplus
     12extern "C" {
     13#endif /* defined(__cplusplus) */
     14
    1215/*****************************************************************************
    1316 * Predeclare the interfaces
     
    3336typedef struct tagSTATPROPSTG STATPROPSTG;
    3437
     38extern const FMTID FMTID_SummaryInformation;
     39extern const FMTID FMTID_DocSummaryInformation;
     40extern const FMTID FMTID_UserDefinedProperties;
    3541
    3642/*****************************************************************************
     
    134140    ICOM_METHOD1(HRESULT,Clone, IEnumSTATPROPSETSTG**,ppenum)
    135141#define IEnumSTATPROPSETSTG_IMETHODS \
    136     ICOM_INHERITS(IEnumSTATPROPSETSTG,IUnknown)
     142                IUnknown_IMETHODS \
     143                IEnumSTATPROPSETSTG_METHODS
    137144ICOM_DEFINE(IEnumSTATPROPSETSTG,IUnknown)
    138145#undef ICOM_INTERFACE
     
    161168    ICOM_METHOD1(HRESULT,Clone, IEnumSTATPROPSTG**,ppenum)
    162169#define IEnumSTATPROPSTG_IMETHODS \
    163     ICOM_INHERITS(IEnumSTATPROPSTG,IUnknown)
     170                IUnknown_IMETHODS \
     171                IEnumSTATPROPSTG_METHODS
    164172ICOM_DEFINE(IEnumSTATPROPSTG,IUnknown)
    165173#undef ICOM_INTERFACE
     
    188196    ICOM_METHOD1(HRESULT,Enum,   IEnumSTATPROPSETSTG**,ppenum)
    189197#define IPropertySetStorage_IMETHODS \
    190     ICOM_INHERITS(IPropertySetStorage,IUnknown)
     198                IUnknown_IMETHODS \
     199                IPropertySetStorage_METHODS
    191200ICOM_DEFINE(IPropertySetStorage,IUnknown)
    192201#undef ICOM_INTERFACE
     
    409418    ICOM_METHOD1(HRESULT,Stat,                STATPROPSETSTG*,pstatpsstg)
    410419#define IPropertyStorage_IMETHODS \
    411     ICOM_INHERITS(IPropertyStorage,IUnknown)
     420                IUnknown_IMETHODS \
     421                IPropertyStorage_METHODS
    412422ICOM_DEFINE(IPropertyStorage,IUnknown)
    413423#undef ICOM_INTERFACE
     
    433443#endif
    434444
     445#ifdef __cplusplus
     446} /* extern "C" */
     447#endif /* defined(__cplusplus) */
    435448
    436449#endif /* __WINE_WINE_OBJ_PROPERTYSTORAGE_H */
  • trunk/include/win/wine/obj_shellbrowser.h

    r94 r640  
    1 /* $Id: obj_shellbrowser.h,v 1.3 1999-06-10 16:21:56 achimha Exp $ */
    21/************************************************************
    32 *    IShellBrowser
    43 */
    54
    6 #ifndef __WINE_WINE_OBJ_ISHELLBROWSER_H
    7 #define __WINE_WINE_OBJ_ISHELLBROWSER_H
     5#ifndef __WINE_WINE_OBJ_SHELLBROWSER_H
     6#define __WINE_WINE_OBJ_SHELLBROWSER_H
    87
    98#include "winbase.h"
     
    1312#include "wine/obj_shellview.h" /* IShellView */
    1413#include "commctrl.h"           /* TBBUTTON */
     14
     15#ifdef __cplusplus
     16extern "C" {
     17#endif /* defined(__cplusplus) */
    1518
    1619/* it's ok commented out, see obj_shellview.h
     
    104107#endif
    105108
     109#ifdef __cplusplus
     110} /* extern "C" */
     111#endif /* defined(__cplusplus) */
    106112
    107 #endif /* __WINE_WINE_OBJ_ISHELLBROWSER_H */
     113#endif /* __WINE_WINE_OBJ_SHELLBROWSER_H */
  • trunk/include/win/wine/obj_shellextinit.h

    r94 r640  
    1 /* $Id: obj_shellextinit.h,v 1.3 1999-06-10 16:21:56 achimha Exp $ */
    21/************************************************************
    32 *    IShellExtInit
    43 */
    54
    6 #ifndef __WINE_WINE_OBJ_ISHELLEXTINIT_H
    7 #define __WINE_WINE_OBJ_ISHELLEXTINIT_H
     5#ifndef __WINE_WINE_OBJ_SHELLEXTINIT_H
     6#define __WINE_WINE_OBJ_SHELLEXTINIT_H
    87
    98#include "winbase.h"
     
    1110#include "wine/obj_base.h"
    1211#include "wine/obj_dataobject.h"
     12
     13#ifdef __cplusplus
     14extern "C" {
     15#endif /* defined(__cplusplus) */
    1316
    1417typedef struct  IShellExtInit IShellExtInit, *LPSHELLEXTINIT;
     
    3134#endif
    3235
     36#ifdef __cplusplus
     37} /* extern "C" */
     38#endif /* defined(__cplusplus) */
    3339
    34 #endif /* __WINE_WINE_OBJ_ISHELLEXTINIT_H */
     40#endif /* __WINE_WINE_OBJ_SHELLEXTINIT_H */
  • trunk/include/win/wine/obj_shellfolder.h

    r94 r640  
    1 /* $Id: obj_shellfolder.h,v 1.3 1999-06-10 16:21:56 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to IShellFolder
     
    1413#include "winbase.h"
    1514#include "shell.h"
     15
     16#ifdef __cplusplus
     17extern "C" {
     18#endif /* defined(__cplusplus) */
    1619
    1720/****************************************************************************
     
    8083#define SFGAO_READONLY          0x00040000L     /* read-only */
    8184#define SFGAO_GHOSTED           0x00080000L     /* ghosted icon */
     85#define SFGAO_HIDDEN            0x00080000L     /* hidden object */
    8286#define SFGAO_DISPLAYATTRMASK   0x000F0000L
    8387#define SFGAO_FILESYSANCESTOR   0x10000000L     /* It contains file system folder */
     
    8892#define SFGAO_VALIDATE          0x01000000L     /* invalidate cached information */
    8993#define SFGAO_REMOVABLE         0x02000000L     /* is this removeable media? */
     94#define SFGAO_BROWSABLE         0x08000000L     /* is in-place browsable */
     95#define SFGAO_NONENUMERATED     0x00100000L     /* is a non-enumerated object */
     96#define SFGAO_NEWCONTENT        0x00200000L     /* should show bold in explorer tree */
    9097
    9198/************************************************************************
     
    180187 * IPersistFolder interface
    181188 */
     189
     190DEFINE_GUID (CLSID_SFMyComp,0x20D04FE0,0x3AEA,0x1069,0xA2,0xD8,0x08,0x00,0x2B,0x30,0x30,0x9D);
     191DEFINE_GUID (CLSID_SFINet,  0x871C5380,0x42A0,0x1069,0xA2,0xEA,0x08,0x00,0x2B,0x30,0x30,0x9D);
     192DEFINE_GUID (CLSID_SFFile,  0xF3364BA0,0x65B9,0x11CE,0xA9,0xBA,0x00,0xAA,0x00,0x4A,0xE8,0x37);
     193
    182194#define ICOM_INTERFACE IPersistFolder
    183195#define IPersistFolder_METHODS \
     
    200212#endif
    201213
     214#ifdef __cplusplus
     215} /* extern "C" */
     216#endif /* defined(__cplusplus) */
    202217
    203218#endif /* __WINE_WINE_OBJ_SHELLLINK_H */
  • trunk/include/win/wine/obj_shelllink.h

    r94 r640  
    1 /* $Id: obj_shelllink.h,v 1.3 1999-06-10 16:21:56 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to IShellLink.
     
    1211#include "winbase.h"
    1312#include "shell.h"
     13
     14#ifdef __cplusplus
     15extern "C" {
     16#endif /* defined(__cplusplus) */
    1417
    1518/*****************************************************************************
     
    149152#endif
    150153
     154#ifdef __cplusplus
     155} /* extern "C" */
     156#endif /* defined(__cplusplus) */
     157
    151158#endif /* __WINE_WINE_OBJ_SHELLLINK_H */
  • trunk/include/win/wine/obj_shellview.h

    r94 r640  
    1 /* $Id: obj_shellview.h,v 1.3 1999-06-10 16:21:56 achimha Exp $ */
    21/************************************************************
    32 *    IShellView
    43 */
    54
    6 #ifndef __WINE_WINE_OBJ_ISHELLVIEW_H
    7 #define __WINE_WINE_OBJ_ISHELLVIEW_H
     5#ifndef __WINE_WINE_OBJ_SHELLVIEW_H
     6#define __WINE_WINE_OBJ_SHELLVIEW_H
    87
    98#include "winbase.h"
     
    1312#include "wine/obj_shellfolder.h"
    1413#include "prsht.h"      /* LPFNADDPROPSHEETPAGE */
     14
     15#ifdef __cplusplus
     16extern "C" {
     17#endif /* defined(__cplusplus) */
    1518
    1619/****************************************************************************
     
    141144#endif
    142145
     146#ifdef __cplusplus
     147} /* extern "C" */
     148#endif /* defined(__cplusplus) */
    143149
    144 #endif /* __WINE_WINE_OBJ_ISHELLVIEW_H */
     150#endif /* __WINE_WINE_OBJ_SHELLVIEW_H */
  • trunk/include/win/wine/obj_storage.h

    r94 r640  
    1 /* $Id: obj_storage.h,v 1.3 1999-06-10 16:21:56 achimha Exp $ */
    21/*
    32 * Defines the COM interfaces and APIs related to structured data storage.
     
    109#include "winnt.h"
    1110#include "wine/obj_base.h"
     11
     12#ifdef __cplusplus
     13extern "C" {
     14#endif /* defined(__cplusplus) */
    1215
    1316/*****************************************************************************
     
    281284#define ICOM_INTERFACE IPersist
    282285#define IPersist_METHODS \
    283     ICOM_CMETHOD1(HRESULT,GetClassID, CLSID*,pClassID)
     286    ICOM_METHOD1(HRESULT,GetClassID, CLSID*,pClassID)
    284287#define IPersist_IMETHODS \
    285288    IUnknown_IMETHODS \
     
    303306#define ICOM_INTERFACE IPersistFile
    304307#define IPersistFile_METHODS \
    305     ICOM_CMETHOD (HRESULT,IsDirty) \
     308    ICOM_METHOD (HRESULT,IsDirty) \
    306309    ICOM_METHOD2 (HRESULT,Load,          LPCOLESTR,pszFileName, DWORD,dwMode) \
    307310    ICOM_METHOD2 (HRESULT,Save,          LPCOLESTR,pszFileName, BOOL,fRemember) \
    308311    ICOM_METHOD1 (HRESULT,SaveCompleted, LPCOLESTR,pszFileName) \
    309     ICOM_CMETHOD1(HRESULT,GetCurFile,    LPOLESTR*,ppszFileName)
     312    ICOM_METHOD1(HRESULT,GetCurFile,    LPOLESTR*,ppszFileName)
    310313#define IPersistFile_IMETHODS \
    311314    IPersist_IMETHODS \
     
    692695HRESULT WINAPI StgIsStorageFile16(LPCOLESTR16 fn);
    693696HRESULT WINAPI StgIsStorageFile(LPCOLESTR fn);
     697HRESULT WINAPI StgIsStorageILockBytes(ILockBytes *plkbyt);
    694698
    695699HRESULT WINAPI StgOpenStorage16(const OLECHAR16* pwcsName,IStorage16* pstgPriority,DWORD grfMode,SNB16 snbExclude,DWORD reserved,IStorage16**ppstgOpen);
     
    712716BOOL WINAPI CoFileTimeToDosDateTime(FILETIME* lpFileTime, WORD* lpDosDate, WORD* lpDosTime);
    713717
     718#ifdef __cplusplus
     719} /* extern "C" */
     720#endif /* defined(__cplusplus) */
    714721
    715722#endif /* __WINE_WINE_OBJ_STORAGE_H */
  • trunk/include/win/wine/shell16.h

    r94 r640  
    1 /* $Id: shell16.h,v 1.3 1999-06-10 16:21:56 achimha Exp $ */
     1#ifndef __WINE_WINE_SHELL16_H
     2#define __WINE_WINE_SHELL16_H
    23
    3 #ifndef _SHELL16_H
    4 #define _SHELL16_H
     4#include "windef.h"
    55
    66BOOL16      WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM);
     
    88
    99
    10 #endif /* _SHELL16_H */
     10#endif /* __WINE_WINE_SHELL16_H */
  • trunk/include/win/wine/w32skrnl.h

    r94 r640  
    1 /* $Id: w32skrnl.h,v 1.3 1999-06-10 16:21:56 achimha Exp $ */
    2 #ifndef _W32SKRNL_H
    3 #define _W32SKRNL_H
     1#ifndef __WINE_WINE_W32SKRNL_H
     2#define __WINE_WINE_W32SKRNL_H
     3
    44#include "windef.h"
     5
    56LPSTR WINAPI GetWin32sDirectory(void);
    67DWORD WINAPI RtlNtStatusToDosError(DWORD error);
    7 #endif /* _W32SKRNL_H */
     8
     9#endif /* __WINE_WINE_W32SKRNL_H */
  • trunk/include/win/wine/winbase16.h

    r94 r640  
    1 /* $Id: winbase16.h,v 1.3 1999-06-10 16:21:56 achimha Exp $ */
    2 #ifndef _INCLUDE_WINE_WINBASE16_H
    3 #define _INCLUDE_WINE_WINBASE16_H
     1#ifndef __WINE_WINE_WINBASE16_H
     2#define __WINE_WINE_WINBASE16_H
    43
    54#include "windef.h"
     
    9594HTASK16     WINAPI LockCurrentTask16(BOOL16);
    9695VOID        WINAPI OldYield16(void);
     96VOID        WINAPI WIN32_OldYield16(void);
    9797VOID        WINAPI PostEvent16(HTASK16);
    9898WORD        WINAPI PrestoChangoSelector16(WORD,WORD);
     
    104104VOID        WINAPI SwitchStackTo16(WORD,WORD,WORD);
    105105BOOL16      WINAPI WaitEvent16(HTASK16);
    106 VOID        WINAPI WriteOutProfiles16(VOID);
     106VOID        WINAPI WriteOutProfiles16(void);
    107107VOID        WINAPI hmemcpy16(LPVOID,LPCVOID,LONG);
    108108#endif  /* __WINE__ */
     
    114114ATOM        WINAPI DeleteAtom16(ATOM);
    115115BOOL16      WINAPI DeleteFile16(LPCSTR);
     116void        WINAPI ExitKernel16(void);
    116117void        WINAPI FatalAppExit16(UINT16,LPCSTR);
    117118ATOM        WINAPI FindAtom16(SEGPTR);
     
    129130INT16       WINAPI GetModuleFileName16(HINSTANCE16,LPSTR,INT16);
    130131UINT16      WINAPI GetPrivateProfileInt16(LPCSTR,LPCSTR,INT16,LPCSTR);
     132INT16       WINAPI GetPrivateProfileSection16(LPCSTR,LPSTR,UINT16,LPCSTR);
    131133WORD        WINAPI GetPrivateProfileSectionNames16(LPSTR,UINT16,LPCSTR);
    132134INT16       WINAPI GetPrivateProfileString16(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT16,LPCSTR);
     135BOOL16      WINAPI GetPrivateProfileStruct16(LPCSTR,LPCSTR,LPVOID,UINT16,LPCSTR);
    133136FARPROC16   WINAPI GetProcAddress16(HMODULE16,SEGPTR);
    134137UINT16      WINAPI GetProfileInt16(LPCSTR,LPCSTR,INT16);
     138INT16       WINAPI GetProfileSection16(LPCSTR,LPSTR,UINT16);
     139WORD        WINAPI GetProfileSectionNames16(LPSTR,WORD);
    135140INT16       WINAPI GetProfileString16(LPCSTR,LPCSTR,LPCSTR,LPSTR,UINT16);
    136141UINT16      WINAPI GetSystemDirectory16(LPSTR,UINT16);
     
    200205BOOL16      WINAPI WritePrivateProfileSection16(LPCSTR,LPCSTR,LPCSTR);
    201206BOOL16      WINAPI WritePrivateProfileStruct16(LPCSTR,LPCSTR,LPVOID,UINT16,LPCSTR);
     207BOOL16      WINAPI WriteProfileSection16(LPCSTR,LPCSTR);
    202208DWORD       WINAPI GetSelectorBase(WORD);
    203209WORD        WINAPI SetSelectorBase(WORD,DWORD);
     
    211217UINT16      WINAPI WIN16_lread(HFILE16,SEGPTR,UINT16);
    212218
    213 #endif /* _INCLUDE_WINE_WINBASE16_H */
     219#endif /* __WINE_WINE_WINBASE16_H */
  • trunk/include/win/wine/winesound.h

    r94 r640  
    1 /* $Id: winesound.h,v 1.3 1999-06-10 16:21:57 achimha Exp $ */
    2 #ifndef _WINE_SOUND_H
    3 #define _WINE_SOUND_H
     1#ifndef __WINE_WINE_WINESOUND_H
     2#define __WINE_WINE_WINESOUND_H
    43
    54#include "windef.h"
     
    3736DWORD       WINAPI WaitSoundState(DWORD);
    3837
    39 #endif /* _WINE_SOUND_H */
     38#endif /* __WINE_WINE_WINESOUND_H */
  • trunk/include/win/wine/winestring.h

    r94 r640  
    1 /* $Id: winestring.h,v 1.4 1999-06-10 16:21:57 achimha Exp $ */
    2 #ifndef _INCLUDE_WINE_STRINGS_H
    3 #define _INCLUDE_WINE_STRINGS_H
     1#ifndef __WINE_WINE_WINESTRING_H
     2#define __WINE_WINE_WINESTRING_H
    43
    54#include "windef.h"
    65
    76INT16       WINAPI WideCharToLocal16(LPSTR,LPWSTR,INT16);
    8 INT       WINAPI WideCharToLocal(LPSTR,LPWSTR,INT);
     7INT         WINAPI WideCharToLocal(LPSTR,LPWSTR,INT);
    98INT16       WINAPI LocalToWideChar16(LPWSTR,LPSTR,INT16);
    10 INT       WINAPI LocalToWideChar(LPWSTR,LPSTR,INT);
    11 INT       WINAPI lstrncmpA(LPCSTR,LPCSTR,INT);
    12 INT       WINAPI lstrncmpW(LPCWSTR,LPCWSTR,INT);
    13 INT       WINAPI lstrncmpiA(LPCSTR,LPCSTR,INT);
    14 INT       WINAPI lstrncmpiW(LPCWSTR,LPCWSTR,INT);
    15 //LPWSTR      WINAPI lstrcpyAtoW(LPWSTR,LPCSTR);
    16 //LPSTR       WINAPI lstrcpyWtoA(LPSTR,LPCWSTR);
    17 //LPWSTR      WINAPI lstrcpynAtoW(LPWSTR,LPCSTR,INT);
    18 //LPSTR       WINAPI lstrcpynWtoA(LPSTR,LPCWSTR,INT);
    19 #endif /* _INCLUDE_WINE_STRINGS_H */
     9INT         WINAPI LocalToWideChar(LPWSTR,LPSTR,INT);
     10#include <heapstring.h>
     11
     12#endif /* __WINE_WINE_WINESTRING_H */
  • trunk/include/win/wine/winuser16.h

    r94 r640  
    1 /* $Id: winuser16.h,v 1.3 1999-06-10 16:21:57 achimha Exp $ */
    2 #ifndef __WINE_WINUSER16_H
    3 #define __WINE_WINUSER16_H
    4 
    5 #include "windef.h"
    6 #include "winbase.h"
    7 #include "winuser.h"
     1#ifndef __WINE_WINE_WINUSER16_H
     2#define __WINE_WINE_WINUSER16_H
     3
     4#include "winuser.h" /* winuser.h needed for MSGBOXCALLBACK */
     5                     /* wingdi.h needed for COLORREF */
     6#include "wine/wingdi16.h"
     7
    88
    99#include "pshpack1.h"
     10
     11typedef struct tagCOMSTAT16
     12{
     13    BYTE   status;
     14    UINT16 cbInQue WINE_PACKED;
     15    UINT16 cbOutQue WINE_PACKED;
     16} COMSTAT16,*LPCOMSTAT16;
     17
     18typedef struct tagDCB16
     19{
     20    BYTE   Id;
     21    UINT16 BaudRate WINE_PACKED;
     22    BYTE   ByteSize;
     23    BYTE   Parity;
     24    BYTE   StopBits;
     25    UINT16 RlsTimeout;
     26    UINT16 CtsTimeout;
     27    UINT16 DsrTimeout;
     28
     29    unsigned fBinary        :1;
     30    unsigned fRtsDisable    :1;
     31    unsigned fParity        :1;
     32    unsigned fOutxCtsFlow   :1;
     33    unsigned fOutxDsrFlow   :1;
     34    unsigned fDummy         :2;
     35    unsigned fDtrDisable    :1;
     36
     37    unsigned fOutX          :1;
     38    unsigned fInX           :1;
     39    unsigned fPeChar        :1;
     40    unsigned fNull          :1;
     41    unsigned fChEvt         :1;
     42    unsigned fDtrflow       :1;
     43    unsigned fRtsflow       :1;
     44    unsigned fDummy2        :1;
     45
     46    CHAR   XonChar;
     47    CHAR   XoffChar;
     48    UINT16 XonLim;
     49    UINT16 XoffLim;
     50    CHAR   PeChar;
     51    CHAR   EofChar;
     52    CHAR   EvtChar;
     53    UINT16 TxDelay WINE_PACKED;
     54} DCB16, *LPDCB16;
     55
    1056
    1157  /* SetWindowPlacement() struct */
     
    211257} CREATESTRUCT16, *LPCREATESTRUCT16;
    212258
     259typedef struct
     260{
     261    HDC16   hdc;
     262    BOOL16  fErase;
     263    RECT16  rcPaint;
     264    BOOL16  fRestore;
     265    BOOL16  fIncUpdate;
     266    BYTE    rgbReserved[16];
     267} PAINTSTRUCT16, *LPPAINTSTRUCT16;
     268
    213269typedef struct
    214270{
     
    258314    SEGPTR  lppos;
    259315} NCCALCSIZE_PARAMS16, *LPNCCALCSIZE_PARAMS16;
     316
     317typedef struct {
     318        UINT16          cbSize;
     319        INT16           iBorderWidth;
     320        INT16           iScrollWidth;
     321        INT16           iScrollHeight;
     322        INT16           iCaptionWidth;
     323        INT16           iCaptionHeight;
     324        LOGFONT16       lfCaptionFont;
     325        INT16           iSmCaptionWidth;
     326        INT16           iSmCaptionHeight;
     327        LOGFONT16       lfSmCaptionFont;
     328        INT16           iMenuWidth;
     329        INT16           iMenuHeight;
     330        LOGFONT16       lfMenuFont;
     331        LOGFONT16       lfStatusFont;
     332        LOGFONT16       lfMessageFont;
     333} NONCLIENTMETRICS16,*LPNONCLIENTMETRICS16;
    260334
    261335  /* Journalling hook structure */
     
    677751HWND16      WINAPI GetLastActivePopup16(HWND16);
    678752HMENU16     WINAPI GetMenu16(HWND16);
     753DWORD       WINAPI GetMenuContextHelpId16(HMENU16);
    679754INT16       WINAPI GetMenuItemCount16(HMENU16);
    680755UINT16      WINAPI GetMenuItemID16(HMENU16,INT16);
     
    877952
    878953
    879 #endif /* __WINE_WINUSER16_H */
     954#endif /* __WINE_WINE_WINUSER16_H */
Note: See TracChangeset for help on using the changeset viewer.