46 references to SafeNativeMethods
System (46)
compmod\microsoft\win32\NativeMethods.cs (3)
201SafeNativeMethods.PROCESS_INFORMATION lpProcessInformation // LPPROCESS_INFORMATION 274SafeNativeMethods.PROCESS_INFORMATION lpProcessInformation 292SafeNativeMethods.PROCESS_INFORMATION lpProcessInformation);
compmod\microsoft\win32\safehandles\SafeProcessHandle.cs (1)
57return SafeNativeMethods.CloseHandle(handle);
compmod\microsoft\win32\safehandles\SafeThreadHandle.cs (1)
39return SafeNativeMethods.CloseHandle(handle);
compmod\microsoft\win32\SystemEvents.cs (3)
605IntPtr retval = SafeNativeMethods.LoadLibrary(ExternDll.Wtsapi32); 610SafeNativeMethods.FreeLibrary(new HandleRef(null, retval)); 821threadCallbackMessage = SafeNativeMethods.RegisterWindowMessage("SystemEventsThreadCallbackMessage");
compmod\system\codedom\compiler\Executor.cs (2)
157SafeNativeMethods.PROCESS_INFORMATION pi = new SafeNativeMethods.PROCESS_INFORMATION();
compmod\system\componentmodel\Win32Exception.cs (5)
95int result = SafeNativeMethods.FormatMessage( 96SafeNativeMethods.FORMAT_MESSAGE_IGNORE_INSERTS | 97SafeNativeMethods.FORMAT_MESSAGE_FROM_SYSTEM | 98SafeNativeMethods.FORMAT_MESSAGE_ARGUMENT_ARRAY, 110else if (Marshal.GetLastWin32Error() == SafeNativeMethods.ERROR_INSUFFICIENT_BUFFER) {
compmod\system\diagnostics\assertwrapper.cs (6)
134flags = flags | SafeNativeMethods.MB_RIGHT | SafeNativeMethods.MB_RTLREADING; 139rval = SafeNativeMethods.MessageBox(IntPtr.Zero, fullMessage, SR.GetString(SR.DebugAssertTitle), flags); 210IntPtr hFont = SafeNativeMethods.GetStockObject(NativeMethods.DEFAULT_GUI_FONT); 214SafeNativeMethods.GetTextMetrics(hdc, tm); 272ReturnValue = SafeNativeMethods.MessageBox(IntPtr.Zero, m_Body, m_Title, m_Flags);
compmod\system\diagnostics\DefaultTraceListener.cs (2)
187SafeNativeMethods.OutputDebugString(String.Empty); 189SafeNativeMethods.OutputDebugString(message);
services\monitoring\system\diagnosticts\CounterSampleCalculator.cs (2)
96int result = SafeNativeMethods.FormatFromRawValue((uint) newCounterType, NativeMethods.PDH_FMT_DOUBLE | NativeMethods.PDH_FMT_NOSCALE | NativeMethods.PDH_FMT_NOCAP100, 236if (SafeNativeMethods.LoadLibrary(perfcounterPath) == IntPtr.Zero) {
services\monitoring\system\diagnosticts\EventLog.cs (1)
1306msgLen = SafeNativeMethods.FormatMessage(
services\monitoring\system\diagnosticts\PerformanceCounterLib.cs (1)
84SafeNativeMethods.GetComputerName(sb, new int[] {sb.Capacity});
services\monitoring\system\diagnosticts\Process.cs (3)
1491SafeNativeMethods.CloseHandle(hToken); 1996SafeNativeMethods.PROCESS_INFORMATION processInfo = new SafeNativeMethods.PROCESS_INFORMATION();
services\monitoring\system\diagnosticts\ProcessManager.cs (6)
124SafeNativeMethods.CloseHandle(tokenHandle); 322SafeNativeMethods.GetComputerName(sb, new int[] {sb.Capacity}); 410if (handle != (IntPtr)(-1)) SafeNativeMethods.CloseHandle(handle); 456if (handle != (IntPtr)(-1)) SafeNativeMethods.CloseHandle(handle); 616wow64Ret = SafeNativeMethods.IsWow64Process(hCurProcess, ref sourceProcessIsWow64); 621wow64Ret = SafeNativeMethods.IsWow64Process(processHandle, ref targetProcessIsWow64);
services\monitoring\system\diagnosticts\SharedPerformanceCounter.cs (2)
166} while (SafeNativeMethods.InterlockedCompareExchange((IntPtr)baseAddress, newOffset, oldOffset) != oldOffset); 1633SafeNativeMethods.InterlockedCompareExchange(fileViewAddress.DangerousGetHandle(), initialOffset, 0);
services\monitoring\system\diagnosticts\Stopwatch.cs (2)
52bool succeeded = SafeNativeMethods.QueryPerformanceFrequency(out Frequency); 138SafeNativeMethods.QueryPerformanceCounter(out timestamp);
sys\system\io\ports\InternalResources.cs (1)
38int result = SafeNativeMethods.FormatMessage(NativeMethods.FORMAT_MESSAGE_IGNORE_INSERTS |
sys\system\threading\semaphore.cs (5)
69SafeWaitHandle myHandle = SafeNativeMethods.CreateSemaphore(null, initialCount, maximumCount, name); 131myHandle = SafeNativeMethods.CreateSemaphore(secAttrs, initialCount, maximumCount, name); 136myHandle = SafeNativeMethods.CreateSemaphore(null, initialCount, maximumCount, name); 270SafeWaitHandle myHandle = SafeNativeMethods.OpenSemaphore((int) rights, false, name); 321if (!SafeNativeMethods.ReleaseSemaphore(SafeWaitHandle, releaseCount, out previousCount))