25 references to Errors
System.Diagnostics.PerformanceCounter (25)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafePerfProviderHandle.cs (1)
17Debug.Assert(Status == (uint)Interop.Errors.ERROR_SUCCESS, "PerfStopProvider() fails");
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeRegistryHandle.cs (1)
37Interop.Advapi32.RegCloseKey(handle) == Interop.Errors.ERROR_SUCCESS;
System\Diagnostics\CounterSampleCalculator.cs (1)
95if (result != Interop.Errors.ERROR_SUCCESS)
System\Diagnostics\PerformanceCounterLib.cs (6)
1222if (res == Interop.Errors.ERROR_ACCESS_DENIED) 1269throw new Win32Exception(Interop.Errors.ERROR_ACCESS_DENIED); 1313case Interop.Errors.ERROR_INVALID_HANDLE: 1319case Interop.Errors.ERROR_NOT_READY: 1320case Interop.Errors.ERROR_LOCK_FAILED: 1321case Interop.Errors.ERROR_BUSY:
System\Diagnostics\PerformanceData\CounterSet.cs (3)
204uint Status = (uint)Interop.Errors.ERROR_SUCCESS; 251if (Status != (uint)Interop.Errors.ERROR_SUCCESS) 255(uint)Interop.Errors.ERROR_ALREADY_EXISTS => new InvalidOperationException(SR.Format(SR.Perflib_Argument_CounterSetAlreadyRegister, _counterSet)),
System\Diagnostics\PerformanceData\CounterSetInstance.cs (4)
37int Status = (int)((_nativeInst != null) ? Interop.Errors.ERROR_SUCCESS : Marshal.GetLastWin32Error()); 51case (int)Interop.Errors.ERROR_ALREADY_EXISTS: 54case (int)Interop.Errors.ERROR_NOT_FOUND: 57case (int)Interop.Errors.ERROR_INVALID_PARAMETER:
System\Diagnostics\PerformanceData\CounterSetInstanceCounterDataSet.cs (2)
146if (Status != (uint)Interop.Errors.ERROR_SUCCESS) 153(uint)Interop.Errors.ERROR_NOT_FOUND => new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_CounterRefValue, _instance._counterSet._counterSet, CounterDef.Key, _instance._instName)),
System\Diagnostics\PerformanceData\PerfProviderCollection.cs (1)
22if (Status != (uint)Interop.Errors.ERROR_SUCCESS)
System\Diagnostics\PerformanceDataRegistryKey.cs (3)
35if (ret == Interop.Errors.ERROR_DLL_INIT_FAILED) 64while (Interop.Errors.ERROR_MORE_DATA == (ret = Interop.Advapi32.RegQueryValueEx(_hkey, name, lpReserved: null, ref type, data, ref sizeInput))) 124if (errorCode == Interop.Errors.ERROR_ACCESS_DENIED)
System\Diagnostics\SharedPerformanceCounter.cs (3)
1306if ((error == Interop.Errors.ERROR_INVALID_PARAMETER) && procHandle.IsInvalid) 1717if ((Marshal.GetLastWin32Error() != Interop.Errors.ERROR_ACCESS_DENIED) || !_fileMappingHandle.IsInvalid) 1727if ((Marshal.GetLastWin32Error() != Interop.Errors.ERROR_FILE_NOT_FOUND) || !_fileMappingHandle.IsInvalid)