Skip to content

Commit c6e115d

Browse files
committed
Add XML doc for OutputDebugString usage
Added a summary comment explaining the compatibility and usage of OutputDebugString in .NET AOT environments on Windows, including platform and declaration requirements.
1 parent 5b572a8 commit c6e115d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/c#/GeneralUpdate.Common/Internal/Trace/WindowsOutputDebugListener.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ namespace GeneralUpdate.Common.Internal;
66

77
public class WindowsOutputDebugListener : TraceListener
88
{
9+
/// <summary>
10+
/// Does not affect .NET AOT compilation and runtime on the Windows platform, provided that the following conditions are met:
11+
/// The target platform is restricted to Windows (due to the dependency on kernel32.dll);
12+
/// The function declaration is static (not dynamically generated).
13+
/// This syntax is safe in an AOT environment and can properly work with Dbgview.exe to capture logs.
14+
/// </summary>
15+
/// <param name="lpOutputString"></param>
916
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
1017
private static extern void OutputDebugString(string lpOutputString);
1118

0 commit comments

Comments
 (0)