Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetLocalizedNameByNativeResource()

static unsafe string System.TimeZoneInfo.GetLocalizedNameByNativeResource ( string filePath,
int resource )
inlinestaticprivate

Definition at line 2763 of file TimeZoneInfo.cs.

2764 {
2765 IntPtr intPtr = IntPtr.Zero;
2766 try
2767 {
2769 if (intPtr != IntPtr.Zero)
2770 {
2771 char* ptr = stackalloc char[500];
2772 int num = Interop.User32.LoadString(intPtr, (uint)resource, ptr, 500);
2773 if (num != 0)
2774 {
2775 return new string(ptr, 0, num);
2776 }
2777 }
2778 }
2779 finally
2780 {
2781 if (intPtr != IntPtr.Zero)
2782 {
2784 }
2785 }
2786 return string.Empty;
2787 }
static bool FreeLibrary(IntPtr hModule)
static IntPtr LoadLibraryEx(string libFilename, IntPtr reserved, int flags)
static unsafe int LoadString(IntPtr hInstance, uint uID, char *lpBuffer, int cchBufferMax)

References Interop.Kernel32.FreeLibrary(), Interop.Kernel32.LoadLibraryEx(), Interop.User32.LoadString(), and System.IntPtr.Zero.

Referenced by System.TimeZoneInfo.GetLocalizedNameByMuiNativeResource().