24 instantiations of HRESULT
PresentationFramework (24)
System\Windows\Appearance\WindowBackdropManager.cs (1)
132return new HRESULT((uint)dwmApiResult) == HRESULT.S_OK;
System\Windows\Standard\ErrorCodes.cs (23)
88return new HRESULT((uint)error._value); 183public static readonly HRESULT S_OK = new HRESULT(0x00000000); 185public static readonly HRESULT S_FALSE = new HRESULT(0x00000001); 187public static readonly HRESULT E_PENDING = new HRESULT(0x8000000A); 189public static readonly HRESULT E_NOTIMPL = new HRESULT(0x80004001); 191public static readonly HRESULT E_NOINTERFACE = new HRESULT(0x80004002); 193public static readonly HRESULT E_POINTER = new HRESULT(0x80004003); 195public static readonly HRESULT E_ABORT = new HRESULT(0x80004004); 197public static readonly HRESULT E_FAIL = new HRESULT(0x80004005); 199public static readonly HRESULT E_UNEXPECTED = new HRESULT(0x8000FFFF); 201public static readonly HRESULT STG_E_INVALIDFUNCTION = new HRESULT(0x80030001); 203public static readonly HRESULT REGDB_E_CLASSNOTREG = new HRESULT(0x80040154); 207public static readonly HRESULT DESTS_E_NO_MATCHING_ASSOC_HANDLER = new HRESULT(0x80040F03); 210public static readonly HRESULT DESTS_E_NORECDOCS = new HRESULT(0x80040F04); 213public static readonly HRESULT DESTS_E_NOTALLCLEARED = new HRESULT(0x80040F05); 217public static readonly HRESULT E_ACCESSDENIED = new HRESULT(0x80070005); 220public static readonly HRESULT E_OUTOFMEMORY = new HRESULT(0x8007000E); 223public static readonly HRESULT E_INVALIDARG = new HRESULT(0x80070057); 225public static readonly HRESULT INTSAFE_E_ARITHMETIC_OVERFLOW = new HRESULT(0x80070216); 227public static readonly HRESULT COR_E_OBJECTDISPOSED = new HRESULT(0x80131622); 229public static readonly HRESULT WC_E_GREATERTHAN = new HRESULT(0xC00CEE23); 231public static readonly HRESULT WC_E_SYNTAX = new HRESULT(0xC00CEE2D); 257return new HRESULT((uint)((severe ? (1 << 31) : 0) | ((int)facility << 16) | code));
112 references to HRESULT
PresentationFramework (112)
System\Windows\Appearance\WindowBackdropManager.cs (6)
5using HRESULT = Standard.HRESULT; 81var dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute); 82return dwmResult == HRESULT.S_OK; 90var dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute); 91return dwmResult == HRESULT.S_OK; 132return new HRESULT((uint)dwmApiResult) == HRESULT.S_OK;
System\Windows\Standard\ErrorCodes.cs (37)
82public static explicit operator HRESULT(Win32Error error) 90return HRESULT.Make(true, Facility.Win32, error._value & 0x0000FFFF); 97public HRESULT ToHRESULT() 99return (HRESULT)this; 183public static readonly HRESULT S_OK = new HRESULT(0x00000000); 185public static readonly HRESULT S_FALSE = new HRESULT(0x00000001); 187public static readonly HRESULT E_PENDING = new HRESULT(0x8000000A); 189public static readonly HRESULT E_NOTIMPL = new HRESULT(0x80004001); 191public static readonly HRESULT E_NOINTERFACE = new HRESULT(0x80004002); 193public static readonly HRESULT E_POINTER = new HRESULT(0x80004003); 195public static readonly HRESULT E_ABORT = new HRESULT(0x80004004); 197public static readonly HRESULT E_FAIL = new HRESULT(0x80004005); 199public static readonly HRESULT E_UNEXPECTED = new HRESULT(0x8000FFFF); 201public static readonly HRESULT STG_E_INVALIDFUNCTION = new HRESULT(0x80030001); 203public static readonly HRESULT REGDB_E_CLASSNOTREG = new HRESULT(0x80040154); 207public static readonly HRESULT DESTS_E_NO_MATCHING_ASSOC_HANDLER = new HRESULT(0x80040F03); 210public static readonly HRESULT DESTS_E_NORECDOCS = new HRESULT(0x80040F04); 213public static readonly HRESULT DESTS_E_NOTALLCLEARED = new HRESULT(0x80040F05); 217public static readonly HRESULT E_ACCESSDENIED = new HRESULT(0x80070005); 220public static readonly HRESULT E_OUTOFMEMORY = new HRESULT(0x8007000E); 223public static readonly HRESULT E_INVALIDARG = new HRESULT(0x80070057); 225public static readonly HRESULT INTSAFE_E_ARITHMETIC_OVERFLOW = new HRESULT(0x80070216); 227public static readonly HRESULT COR_E_OBJECTDISPOSED = new HRESULT(0x80131622); 229public static readonly HRESULT WC_E_GREATERTHAN = new HRESULT(0xC00CEE23); 231public static readonly HRESULT WC_E_SYNTAX = new HRESULT(0xC00CEE2D); 242public static HRESULT Make(bool severe, Facility facility, int code) 313foreach (FieldInfo publicStaticField in typeof(HRESULT).GetFields(BindingFlags.Static | BindingFlags.Public)) 315if (publicStaticField.FieldType == typeof(HRESULT)) 317var hr = (HRESULT)publicStaticField.GetValue(null); 333if ((HRESULT)error == this) 350return ((HRESULT)obj)._value == _value; 365public static bool operator ==(HRESULT hrLeft, HRESULT hrRight) 370public static bool operator !=(HRESULT hrLeft, HRESULT hrRight) 456((HRESULT)Win32Error.GetLastError()).ThrowIfFailed();
System\Windows\Standard\NativeMethods.cs (40)
1457HRESULT.ThrowLastError(); 1495HRESULT.E_FAIL.ThrowIfFailed(); 2290HRESULT.ThrowLastError(); 2306public static HRESULT ChangeWindowMessageFilterEx(IntPtr hwnd, WM message, MSGFLT action, out MSGFLTINFO filterInfo) 2316return HRESULT.S_FALSE; 2328return (HRESULT)Win32Error.GetLastError(); 2330return HRESULT.S_OK; 2337return (HRESULT)Win32Error.GetLastError(); 2341return HRESULT.S_OK; 2401HRESULT.ThrowLastError(); 2481HRESULT.ThrowLastError(); 2517private static extern HRESULT _DwmGetColorizationColor(out uint pcrColorization, [Out, MarshalAs(UnmanagedType.Bool)] out bool pfOpaqueBlend); 2524HRESULT hr = _DwmGetColorizationColor(out pcrColorization, out pfOpaqueBlend); 2555private static extern HRESULT _DwmSetWindowAttribute(IntPtr hwnd, DWMWA dwAttribute, ref int pvAttribute, int cbAttribute); 2557public static HRESULT DwmSetWindowAttributeSystemBackdropType(IntPtr hwnd, DWMSBT dwBackdropType) 2568var dwmResult = _DwmSetWindowAttribute(hwnd, DWMWA.USE_IMMERSIVE_DARK_MODE, ref pvAttribute, sizeof(int)); 2569return dwmResult == HRESULT.S_OK; 2643HRESULT.ThrowLastError(); 2649private static extern HRESULT _GetCurrentThemeName( 2693HRESULT.ThrowLastError(); 2717HRESULT.ThrowLastError(); 2744HRESULT.ThrowLastError(); 2819HRESULT.ThrowLastError(); 2878HRESULT.ThrowLastError(); 2892HRESULT.ThrowLastError(); 2906HRESULT.ThrowLastError(); 3005HRESULT.ThrowLastError(); 3017HRESULT.ThrowLastError(); 3029HRESULT.ThrowLastError(); 3048HRESULT.ThrowLastError(); 3061HRESULT.ThrowLastError(); 3085HRESULT.ThrowLastError(); 3093HRESULT.ThrowLastError(); 3136HRESULT.ThrowLastError(); 3148HRESULT.ThrowLastError(); 3177private static extern HRESULT _DwmGetCompositionTimingInfo(IntPtr hwnd, ref DWM_TIMING_INFO pTimingInfo); 3188HRESULT hr = _DwmGetCompositionTimingInfo(hwnd, ref dti); 3189if (hr == HRESULT.E_PENDING) 3212public static extern HRESULT SHCreateItemFromParsingName([MarshalAs(UnmanagedType.LPWStr)] string pszPath, IBindCtx pbc, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out object ppv); 3230public static extern HRESULT GetCurrentProcessExplicitAppUserModelID([Out, MarshalAs(UnmanagedType.LPWStr)] out string AppID);
System\Windows\Standard\ShellProvider.cs (29)
379HRESULT Next(uint celt, out IntPtr rgelt, out int pceltFetched); 381HRESULT Skip(uint celt); 500HRESULT CompareIDs([In] IntPtr lParam, [In] IntPtr pidl1, [In] IntPtr pidl2); 827HRESULT AppendCategory([MarshalAs(UnmanagedType.LPWStr)] string pszCategory, IObjectArray poa); 830HRESULT AddUserTasks(IObjectArray poa); 892HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 895HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 898HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 901HRESULT UnregisterTab(IntPtr hwndTab); 904HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 907HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 910HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 913HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 916HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 919HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 922HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 926HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip); 952[PreserveSig] new HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 953[PreserveSig] new HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 954[PreserveSig] new HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 955[PreserveSig] new HRESULT UnregisterTab(IntPtr hwndTab); 956[PreserveSig] new HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 957[PreserveSig] new HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 958[PreserveSig] new HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 959[PreserveSig] new HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 960[PreserveSig] new HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 961[PreserveSig] new HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 962[PreserveSig] new HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 964[PreserveSig] new HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip);