chsvlib
chsv helper source code

◆ DEFINE_COM_QUERY_INTERFACE_BEGIN

#define DEFINE_COM_QUERY_INTERFACE_BEGIN (   classname)

#include <chsvwinutil.h>

Value:
virtual HRESULT __stdcall classname::QueryInterface(REFIID refiid, void** ppv) {\
if (refiid == ::IID_IUnknown) *ppv = static_cast<::IUnknown*> (this);

Defines a beginning of the QueryInterface definition located outside of a body of the class, specified by classname.

The class should contain the corresponding declaration of the method, which can be given by the DECLARE_COM_QUERY_INTERFACE directive.

For declaration and inplace definition of the method use the DECLARE_AND_DEFINE_COM_QUERY_INTERFACE_BEGIN directive instead.

For the example code see COM help directives.