public OvlK(KUSB_HANDLE UsbHandle, int MaxOverlappedCount, KOVL_POOL_FLAG Flags)
{
RuntimeHelpers.PrepareConstrainedRegions();
try
{
}
finally
{
bool success = Functions.OvlK_Init(out handle, UsbHandle, MaxOverlappedCount, Flags);
if (!success || handle.IsInvalid || handle.IsClosed)
{
handle.SetHandleAsInvalid();
int errorCode = Marshal.GetLastWin32Error();
throw new Exception(GetType().Name + " failed. ErrorCode=" + errorCode.ToString("X"));
}
}
}