Available on crate feature
kernel
only.Expand description
RAII implementation for various resources, which automatically perform cleanup routines when the object goes out of scope.
The guards are named after the functions they call.
Structs§
- RAII implementation for clipboard which automatically calls
CloseClipboard
when the object goes out of scope. - RAII implementation for
HDESK
which automatically callsCloseDesktop
when the object goes out of scope. - RAII implementation for a
Handle
which automatically callsCloseHandle
when the object goes out of scope. - RAII implementation for
PROCESS_INFORMATION
which automatically callsCloseHandle
onhProcess
andhThread
fields when the object goes out of scope. - RAII implementation for
HSC
which automatically callsCloseServiceHandle
when the object goes out of scope. - RAII implementation for
HSERVICE
which automatically callsCloseServiceHandle
when the object goes out of scope. - CloseThemeDataGuard
uxtheme
RAII implementation forHTHEME
which automatically callsCloseThemeData
when the object goes out of scope. - RAII implementation which automatically calls
CoLockObjectExternal
to unlock the COM pointer. - RAII implementation which automatically calls
CoTaskMemFree
when the object goes out of scope. - RAII implementation which automatically calls
CoUninitialize
when the object goes out of scope. - RAII implementation for a
GdiObject
which automatically callsDeleteObject
when the object goes out of scope. - RAII implementation for
HPALETTE
which automatically callsDeleteObject
when the object goes out of scope. - RAII implementation for
HEVENTLOG
which automatically callsDeregisterEventSource
when the object goes out of scope. - RAII implementation for
HACCEL
which automatically callsDestroyAcceleratorTable
when the object goes out of scope. - RAII implementation for
HCURSOR
which automatically callsDestroyCursor
when the object goes out of scope. - DestroyIconGuard
user
RAII implementation forHICON
which automatically callsDestroyIcon
when the object goes out of scope. - DestroyIconShfiGuard
shell
RAII implementation forSHFILEINFO
which automatically callsDestroyIcon
onhIcon
field when the object goes out of scope. - DestroyIconSiiGuard
shell
RAII implementation forSHSTOCKICONINFO
which automatically callsDestroyIcon
onhIcon
field when the object goes out of scope. - RAII implementation for
HDWP
which automatically callsEndDeferWindowPos
when the object goes out of scope. - EndPaintGuard
user
- RAII implementation
HUPDATERSRC
which automatically callsEndUpdateResource
when the object goes out of scope. - RAII implementation for
HINSTANCE
which automatically callsFreeLibrary
when the object goes out of scope. - RAII implementation for
SID
, returned byAllocateAndInitializeSid
, which automatically callsFreeSid
when the object goes out of scope. - RAII implementation for
HGLOBAL
which automatically callsGlobalFree
when the object goes out of scope. - RAII implementation for
HGLOBAL
lock which automatically callsGlobalUnlock
when the object goes out of scope. - RAII implementation for
HHEAP
which automatically callsHeapDestroy
when the object goes out of scope. - RAII implementation for the memory allocated by
HHEAP::HeapAlloc
which automatically callsHeapFree
when the object goes out of scope. - RAII implementation for
HHEAP
which automatically callsHeapUnlock
when the object goes out of scope. - ImageListDestroyGuard
comctl
RAII implementation forHIMAGELIST
which automatically callsImageList_Destroy
when the object goes out of scope. - ImageListEndDragGuard
comctl
RAII implementation for image list drag which automatically callsImageList_EndDrag
when the object goes out of scope. - RAII implementation for
SID
, returned byConvertStringSidToSid
, which automatically callsLocalFree
when the object goes out of scope. - RAII implementation for
HLOCAL
lock which automatically callsLocalUnlock
when the object goes out of scope. - RAII implementation for
LOGPALETTE
which manages the allocated memory. - RAII implementation for
HKEY
which automatically callsRegCloseKey
when the object goes out of scope. - RAII implementation for
HWND
which automatically callsReleaseCapture
when the object goes out of scope. - ReleaseDCGuard
user
- RAII implementation for
HDC::SelectObject
calls, which automatically selects the previous GDI object at the end of the scope. - RAII implementation for
SID
, returned byCopySid
,CreateWellKnownSid
,GetWindowsAccountDomainSid
andLookupAccountName
, which automatically frees the underlying memory block when the object goes out of scope. - RAII implementation for
TOKEN_GROUPS
which manages the allocated memory. - RAII implementation for
TOKEN_PRIVILEGES
which manages the allocated memory. - RAII implementation for the
HFILE
lock which automatically callsUnlockFile
when the object goes out of scope. - RAII implementation for
HFILEMAPVIEW
which automatically callsUnmapViewOfFile
when the object goes out of scope. - VersionInfoGuard
version
RAII implementation forHVERSIONINFO
which releases the underlying memory block when the object goes out of scope.