Esempio n. 1
0
 private static int Do_Abi_InterfaceSupportsErrorInfo_0(IntPtr thisPtr, ref Guid guid)
 {
     try
     {
         return(global::WinRT.ComWrappersSupport.FindObject <global::WinRT.Interop.ISupportErrorInfo>(thisPtr).InterfaceSupportsErrorInfo(guid) ? 0 : 1);
     }
     catch (Exception ex)
     {
         ExceptionHelpers.SetErrorInfo(ex);
         return(ExceptionHelpers.GetHRForException(ex));
     }
 }
Esempio n. 2
0
 private static int Do_Abi_GetGuid_0(IntPtr thisPtr, out Guid guid)
 {
     guid = default;
     try
     {
         guid = ComWrappersSupport.FindObject <global::WinRT.Interop.IErrorInfo>(thisPtr).GetGuid();
     }
     catch (Exception ex)
     {
         ExceptionHelpers.SetErrorInfo(ex);
         return(ExceptionHelpers.GetHRForException(ex));
     }
     return(0);
 }
Esempio n. 3
0
            private static int Do_Abi_GetHelpFileContent_4(IntPtr thisPtr, out IntPtr helpFileContent)
            {
                helpFileContent = IntPtr.Zero;
                string _helpFileContent;

                try
                {
                    _helpFileContent = ComWrappersSupport.FindObject <global::WinRT.Interop.IErrorInfo>(thisPtr).GetHelpFileContent();
                    helpFileContent  = Marshal.StringToBSTR(_helpFileContent);
                }
                catch (Exception ex)
                {
                    Marshal.FreeBSTR(helpFileContent);
                    ExceptionHelpers.SetErrorInfo(ex);
                    return(ExceptionHelpers.GetHRForException(ex));
                }
                return(0);
            }
Esempio n. 4
0
            private static int Do_Abi_GetDescription_2(IntPtr thisPtr, out IntPtr description)
            {
                description = IntPtr.Zero;
                string _description;

                try
                {
                    _description = ComWrappersSupport.FindObject <global::WinRT.Interop.IErrorInfo>(thisPtr).GetDescription();
                    description  = Marshal.StringToBSTR(_description);
                }
                catch (Exception ex)
                {
                    Marshal.FreeBSTR(description);
                    ExceptionHelpers.SetErrorInfo(ex);
                    return(ExceptionHelpers.GetHRForException(ex));
                }
                return(0);
            }
Esempio n. 5
0
            private static int Do_Abi_GetSource_1(IntPtr thisPtr, out IntPtr source)
            {
                source = IntPtr.Zero;
                string _source;

                try
                {
                    _source = ComWrappersSupport.FindObject <global::WinRT.Interop.IErrorInfo>(thisPtr).GetSource();
                    source  = Marshal.StringToBSTR(_source);
                }
                catch (Exception ex)
                {
                    Marshal.FreeBSTR(source);
                    ExceptionHelpers.SetErrorInfo(ex);
                    return(ExceptionHelpers.GetHRForException(ex));
                }
                return(0);
            }