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

◆ NFD_SaveDialog()

static unsafe nfdresult_t nativefiledialog.NFD_SaveDialog ( string filterList,
string defaultPath,
out string outPath )
inlinestatic

Definition at line 104 of file nativefiledialog.cs.

105 {
106 byte* intPtr = Utf8EncodeNullable(filterList);
107 byte* ptr = Utf8EncodeNullable(defaultPath);
108 IntPtr outPath2;
109 nfdresult_t result = INTERNAL_NFD_SaveDialog(intPtr, ptr, out outPath2);
110 Marshal.FreeHGlobal((IntPtr)intPtr);
112 outPath = UTF8_ToManaged(outPath2, freePtr: true);
113 return result;
114 }
static void FreeHGlobal(IntPtr hglobal)
Definition Marshal.cs:1680
static unsafe nfdresult_t INTERNAL_NFD_SaveDialog(byte *filterList, byte *defaultPath, out IntPtr outPath)
static unsafe string UTF8_ToManaged(IntPtr s, bool freePtr=false)
static unsafe byte * Utf8EncodeNullable(string str)

References System.Runtime.InteropServices.Marshal.FreeHGlobal(), INTERNAL_NFD_SaveDialog(), UTF8_ToManaged(), and Utf8EncodeNullable().