public HotK(ref KHOT_PARAMS InitParams)
{
RuntimeHelpers.PrepareConstrainedRegions();
try
{
}
finally
{
bool success = Functions.HotK_Init(out handle, ref InitParams);
if (!success || handle.IsInvalid || handle.IsClosed)
{
handle.SetHandleAsInvalid();
int errorCode = Marshal.GetLastWin32Error();
throw new Exception(GetType().Name + " failed. ErrorCode=" + errorCode.ToString("X"));
}
}
}