20 lines
482 B
C++
20 lines
482 B
C++
|
/***
|
||
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
||
|
|
||
|
File: auWin32Utils.hpp
|
||
|
Date: 2022-2-1
|
||
|
Author: Reece
|
||
|
***/
|
||
|
#pragma once
|
||
|
|
||
|
#if defined(AURORA_IS_MODERNNT_DERIVED) && (defined(_WINDOWS_) || defined(_OTHER_MS_MAIN_HEADER_GUARDS_HERE))
|
||
|
static auline void AuWin32CloseHandle(HANDLE &handle)
|
||
|
{
|
||
|
HANDLE local;
|
||
|
|
||
|
if ((local = AuExchange(handle, INVALID_HANDLE_VALUE)) != INVALID_HANDLE_VALUE)
|
||
|
{
|
||
|
CloseHandle(local);
|
||
|
}
|
||
|
}
|
||
|
#endif
|