Skip to content

Commit

Permalink
Changed visibility of MESSAGE_RESOURCE_ENTRY.GetText to internal
Browse files Browse the repository at this point in the history
  • Loading branch information
dahall committed Sep 12, 2023
1 parent fd44bc7 commit 9f00d42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PInvoke/Kernel32/WinNT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ public struct MESSAGE_RESOURCE_ENTRY
/// </summary>
public byte Text;

public static unsafe string GetText([In] MESSAGE_RESOURCE_ENTRY* mre) => mre->Flags == 0x0001 ? Marshal.PtrToStringUni(((IntPtr)(void*)mre).Offset(TextOffset.Value))! : Marshal.PtrToStringAnsi(((IntPtr)(void*)mre).Offset(TextOffset.Value))!;
internal static unsafe string GetText([In] MESSAGE_RESOURCE_ENTRY* mre) => mre->Flags == 0x0001 ? Marshal.PtrToStringUni(((IntPtr)(void*)mre).Offset(TextOffset.Value))! : Marshal.PtrToStringAnsi(((IntPtr)(void*)mre).Offset(TextOffset.Value))!;

private static Lazy<long> TextOffset => new(() => Marshal.OffsetOf(typeof(MESSAGE_RESOURCE_ENTRY), nameof(Text)).ToInt64());
}
Expand Down

0 comments on commit 9f00d42

Please sign in to comment.