/// <summary> /// Reads data to the NSudo logging infrastructure. /// </summary> /// <param name="Sender"> /// The sender name of the data. /// </param> /// <param name="Content"> /// The content of the data. /// </param> public void WriteLog( string Sender, string Content) { if (NSudoWriteLogInstance == null) { NSudoWriteLogInstance = GetFunctionAddress <NSudoWriteLogType>( "NSudoWriteLog"); } NSudoWriteLogInstance( Sender, Content); }
/// <summary> /// Reads data to the NSudo logging infrastructure. /// </summary> /// <param name="Sender"> /// The sender name of the data. /// </param> /// <param name="Content"> /// The content of the data. /// </param> public void WriteLog( string Sender, string Content) { IntPtr NSudoWriteLogInstanceAddress = Win32.GetProcAddress( this.ModuleHandle, "NSudoWriteLog"); if (NSudoWriteLogInstanceAddress == IntPtr.Zero) { throw new Win32Exception(Marshal.GetLastWin32Error()); } NSudoWriteLogType NSudoWriteLogInstance = Marshal.GetDelegateForFunctionPointer <NSudoWriteLogType>( NSudoWriteLogInstanceAddress); NSudoWriteLogInstance( Sender, Content); }