Win32Enforce

Calls the Windows API function fn. If it returns an error value, it throws a WindowsApiException (or subclass) after calling GetLastError().

template Win32Enforce(alias fn, alias errorValue = void)
version(Windows)
static if(is(typeof(fn) Return == return))
static if(is(typeof(fn) Params == __parameters))
Return
Win32Enforce
(
Params params
,,
string file = __FILE__
,
size_t line = __LINE__
)

Meta