24 instantiations of HRESULT
PresentationFramework (24)
System\Windows\Appearance\WindowBackdropManager.cs (1)
133
return new
HRESULT
((uint)dwmApiResult) == HRESULT.S_OK;
System\Windows\Standard\ErrorCodes.cs (23)
88
return new
HRESULT
((uint)error._value);
183
public static readonly HRESULT S_OK = new
HRESULT
(0x00000000);
185
public static readonly HRESULT S_FALSE = new
HRESULT
(0x00000001);
187
public static readonly HRESULT E_PENDING = new
HRESULT
(0x8000000A);
189
public static readonly HRESULT E_NOTIMPL = new
HRESULT
(0x80004001);
191
public static readonly HRESULT E_NOINTERFACE = new
HRESULT
(0x80004002);
193
public static readonly HRESULT E_POINTER = new
HRESULT
(0x80004003);
195
public static readonly HRESULT E_ABORT = new
HRESULT
(0x80004004);
197
public static readonly HRESULT E_FAIL = new
HRESULT
(0x80004005);
199
public static readonly HRESULT E_UNEXPECTED = new
HRESULT
(0x8000FFFF);
201
public static readonly HRESULT STG_E_INVALIDFUNCTION = new
HRESULT
(0x80030001);
203
public static readonly HRESULT REGDB_E_CLASSNOTREG = new
HRESULT
(0x80040154);
207
public static readonly HRESULT DESTS_E_NO_MATCHING_ASSOC_HANDLER = new
HRESULT
(0x80040F03);
210
public static readonly HRESULT DESTS_E_NORECDOCS = new
HRESULT
(0x80040F04);
213
public static readonly HRESULT DESTS_E_NOTALLCLEARED = new
HRESULT
(0x80040F05);
217
public static readonly HRESULT E_ACCESSDENIED = new
HRESULT
(0x80070005);
220
public static readonly HRESULT E_OUTOFMEMORY = new
HRESULT
(0x8007000E);
223
public static readonly HRESULT E_INVALIDARG = new
HRESULT
(0x80070057);
225
public static readonly HRESULT INTSAFE_E_ARITHMETIC_OVERFLOW = new
HRESULT
(0x80070216);
227
public static readonly HRESULT COR_E_OBJECTDISPOSED = new
HRESULT
(0x80131622);
229
public static readonly HRESULT WC_E_GREATERTHAN = new
HRESULT
(0xC00CEE23);
231
public static readonly HRESULT WC_E_SYNTAX = new
HRESULT
(0xC00CEE2D);
257
return new
HRESULT
((uint)((severe ? (1 << 31) : 0) | ((int)facility << 16) | code));
112 references to HRESULT
PresentationFramework (112)
System\Windows\Appearance\WindowBackdropManager.cs (6)
6
using HRESULT = Standard.
HRESULT
;
82
var
dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute);
83
return dwmResult ==
HRESULT
.S_OK;
91
var
dwmResult = NativeMethods.DwmSetWindowAttributeSystemBackdropType(hwnd, backdropPvAttribute);
92
return dwmResult ==
HRESULT
.S_OK;
133
return new HRESULT((uint)dwmApiResult) ==
HRESULT
.S_OK;
System\Windows\Standard\ErrorCodes.cs (37)
82
public static explicit operator
HRESULT
(Win32Error error)
90
return
HRESULT
.Make(true, Facility.Win32, error._value & 0x0000FFFF);
97
public
HRESULT
ToHRESULT()
99
return (
HRESULT
)this;
183
public static readonly
HRESULT
S_OK = new HRESULT(0x00000000);
185
public static readonly
HRESULT
S_FALSE = new HRESULT(0x00000001);
187
public static readonly
HRESULT
E_PENDING = new HRESULT(0x8000000A);
189
public static readonly
HRESULT
E_NOTIMPL = new HRESULT(0x80004001);
191
public static readonly
HRESULT
E_NOINTERFACE = new HRESULT(0x80004002);
193
public static readonly
HRESULT
E_POINTER = new HRESULT(0x80004003);
195
public static readonly
HRESULT
E_ABORT = new HRESULT(0x80004004);
197
public static readonly
HRESULT
E_FAIL = new HRESULT(0x80004005);
199
public static readonly
HRESULT
E_UNEXPECTED = new HRESULT(0x8000FFFF);
201
public static readonly
HRESULT
STG_E_INVALIDFUNCTION = new HRESULT(0x80030001);
203
public static readonly
HRESULT
REGDB_E_CLASSNOTREG = new HRESULT(0x80040154);
207
public static readonly
HRESULT
DESTS_E_NO_MATCHING_ASSOC_HANDLER = new HRESULT(0x80040F03);
210
public static readonly
HRESULT
DESTS_E_NORECDOCS = new HRESULT(0x80040F04);
213
public static readonly
HRESULT
DESTS_E_NOTALLCLEARED = new HRESULT(0x80040F05);
217
public static readonly
HRESULT
E_ACCESSDENIED = new HRESULT(0x80070005);
220
public static readonly
HRESULT
E_OUTOFMEMORY = new HRESULT(0x8007000E);
223
public static readonly
HRESULT
E_INVALIDARG = new HRESULT(0x80070057);
225
public static readonly
HRESULT
INTSAFE_E_ARITHMETIC_OVERFLOW = new HRESULT(0x80070216);
227
public static readonly
HRESULT
COR_E_OBJECTDISPOSED = new HRESULT(0x80131622);
229
public static readonly
HRESULT
WC_E_GREATERTHAN = new HRESULT(0xC00CEE23);
231
public static readonly
HRESULT
WC_E_SYNTAX = new HRESULT(0xC00CEE2D);
242
public static
HRESULT
Make(bool severe, Facility facility, int code)
313
foreach (FieldInfo publicStaticField in typeof(
HRESULT
).GetFields(BindingFlags.Static | BindingFlags.Public))
315
if (publicStaticField.FieldType == typeof(
HRESULT
))
317
var
hr = (
HRESULT
)publicStaticField.GetValue(null);
333
if ((
HRESULT
)error == this)
350
return ((
HRESULT
)obj)._value == _value;
365
public static bool operator ==(
HRESULT
hrLeft,
HRESULT
hrRight)
370
public static bool operator !=(
HRESULT
hrLeft,
HRESULT
hrRight)
456
((
HRESULT
)Win32Error.GetLastError()).ThrowIfFailed();
System\Windows\Standard\NativeMethods.cs (40)
1462
HRESULT
.ThrowLastError();
1500
HRESULT
.E_FAIL.ThrowIfFailed();
2295
HRESULT
.ThrowLastError();
2311
public static
HRESULT
ChangeWindowMessageFilterEx(IntPtr hwnd, WM message, MSGFLT action, out MSGFLTINFO filterInfo)
2321
return
HRESULT
.S_FALSE;
2333
return (
HRESULT
)Win32Error.GetLastError();
2335
return
HRESULT
.S_OK;
2342
return (
HRESULT
)Win32Error.GetLastError();
2346
return
HRESULT
.S_OK;
2406
HRESULT
.ThrowLastError();
2486
HRESULT
.ThrowLastError();
2522
private static extern
HRESULT
_DwmGetColorizationColor(out uint pcrColorization, [Out, MarshalAs(UnmanagedType.Bool)] out bool pfOpaqueBlend);
2529
HRESULT
hr = _DwmGetColorizationColor(out pcrColorization, out pfOpaqueBlend);
2560
private static extern
HRESULT
_DwmSetWindowAttribute(IntPtr hwnd, DWMWA dwAttribute, ref int pvAttribute, int cbAttribute);
2562
public static
HRESULT
DwmSetWindowAttributeSystemBackdropType(IntPtr hwnd, DWMSBT dwBackdropType)
2573
var
dwmResult = _DwmSetWindowAttribute(hwnd, DWMWA.USE_IMMERSIVE_DARK_MODE, ref pvAttribute, sizeof(int));
2574
return dwmResult ==
HRESULT
.S_OK;
2648
HRESULT
.ThrowLastError();
2654
private static extern
HRESULT
_GetCurrentThemeName(
2698
HRESULT
.ThrowLastError();
2722
HRESULT
.ThrowLastError();
2749
HRESULT
.ThrowLastError();
2824
HRESULT
.ThrowLastError();
2883
HRESULT
.ThrowLastError();
2897
HRESULT
.ThrowLastError();
2911
HRESULT
.ThrowLastError();
3010
HRESULT
.ThrowLastError();
3022
HRESULT
.ThrowLastError();
3034
HRESULT
.ThrowLastError();
3053
HRESULT
.ThrowLastError();
3066
HRESULT
.ThrowLastError();
3090
HRESULT
.ThrowLastError();
3098
HRESULT
.ThrowLastError();
3141
HRESULT
.ThrowLastError();
3153
HRESULT
.ThrowLastError();
3182
private static extern
HRESULT
_DwmGetCompositionTimingInfo(IntPtr hwnd, ref DWM_TIMING_INFO pTimingInfo);
3193
HRESULT
hr = _DwmGetCompositionTimingInfo(hwnd, ref dti);
3194
if (hr ==
HRESULT
.E_PENDING)
3217
public static extern
HRESULT
SHCreateItemFromParsingName([MarshalAs(UnmanagedType.LPWStr)] string pszPath, IBindCtx pbc, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out object ppv);
3235
public static extern
HRESULT
GetCurrentProcessExplicitAppUserModelID([Out, MarshalAs(UnmanagedType.LPWStr)] out string AppID);
System\Windows\Standard\ShellProvider.cs (29)
381
HRESULT
Next(uint celt, out IntPtr rgelt, out int pceltFetched);
383
HRESULT
Skip(uint celt);
502
HRESULT
CompareIDs([In] IntPtr lParam, [In] IntPtr pidl1, [In] IntPtr pidl2);
829
HRESULT
AppendCategory([MarshalAs(UnmanagedType.LPWStr)] string pszCategory, IObjectArray poa);
832
HRESULT
AddUserTasks(IObjectArray poa);
894
HRESULT
SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal);
897
HRESULT
SetProgressState(IntPtr hwnd, TBPF tbpFlags);
900
HRESULT
RegisterTab(IntPtr hwndTab, IntPtr hwndMDI);
903
HRESULT
UnregisterTab(IntPtr hwndTab);
906
HRESULT
SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore);
909
HRESULT
SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved);
912
HRESULT
ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons);
915
HRESULT
ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons);
918
HRESULT
ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl);
921
HRESULT
SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription);
924
HRESULT
SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip);
928
HRESULT
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);