public static uint RpcExceptionCode(SEHException e)
{
uint errorCode = 0;
Type sehType = typeof(SEHException);
FieldInfo xcodeField = sehType.BaseType.BaseType.BaseType.GetField("_xcode", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
if (xcodeField != null)
{
int code = (int)xcodeField.GetValue(e);
errorCode = (uint)code;
}
return errorCode;
}