Closed kozooh closed 1 year ago
While I'm trying to build a solution (all four projects) in release mode I'm having hundreds of C2760 errors.
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\include\objbase.h(239): error C2760: syntax error: unexpected token 'identifier', expected 'type specifier'
ADDITIONAL INFO
Line 239: static_cast<IUnknown*>(*pp); // make sure everyone derives from IUnknown
static_cast<IUnknown*>(*pp); // make sure everyone derives from IUnknown
Contex code from objbase.h
// IID_PPV_ARGS(ppType) // ppType is the variable of type IType that will be filled // // RESULTS in: IID_IType, ppvType // will create a compiler error if wrong level of indirection is used. // extern "C++" { template<typename T> void** IID_PPV_ARGS_Helper(T** pp) { static_cast<IUnknown*>(*pp); // make sure everyone derives from IUnknown return reinterpret_cast<void**>(pp); } } #define IID_PPV_ARGS(ppType) __uuidof(**(ppType)), IID_PPV_ARGS_Helper(ppType) #else #define interface struct #define STDMETHOD(method) HRESULT (STDMETHODCALLTYPE * method) #define STDMETHOD_(type,method) type (STDMETHODCALLTYPE * method) #define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE * method) #define STDMETHODV_(type,method) type (STDMETHODVCALLTYPE * method) #define IFACEMETHOD(method) __override STDMETHOD(method) #define IFACEMETHOD_(type,method) __override STDMETHOD_(type,method) #define IFACEMETHODV(method) __override STDMETHODV(method) #define IFACEMETHODV_(type,method) __override STDMETHODV_(type,method) #if !defined(BEGIN_INTERFACE) #if defined(_MPPC_) #define BEGIN_INTERFACE void *b; #define END_INTERFACE #else #define BEGIN_INTERFACE #define END_INTERFACE #endif #endif #define PURE #define THIS_ INTERFACE FAR* This, #define THIS INTERFACE FAR* This #ifdef CONST_VTABLE #undef CONST_VTBL #define CONST_VTBL const #define DECLARE_INTERFACE(iface) typedef interface iface { \ const struct iface##Vtbl FAR* lpVtbl; \ } iface; \ typedef const struct iface##Vtbl iface##Vtbl; \ const struct iface##Vtbl #else #undef CONST_VTBL #define CONST_VTBL #define DECLARE_INTERFACE(iface) typedef interface iface { \ struct iface##Vtbl FAR* lpVtbl; \ } iface; \ typedef struct iface##Vtbl iface##Vtbl; \ struct iface##Vtbl #endif #define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface) #define DECLARE_INTERFACE_IID(iface, iid) DECLARE_INTERFACE(iface) #define DECLARE_INTERFACE_IID_(iface, baseiface, iid) DECLARE_INTERFACE_(iface, baseiface) #endif
While I'm trying to build a solution (all four projects) in release mode I'm having hundreds of C2760 errors.
ADDITIONAL INFO
Line 239:
static_cast<IUnknown*>(*pp); // make sure everyone derives from IUnknown
Contex code from objbase.h