24 instantiations of HRESULT
PresentationFramework (24)
System\Windows\Appearance\WindowBackdropManager.cs (1)
135
return new
HRESULT
((uint)dwmApiResult) == HRESULT.S_OK;
System\Windows\Standard\ErrorCodes.cs (23)
87
return new
HRESULT
((uint)error._value);
182
public static readonly HRESULT S_OK = new
HRESULT
(0x00000000);
184
public static readonly HRESULT S_FALSE = new
HRESULT
(0x00000001);
186
public static readonly HRESULT E_PENDING = new
HRESULT
(0x8000000A);
188
public static readonly HRESULT E_NOTIMPL = new
HRESULT
(0x80004001);
190
public static readonly HRESULT E_NOINTERFACE = new
HRESULT
(0x80004002);
192
public static readonly HRESULT E_POINTER = new
HRESULT
(0x80004003);
194
public static readonly HRESULT E_ABORT = new
HRESULT
(0x80004004);
196
public static readonly HRESULT E_FAIL = new
HRESULT
(0x80004005);
198
public static readonly HRESULT E_UNEXPECTED = new
HRESULT
(0x8000FFFF);
200
public static readonly HRESULT STG_E_INVALIDFUNCTION = new
HRESULT
(0x80030001);
202
public static readonly HRESULT REGDB_E_CLASSNOTREG = new
HRESULT
(0x80040154);
206
public static readonly HRESULT DESTS_E_NO_MATCHING_ASSOC_HANDLER = new
HRESULT
(0x80040F03);
209
public static readonly HRESULT DESTS_E_NORECDOCS = new
HRESULT
(0x80040F04);
212
public static readonly HRESULT DESTS_E_NOTALLCLEARED = new
HRESULT
(0x80040F05);
216
public static readonly HRESULT E_ACCESSDENIED = new
HRESULT
(0x80070005);
219
public static readonly HRESULT E_OUTOFMEMORY = new
HRESULT
(0x8007000E);
222
public static readonly HRESULT E_INVALIDARG = new
HRESULT
(0x80070057);
224
public static readonly HRESULT INTSAFE_E_ARITHMETIC_OVERFLOW = new
HRESULT
(0x80070216);
226
public static readonly HRESULT COR_E_OBJECTDISPOSED = new
HRESULT
(0x80131622);
228
public static readonly HRESULT WC_E_GREATERTHAN = new
HRESULT
(0xC00CEE23);
230
public static readonly HRESULT WC_E_SYNTAX = new
HRESULT
(0xC00CEE2D);
256
return new
HRESULT
((uint)((severe ? (1 << 31) : 0) | ((int)facility << 16) | code));
112 references to HRESULT
PresentationFramework (112)
System\Windows\Appearance\WindowBackdropManager.cs (6)
8
using HRESULT = Standard.
HRESULT
;
84
var
dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute);
85
return dwmResult ==
HRESULT
.S_OK;
93
var
dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute);
94
return dwmResult ==
HRESULT
.S_OK;
135
return new HRESULT((uint)dwmApiResult) ==
HRESULT
.S_OK;
System\Windows\Standard\ErrorCodes.cs (37)
81
public static explicit operator
HRESULT
(Win32Error error)
89
return
HRESULT
.Make(true, Facility.Win32, error._value & 0x0000FFFF);
96
public
HRESULT
ToHRESULT()
98
return (
HRESULT
)this;
182
public static readonly
HRESULT
S_OK = new HRESULT(0x00000000);
184
public static readonly
HRESULT
S_FALSE = new HRESULT(0x00000001);
186
public static readonly
HRESULT
E_PENDING = new HRESULT(0x8000000A);
188
public static readonly
HRESULT
E_NOTIMPL = new HRESULT(0x80004001);
190
public static readonly
HRESULT
E_NOINTERFACE = new HRESULT(0x80004002);
192
public static readonly
HRESULT
E_POINTER = new HRESULT(0x80004003);
194
public static readonly
HRESULT
E_ABORT = new HRESULT(0x80004004);
196
public static readonly
HRESULT
E_FAIL = new HRESULT(0x80004005);
198
public static readonly
HRESULT
E_UNEXPECTED = new HRESULT(0x8000FFFF);
200
public static readonly
HRESULT
STG_E_INVALIDFUNCTION = new HRESULT(0x80030001);
202
public static readonly
HRESULT
REGDB_E_CLASSNOTREG = new HRESULT(0x80040154);
206
public static readonly
HRESULT
DESTS_E_NO_MATCHING_ASSOC_HANDLER = new HRESULT(0x80040F03);
209
public static readonly
HRESULT
DESTS_E_NORECDOCS = new HRESULT(0x80040F04);
212
public static readonly
HRESULT
DESTS_E_NOTALLCLEARED = new HRESULT(0x80040F05);
216
public static readonly
HRESULT
E_ACCESSDENIED = new HRESULT(0x80070005);
219
public static readonly
HRESULT
E_OUTOFMEMORY = new HRESULT(0x8007000E);
222
public static readonly
HRESULT
E_INVALIDARG = new HRESULT(0x80070057);
224
public static readonly
HRESULT
INTSAFE_E_ARITHMETIC_OVERFLOW = new HRESULT(0x80070216);
226
public static readonly
HRESULT
COR_E_OBJECTDISPOSED = new HRESULT(0x80131622);
228
public static readonly
HRESULT
WC_E_GREATERTHAN = new HRESULT(0xC00CEE23);
230
public static readonly
HRESULT
WC_E_SYNTAX = new HRESULT(0xC00CEE2D);
241
public static
HRESULT
Make(bool severe, Facility facility, int code)
312
foreach (FieldInfo publicStaticField in typeof(
HRESULT
).GetFields(BindingFlags.Static | BindingFlags.Public))
314
if (publicStaticField.FieldType == typeof(
HRESULT
))
316
var
hr = (
HRESULT
)publicStaticField.GetValue(null);
332
if ((
HRESULT
)error == this)
349
return ((
HRESULT
)obj)._value == _value;
364
public static bool operator ==(
HRESULT
hrLeft,
HRESULT
hrRight)
369
public static bool operator !=(
HRESULT
hrLeft,
HRESULT
hrRight)
455
((
HRESULT
)Win32Error.GetLastError()).ThrowIfFailed();
System\Windows\Standard\NativeMethods.cs (40)
1453
HRESULT
.ThrowLastError();
1485
HRESULT
.E_FAIL.ThrowIfFailed();
2285
HRESULT
.ThrowLastError();
2301
public static
HRESULT
ChangeWindowMessageFilterEx(IntPtr hwnd, WM message, MSGFLT action, out MSGFLTINFO filterInfo)
2311
return
HRESULT
.S_FALSE;
2323
return (
HRESULT
)Win32Error.GetLastError();
2325
return
HRESULT
.S_OK;
2332
return (
HRESULT
)Win32Error.GetLastError();
2336
return
HRESULT
.S_OK;
2396
HRESULT
.ThrowLastError();
2476
HRESULT
.ThrowLastError();
2512
private static extern
HRESULT
_DwmGetColorizationColor(out uint pcrColorization, [Out, MarshalAs(UnmanagedType.Bool)] out bool pfOpaqueBlend);
2519
HRESULT
hr = _DwmGetColorizationColor(out pcrColorization, out pfOpaqueBlend);
2550
private static extern
HRESULT
_DwmSetWindowAttribute(IntPtr hwnd, DWMWA dwAttribute, ref int pvAttribute, int cbAttribute);
2552
public static
HRESULT
DwmSetWindowAttributeSystemBackdropType(IntPtr hwnd, DWMSBT dwBackdropType)
2563
var
dwmResult = _DwmSetWindowAttribute(hwnd, DWMWA.USE_IMMERSIVE_DARK_MODE, ref pvAttribute, sizeof(int));
2564
return dwmResult ==
HRESULT
.S_OK;
2638
HRESULT
.ThrowLastError();
2644
private static extern
HRESULT
_GetCurrentThemeName(
2688
HRESULT
.ThrowLastError();
2712
HRESULT
.ThrowLastError();
2739
HRESULT
.ThrowLastError();
2814
HRESULT
.ThrowLastError();
2873
HRESULT
.ThrowLastError();
2887
HRESULT
.ThrowLastError();
2901
HRESULT
.ThrowLastError();
3000
HRESULT
.ThrowLastError();
3012
HRESULT
.ThrowLastError();
3024
HRESULT
.ThrowLastError();
3043
HRESULT
.ThrowLastError();
3056
HRESULT
.ThrowLastError();
3080
HRESULT
.ThrowLastError();
3088
HRESULT
.ThrowLastError();
3131
HRESULT
.ThrowLastError();
3143
HRESULT
.ThrowLastError();
3172
private static extern
HRESULT
_DwmGetCompositionTimingInfo(IntPtr hwnd, ref DWM_TIMING_INFO pTimingInfo);
3183
HRESULT
hr = _DwmGetCompositionTimingInfo(hwnd, ref dti);
3184
if (hr ==
HRESULT
.E_PENDING)
3207
public static extern
HRESULT
SHCreateItemFromParsingName([MarshalAs(UnmanagedType.LPWStr)] string pszPath, IBindCtx pbc, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out object ppv);
3225
public static extern
HRESULT
GetCurrentProcessExplicitAppUserModelID([Out, MarshalAs(UnmanagedType.LPWStr)] out string AppID);
System\Windows\Standard\ShellProvider.cs (29)
378
HRESULT
Next(uint celt, out IntPtr rgelt, out int pceltFetched);
380
HRESULT
Skip(uint celt);
499
HRESULT
CompareIDs([In] IntPtr lParam, [In] IntPtr pidl1, [In] IntPtr pidl2);
826
HRESULT
AppendCategory([MarshalAs(UnmanagedType.LPWStr)] string pszCategory, IObjectArray poa);
829
HRESULT
AddUserTasks(IObjectArray poa);
891
HRESULT
SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal);
894
HRESULT
SetProgressState(IntPtr hwnd, TBPF tbpFlags);
897
HRESULT
RegisterTab(IntPtr hwndTab, IntPtr hwndMDI);
900
HRESULT
UnregisterTab(IntPtr hwndTab);
903
HRESULT
SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore);
906
HRESULT
SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved);
909
HRESULT
ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons);
912
HRESULT
ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons);
915
HRESULT
ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl);
918
HRESULT
SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription);
921
HRESULT
SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip);
925
HRESULT
SetThumbnailClip(IntPtr hwnd, RefRECT prcClip);
951
[PreserveSig] new
HRESULT
SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal);
952
[PreserveSig] new
HRESULT
SetProgressState(IntPtr hwnd, TBPF tbpFlags);
953
[PreserveSig] new
HRESULT
RegisterTab(IntPtr hwndTab, IntPtr hwndMDI);
954
[PreserveSig] new
HRESULT
UnregisterTab(IntPtr hwndTab);
955
[PreserveSig] new
HRESULT
SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore);
956
[PreserveSig] new
HRESULT
SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved);
957
[PreserveSig] new
HRESULT
ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons);
958
[PreserveSig] new
HRESULT
ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons);
959
[PreserveSig] new
HRESULT
ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl);
960
[PreserveSig] new
HRESULT
SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription);
961
[PreserveSig] new
HRESULT
SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip);
963
[PreserveSig] new
HRESULT
SetThumbnailClip(IntPtr hwnd, RefRECT prcClip);