diff options
Diffstat (limited to 'ComLightLib/comLightClient.h')
| -rw-r--r-- | ComLightLib/comLightClient.h | 23 |
1 files changed, 23 insertions, 0 deletions
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<typename T> + inline constexpr void** castDoublePointerToVoid( T** pp ) + { + static_assert( pointersAssignable<IUnknown, T>(), "IID_PPV_ARGS macro should be used with IUnknown interfaces" ); + return reinterpret_cast<void**>( 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 |
