From 8c4603c73675958efc960fbd4bb599a2909d106a Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 16 Jan 2023 14:52:43 +0100 Subject: Source codes --- ComLightLib/comLightClient.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ComLightLib/comLightClient.h (limited to 'ComLightLib/comLightClient.h') diff --git a/ComLightLib/comLightClient.h b/ComLightLib/comLightClient.h new file mode 100644 index 0000000..3174c92 --- /dev/null +++ b/ComLightLib/comLightClient.h @@ -0,0 +1,23 @@ +#pragma once +#include "comLightCommon.h" +#include "client/CComPtr.hpp" +#include "utils/typeTraits.hpp" + +namespace ComLight +{ + namespace details + { + template + inline constexpr void** castDoublePointerToVoid( T** pp ) + { + static_assert( pointersAssignable(), "IID_PPV_ARGS macro should be used with IUnknown interfaces" ); + return reinterpret_cast( pp ); + } + } +} + +#ifdef IID_PPV_ARGS +#undef IID_PPV_ARGS +#endif + +#define IID_PPV_ARGS( pp ) decltype( **pp )::iid, ::ComLight::details::castDoublePointerToVoid( pp ) \ No newline at end of file -- cgit v1.2.3