//typedef GUID IID; MIDL_INTERFACE(x) struct __declspec(uuid(x)) __declspec(novtable)

//
// IID_IUnknown and all other system IIDs are provided in UUID.LIB
// Link that library in with your proxies, clients and servers
//
/*
typedef struct _GUID {          // size is 16
DWORD Data1;
WORD   Data2;
WORD   Data3;
BYTE  Data4[8];
} GUID;
*/
//typedef GUID IID;
EXTERN_C const IID IID_IUnknown;

#if defined(__cplusplus) && !defined(CINTERFACE)

#if (_MSC_VER >= 1200)	// VC6 or greater
extern "C++"
{
#endif
//#define MIDL_INTERFACE(x)   struct __declspec(uuid(x)) __declspec(novtable)
    MIDL_INTERFACE("00000000-0000-0000-C000-000000000046")
	IUnknown
    {
    public:
        BEGIN_INTERFACE
        virtual HRESULT STDMETHODCALLTYPE QueryInterface( 
            /* [in] */ REFIID riid,
            /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject) = 0;
        
        virtual ULONG STDMETHODCALLTYPE AddRef( void) = 0;
        
        virtual ULONG STDMETHODCALLTYPE Release( void) = 0;

#if (_MSC_VER >= 1200)	// VC6 or greater
		template 
		HRESULT STDMETHODCALLTYPE QueryInterface(Q** pp)
		{
			return QueryInterface(__uuidof(Q), (void**)pp);
		}
#endif    

        END_INTERFACE
    };

你可能感兴趣的:(com,interface,struct,library,system,byte,class)