37 references to HRESULT
Microsoft.Build (5)
BuildCheck\Checks\UntrustedLocationCheck.cs (1)
113
HRESULT
hr = PInvoke.SHGetKnownFolderPath(folderId, default, HANDLE.Null, out PWSTR path);
Instance\RunningObjectTable.cs (4)
67
HRESULT
hr = PInvoke.GetRunningObjectTable(0, &rot);
123
HRESULT
hr = PInvoke.CreateItemMoniker("!", itemName, &monikerRaw);
162
HRESULT
errInfoHr = PInvoke.GetErrorInfo(0, &pErrorInfo);
163
if (errInfoHr ==
HRESULT
.S_OK && pErrorInfo is not null)
Microsoft.Build.Framework (32)
NativeMethods.cs (3)
742
((
HRESULT
)errorCode).ThrowOnFailure();
784
((
HRESULT
)errorCode).ThrowOnFailure();
1236
HRESULT
.FromLastError().ThrowOnFailure();
Utilities\ProcessExtensions.cs (5)
244
private static readonly
HRESULT
WBEM_S_FALSE = (
HRESULT
)1; // No more objects in enumeration
277
HRESULT
hr = PInvoke.CoInitializeSecurity(
287
if (hr.Failed && hr !=
HRESULT
.RPC_E_TOO_LATE)
402
HRESULT
hr = PInvoke.DebugCreate(IID.Get<IDebugClient4>(), out void* clientPtr);
Utilities\Wmi\IEnumWbemClassObject.cs (4)
49
public
HRESULT
QueryInterface(Guid* riid, void** ppvObject)
53
return ((delegate* unmanaged[Stdcall]<IEnumWbemClassObject*, Guid*, void**,
HRESULT
>)_lpVtbl[0])(pThis, riid, ppvObject);
86
public
HRESULT
Next(int lTimeout, uint uCount, IWbemClassObject** apObjects, uint* puReturned)
90
return ((delegate* unmanaged[Stdcall]<IEnumWbemClassObject*, int, uint, IWbemClassObject**, uint*,
HRESULT
>)_lpVtbl[4])(
Utilities\Wmi\IWbemClassObject.cs (4)
53
public
HRESULT
QueryInterface(Guid* riid, void** ppvObject)
57
return ((delegate* unmanaged[Stdcall]<IWbemClassObject*, Guid*, void**,
HRESULT
>)_lpVtbl[0])(pThis, riid, ppvObject);
109
public
HRESULT
Get(char* wszName, int lFlags, VARIANT* pVal, int* pType, int* plFlavor)
113
return ((delegate* unmanaged[Stdcall]<IWbemClassObject*, char*, int, VARIANT*, int*, int*,
HRESULT
>)_lpVtbl[4])(
Utilities\Wmi\IWbemLocator.cs (4)
50
public
HRESULT
QueryInterface(Guid* riid, void** ppvObject)
54
return ((delegate* unmanaged[Stdcall]<IWbemLocator*, Guid*, void**,
HRESULT
>)_lpVtbl[0])(pThis, riid, ppvObject);
82
public
HRESULT
ConnectServer(
94
return ((delegate* unmanaged[Stdcall]<IWbemLocator*, char*, char*, char*, char*, int, char*, void*, IWbemServices**,
HRESULT
>)_lpVtbl[3])(
Utilities\Wmi\IWbemServices.cs (4)
52
public
HRESULT
QueryInterface(Guid* riid, void** ppvObject)
56
return ((delegate* unmanaged[Stdcall]<IWbemServices*, Guid*, void**,
HRESULT
>)_lpVtbl[0])(pThis, riid, ppvObject);
107
public
HRESULT
ExecQuery(
116
return ((delegate* unmanaged[Stdcall]<IWbemServices*, char*, char*, int, void*, IEnumWbemClassObject**,
HRESULT
>)_lpVtbl[20])(
Windows\Win32\Foundation\HRESULT.cs (6)
12
/// Convert a Windows error to an <see cref="
HRESULT
"/>. [HRESULT_FROM_WIN32]
14
public static explicit operator
HRESULT
(WIN32_ERROR error) =>
17
(
HRESULT
)(int)((int)error <= 0 ? (int)error : (((int)error & 0x0000FFFF) | ((int)FACILITY_CODE.FACILITY_WIN32 << 16) | 0x80000000));
20
/// Create an <see cref="
HRESULT
"/> from the last Windows error.
22
public static
HRESULT
FromLastError() => (
HRESULT
)(WIN32_ERROR)Marshal.GetLastWin32Error();
Windows\Win32\System\Com\ComClassFactory.cs (2)
35
out
HRESULT
result)
59
public ComScope<TInterface> TryCreateInstance<TInterface>(out
HRESULT
result)