enforceWinAPI

Convinient template to call WinAPI function and throw WinAPIException on error.

template enforceWinAPI(alias func)
enforceWinAPI
(
ParameterTypeTuple!func args
,
in string file = __FILE__
,
in size_t line = __LINE__
)
if (
functionLinkage!func == "Windows"
)

Members

Functions

enforceWinAPI
auto enforceWinAPI(ParameterTypeTuple!func args, string file, size_t line)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

t
{
	HANDLE processHeap = enforceWinAPI!GetProcessHeap();
	assert(processHeap); // Will always pas

Meta