126 references to Interop
System.Diagnostics.EventLog (126)
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.LookupAccountSid.cs (1)
11[LibraryImport(Interop.Libraries.Advapi32, EntryPoint = "LookupAccountSidW", SetLastError = true, StringMarshalling = StringMarshalling.Utf16)]
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeLibraryHandle.cs (1)
19return Interop.Kernel32.FreeLibrary(handle);
src\runtime\src\libraries\Common\src\System\Diagnostics\NetFrameworkUtils.cs (4)
87int result = Interop.Kernel32.WaitForSingleObject(mutexIn.SafeWaitHandle, 500); 90case Interop.Kernel32.WAIT_OBJECT_0: 91case Interop.Kernel32.WAIT_ABANDONED: 97case Interop.Kernel32.WAIT_TIMEOUT:
System\Diagnostics\EventLog.cs (9)
653SafeEventLogReadHandle handle = Interop.Advapi32.OpenEventLog(machineName, logNames[i]); 660else if (Marshal.GetLastWin32Error() != Interop.Errors.ERROR_INVALID_PARAMETER) 886int flags = Interop.Kernel32.FORMAT_MESSAGE_FROM_HMODULE | Interop.Kernel32.FORMAT_MESSAGE_ARGUMENT_ARRAY; 894flags |= Interop.Kernel32.FORMAT_MESSAGE_IGNORE_INSERTS; 904int lastError = Interop.Errors.ERROR_INSUFFICIENT_BUFFER; 905while (msgLen == 0 && lastError == Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 907msgLen = Interop.Kernel32.FormatMessage( 919if (lastError == Interop.Errors.ERROR_INSUFFICIENT_BUFFER)
System\Diagnostics\EventLogEntry.cs (1)
286if (Interop.Advapi32.LookupAccountSid(MachineName, sid, bufUserName, ref userNameLen, bufDomainName, ref domainNameLen, out int sidNameUse) != 0)
System\Diagnostics\EventLogInternal.cs (32)
139bool success = Interop.Advapi32.GetNumberOfEventLogRecords(readHandle, out count); 355bool success = Interop.Advapi32.GetOldestEventLogRecord(readHandle, out num); 426bool success = Interop.Advapi32.NotifyChangeEventLog(info.handleOwner.ReadHandle, info.waitHandle.SafeWaitHandle); 464bool success = Interop.Advapi32.ClearEventLog(readHandle, null); 470if (error != Interop.Errors.ERROR_FILE_NOT_FOUND) 674hModule = Interop.Kernel32.LoadLibraryExW(dllName, IntPtr.Zero, Interop.Kernel32.LOAD_LIBRARY_AS_DATAFILE); 680hModule = Interop.Kernel32.LoadLibraryExW(dllName, IntPtr.Zero, Interop.Kernel32.LOAD_LIBRARY_AS_DATAFILE); 727bool success = Interop.Advapi32.ReadEventLog(readHandle, Interop.Advapi32.FORWARDS_READ | Interop.Advapi32.SEEK_READ, 733if (error == Interop.Errors.ERROR_INSUFFICIENT_BUFFER || error == Interop.Errors.ERROR_EVENTLOG_FILE_CHANGED) 735if (error == Interop.Errors.ERROR_EVENTLOG_FILE_CHANGED) 744success = Interop.Advapi32.ReadEventLog(readHandle, Interop.Advapi32.FORWARDS_READ | Interop.Advapi32.SEEK_READ, 891flags = Interop.Advapi32.FORWARDS_READ | Interop.Advapi32.SEEK_READ; 896flags = Interop.Advapi32.BACKWARDS_READ | Interop.Advapi32.SEEK_READ; 903bool success = Interop.Advapi32.ReadEventLog(readHandle, flags, index, 908if (error == Interop.Errors.ERROR_INSUFFICIENT_BUFFER || error == Interop.Errors.ERROR_EVENTLOG_FILE_CHANGED) 910if (error == Interop.Errors.ERROR_EVENTLOG_FILE_CHANGED) 924success = Interop.Advapi32.ReadEventLog(readHandle, Interop.Advapi32.FORWARDS_READ | Interop.Advapi32.SEEK_READ, index, 1074SafeEventLogReadHandle handle = Interop.Advapi32.OpenEventLog(currentMachineName, logname); 1099SafeEventLogWriteHandle handle = Interop.Advapi32.RegisterEventSource(currentMachineName, sourceName); 1392bool success = Interop.Advapi32.ReportEvent(writeHandle, (short)type, category, eventID,
System\Diagnostics\Reader\EventLogException.cs (15)
20case Interop.Errors.ERROR_FILE_NOT_FOUND: 21case Interop.Errors.ERROR_PATH_NOT_FOUND: 22case Interop.Errors.ERROR_EVT_CHANNEL_NOT_FOUND: 23case Interop.Errors.ERROR_EVT_MESSAGE_NOT_FOUND: 24case Interop.Errors.ERROR_EVT_MESSAGE_ID_NOT_FOUND: 25case Interop.Errors.ERROR_EVT_PUBLISHER_METADATA_NOT_FOUND: 28case Interop.Errors.ERROR_INVALID_DATA: 29case Interop.Errors.ERROR_EVT_INVALID_EVENT_DATA: 32case Interop.Errors.RPC_S_CALL_CANCELED: 33case Interop.Errors.ERROR_CANCELLED: 36case Interop.Errors.ERROR_EVT_PUBLISHER_DISABLED: 39case Interop.Errors.ERROR_ACCESS_DENIED: 42case Interop.Errors.ERROR_EVT_QUERY_RESULT_STALE: 43case Interop.Errors.ERROR_EVT_QUERY_RESULT_INVALID_POSITION: 57HResult = Interop.HRESULT_FROM_WIN32(errorCode);
System\Diagnostics\Reader\NativeWrapper.cs (25)
92if (!status && win32Error != Interop.Errors.ERROR_NO_MORE_ITEMS) 168if (win32Error != Interop.Errors.ERROR_NO_MORE_ITEMS) 303if (win32Error == Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 364if (error != Interop.Errors.ERROR_SUCCESS 365&& error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 396if (error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 426if (error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 455if (error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 498if (error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 536if (error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 566if (win32Error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 596if (win32Error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 706if (win32Error == Interop.Errors.ERROR_NO_MORE_ITEMS) 712if (win32Error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 737if (win32Error == Interop.Errors.ERROR_NO_MORE_ITEMS) 743if (win32Error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 771if (win32Error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 803if (error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 904if (error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 954if (error != (int)Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 1004if (error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 1054if (error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 1102if (error != Interop.Errors.ERROR_INSUFFICIENT_BUFFER) 1380case Interop.Errors.ERROR_RESOURCE_LANG_NOT_FOUND: 1382case Interop.Errors.ERROR_RESOURCE_TYPE_NOT_FOUND:
System\Diagnostics\Reader\UnsafeNativeMethods.cs (36)
453[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 461[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 470[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 481[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 491[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 495[LibraryImport(Interop.Libraries.Wevtapi)] 499[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 508[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 518[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 526[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 538[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 544[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 556[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 561[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 566[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 578[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 583[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 591[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 596[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 604[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 610[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 616[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 624[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 636[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 642[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 653[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 662[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 670[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 679[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 686[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 697[LibraryImport(Interop.Libraries.Wevtapi, EntryPoint = "EvtRender", SetLastError = true)] 765[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 778[LibraryImport(Interop.Libraries.Wevtapi, EntryPoint = "EvtFormatMessage", SetLastError = true)] 792[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)] 800[LibraryImport(Interop.Libraries.Wevtapi, EntryPoint = "EvtCreateBookmark", SetLastError = true)] 804[LibraryImport(Interop.Libraries.Wevtapi, SetLastError = true)]
System\Diagnostics\SafeEventLogReadHandle.cs (1)
12return Interop.Advapi32.CloseEventLog(handle);
System\Diagnostics\SafeEventLogWriteHandle.cs (1)
13return Interop.Advapi32.DeregisterEventSource(handle);