chsvlib
chsv helper source code

◆ DECLARE_AND_DEFINE_COM_QUERY_INTERFACE_BEGIN

#define DECLARE_AND_DEFINE_COM_QUERY_INTERFACE_BEGIN

#include <chsvwinutil.h>

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

Defines a beginning of the QueryInterface declaration and inplace definition.

Unlike DEFINE_COM_QUERY_INTERFACE_BEGIN, this directive must be placed within the implementing class body.

For the example code see COM help directives.