24 instantiations of HRESULT
PresentationFramework (24)
System\Windows\Appearance\WindowBackdropManager.cs (1)
133return new HRESULT((uint)dwmApiResult) == HRESULT.S_OK;
System\Windows\Standard\ErrorCodes.cs (23)
88return new HRESULT((uint)error._value); 184public static readonly HRESULT S_OK = new HRESULT(0x00000000); 186public static readonly HRESULT S_FALSE = new HRESULT(0x00000001); 188public static readonly HRESULT E_PENDING = new HRESULT(0x8000000A); 190public static readonly HRESULT E_NOTIMPL = new HRESULT(0x80004001); 192public static readonly HRESULT E_NOINTERFACE = new HRESULT(0x80004002); 194public static readonly HRESULT E_POINTER = new HRESULT(0x80004003); 196public static readonly HRESULT E_ABORT = new HRESULT(0x80004004); 198public static readonly HRESULT E_FAIL = new HRESULT(0x80004005); 200public static readonly HRESULT E_UNEXPECTED = new HRESULT(0x8000FFFF); 202public static readonly HRESULT STG_E_INVALIDFUNCTION = new HRESULT(0x80030001); 204public static readonly HRESULT REGDB_E_CLASSNOTREG = new HRESULT(0x80040154); 208public static readonly HRESULT DESTS_E_NO_MATCHING_ASSOC_HANDLER = new HRESULT(0x80040F03); 211public static readonly HRESULT DESTS_E_NORECDOCS = new HRESULT(0x80040F04); 214public static readonly HRESULT DESTS_E_NOTALLCLEARED = new HRESULT(0x80040F05); 218public static readonly HRESULT E_ACCESSDENIED = new HRESULT(0x80070005); 221public static readonly HRESULT E_OUTOFMEMORY = new HRESULT(0x8007000E); 224public static readonly HRESULT E_INVALIDARG = new HRESULT(0x80070057); 226public static readonly HRESULT INTSAFE_E_ARITHMETIC_OVERFLOW = new HRESULT(0x80070216); 228public static readonly HRESULT COR_E_OBJECTDISPOSED = new HRESULT(0x80131622); 230public static readonly HRESULT WC_E_GREATERTHAN = new HRESULT(0xC00CEE23); 232public static readonly HRESULT WC_E_SYNTAX = new HRESULT(0xC00CEE2D); 258return new HRESULT((uint)((severe ? (1 << 31) : 0) | ((int)facility << 16) | code));
112 references to HRESULT
PresentationFramework (112)
System\Windows\Appearance\WindowBackdropManager.cs (6)
6using HRESULT = Standard.HRESULT; 82var dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute); 83return dwmResult == HRESULT.S_OK; 91var dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute); 92return dwmResult == HRESULT.S_OK; 133return 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; 184public static readonly HRESULT S_OK = new HRESULT(0x00000000); 186public static readonly HRESULT S_FALSE = new HRESULT(0x00000001); 188public static readonly HRESULT E_PENDING = new HRESULT(0x8000000A); 190public static readonly HRESULT E_NOTIMPL = new HRESULT(0x80004001); 192public static readonly HRESULT E_NOINTERFACE = new HRESULT(0x80004002); 194public static readonly HRESULT E_POINTER = new HRESULT(0x80004003); 196public static readonly HRESULT E_ABORT = new HRESULT(0x80004004); 198public static readonly HRESULT E_FAIL = new HRESULT(0x80004005); 200public static readonly HRESULT E_UNEXPECTED = new HRESULT(0x8000FFFF); 202public static readonly HRESULT STG_E_INVALIDFUNCTION = new HRESULT(0x80030001); 204public static readonly HRESULT REGDB_E_CLASSNOTREG = new HRESULT(0x80040154); 208public static readonly HRESULT DESTS_E_NO_MATCHING_ASSOC_HANDLER = new HRESULT(0x80040F03); 211public static readonly HRESULT DESTS_E_NORECDOCS = new HRESULT(0x80040F04); 214public static readonly HRESULT DESTS_E_NOTALLCLEARED = new HRESULT(0x80040F05); 218public static readonly HRESULT E_ACCESSDENIED = new HRESULT(0x80070005); 221public static readonly HRESULT E_OUTOFMEMORY = new HRESULT(0x8007000E); 224public static readonly HRESULT E_INVALIDARG = new HRESULT(0x80070057); 226public static readonly HRESULT INTSAFE_E_ARITHMETIC_OVERFLOW = new HRESULT(0x80070216); 228public static readonly HRESULT COR_E_OBJECTDISPOSED = new HRESULT(0x80131622); 230public static readonly HRESULT WC_E_GREATERTHAN = new HRESULT(0xC00CEE23); 232public static readonly HRESULT WC_E_SYNTAX = new HRESULT(0xC00CEE2D); 243public static HRESULT Make(bool severe, Facility facility, int code) 314foreach (FieldInfo publicStaticField in typeof(HRESULT).GetFields(BindingFlags.Static | BindingFlags.Public)) 316if (publicStaticField.FieldType == typeof(HRESULT)) 318var hr = (HRESULT)publicStaticField.GetValue(null); 334if ((HRESULT)error == this) 351return ((HRESULT)obj)._value == _value; 366public static bool operator ==(HRESULT hrLeft, HRESULT hrRight) 371public static bool operator !=(HRESULT hrLeft, HRESULT hrRight) 465((HRESULT)Win32Error.GetLastError()).ThrowIfFailed();
System\Windows\Standard\NativeMethods.cs (40)
1467HRESULT.ThrowLastError(); 1505HRESULT.E_FAIL.ThrowIfFailed(); 2324HRESULT.ThrowLastError(); 2343public static HRESULT ChangeWindowMessageFilterEx(IntPtr hwnd, WM message, MSGFLT action, out MSGFLTINFO filterInfo) 2353return HRESULT.S_FALSE; 2365return (HRESULT)Win32Error.GetLastError(); 2367return HRESULT.S_OK; 2374return (HRESULT)Win32Error.GetLastError(); 2378return HRESULT.S_OK; 2444HRESULT.ThrowLastError(); 2533HRESULT.ThrowLastError(); 2583private static extern HRESULT _DwmGetColorizationColor(out uint pcrColorization, [Out, MarshalAs(UnmanagedType.Bool)] out bool pfOpaqueBlend); 2590HRESULT hr = _DwmGetColorizationColor(out pcrColorization, out pfOpaqueBlend); 2624private static extern HRESULT _DwmSetWindowAttribute(IntPtr hwnd, DWMWA dwAttribute, ref int pvAttribute, int cbAttribute); 2627public static HRESULT DwmSetWindowAttributeSystemBackdropType(IntPtr hwnd, DWMSBT dwBackdropType) 2639var dwmResult = _DwmSetWindowAttribute(hwnd, DWMWA.USE_IMMERSIVE_DARK_MODE, ref pvAttribute, sizeof(int)); 2640return dwmResult == HRESULT.S_OK; 2727HRESULT.ThrowLastError(); 2733private static extern HRESULT _GetCurrentThemeName( 2780HRESULT.ThrowLastError(); 2804HRESULT.ThrowLastError(); 2833HRESULT.ThrowLastError(); 2915HRESULT.ThrowLastError(); 2988HRESULT.ThrowLastError(); 3004HRESULT.ThrowLastError(); 3020HRESULT.ThrowLastError(); 3137HRESULT.ThrowLastError(); 3150HRESULT.ThrowLastError(); 3163HRESULT.ThrowLastError(); 3185HRESULT.ThrowLastError(); 3200HRESULT.ThrowLastError(); 3228HRESULT.ThrowLastError(); 3236HRESULT.ThrowLastError(); 3282HRESULT.ThrowLastError(); 3295HRESULT.ThrowLastError(); 3324private static extern HRESULT _DwmGetCompositionTimingInfo(IntPtr hwnd, ref DWM_TIMING_INFO pTimingInfo); 3335HRESULT hr = _DwmGetCompositionTimingInfo(hwnd, ref dti); 3336if (hr == HRESULT.E_PENDING) 3364public static extern HRESULT SHCreateItemFromParsingName([MarshalAs(UnmanagedType.LPWStr)] string pszPath, IBindCtx pbc, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out object ppv); 3385public static extern HRESULT GetCurrentProcessExplicitAppUserModelID([Out, MarshalAs(UnmanagedType.LPWStr)] out string AppID);
System\Windows\Standard\ShellProvider.cs (29)
381HRESULT Next(uint celt, out IntPtr rgelt, out int pceltFetched); 383HRESULT Skip(uint celt); 502HRESULT CompareIDs([In] IntPtr lParam, [In] IntPtr pidl1, [In] IntPtr pidl2); 829HRESULT AppendCategory([MarshalAs(UnmanagedType.LPWStr)] string pszCategory, IObjectArray poa); 832HRESULT AddUserTasks(IObjectArray poa); 894HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 897HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 900HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 903HRESULT UnregisterTab(IntPtr hwndTab); 906HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 909HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 912HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 915HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 918HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 921HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 924HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 928HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip); 954[PreserveSig] new HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 955[PreserveSig] new HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 956[PreserveSig] new HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 957[PreserveSig] new HRESULT UnregisterTab(IntPtr hwndTab); 958[PreserveSig] new HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 959[PreserveSig] new HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 960[PreserveSig] new HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 961[PreserveSig] new HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 962[PreserveSig] new HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 963[PreserveSig] new HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 964[PreserveSig] new HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 966[PreserveSig] new HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip);