Please feel free to modify the license header in the file appropriately. The class is copied from 1. https://github.com/microsoft/DirectXShaderCompiler/blob/main/include/dxc/WinAdapter.h 2. https://github.com/microsoft/DirectXShaderCompiler/blob/main/lib/DxcSupport/WinAdapter.cpp
From 9d4ae75daf2b915b14c56c331becb3e5000cb8c9 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath <nathbap...@gmail.com> Date: Mon, 1 Jul 2024 07:47:40 +0000 Subject: [PATCH] headers: Add CHandle class in atlbase.h
Required for Required for https://github.com/microsoft/DirectXShaderCompiler Signed-off-by: Biswapriyo Nath <nathbap...@gmail.com> --- mingw-w64-headers/include/atlbase.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 mingw-w64-headers/include/atlbase.h diff --git a/mingw-w64-headers/include/atlbase.h b/mingw-w64-headers/include/atlbase.h new file mode 100644 index 0000000..2f5f149 --- /dev/null +++ b/mingw-w64-headers/include/atlbase.h @@ -0,0 +1,29 @@ +/* + * This file is distributed under the University of Illinois Open Source License. + * Classes copied from DirectXShaderCompiler project: CHandle + */ + +#ifndef __ATLBASE_H__ +#define __ATLBASE_H__ + +#include <ole2.h> + +class CHandle { +public: + CHandle(HANDLE h) : m_h(h) { + } + ~CHandle() { + if (m_h != NULL) { + CloseHandle(m_h); + m_h = NULL; + } + } + operator HANDLE() const throw() { + return m_h; + } + +private: + HANDLE m_h; +}; + +#endif /* __ATLBASE_H__ */ -- 2.45.2
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public