public static unsafe nfdresult_t NFD_PickFolder( string defaultPath, out string outPath ) { byte * defaultPathPtr = Utf8EncodeNullable(defaultPath); IntPtr outPathPtr; nfdresult_t result = INTERNAL_NFD_PickFolder( defaultPathPtr, out outPathPtr ); Marshal.FreeHGlobal((IntPtr)defaultPathPtr); outPath = UTF8_ToManaged(outPathPtr, true); return(result); }
public static unsafe nfdresult_t NFD_OpenDialogMultiple( string filterList, string defaultPath, out nfdpathset_t outPaths ) { byte *filterListPtr = Utf8EncodeNullable(filterList); byte *defaultPathPtr = Utf8EncodeNullable(defaultPath); nfdresult_t result = INTERNAL_NFD_OpenDialogMultiple( filterListPtr, defaultPathPtr, out outPaths ); Marshal.FreeHGlobal((IntPtr)filterListPtr); Marshal.FreeHGlobal((IntPtr)defaultPathPtr); return(result); }
public static unsafe nfdresult_t NFD_SaveDialog( string filterList, string defaultPath, out string outPath ) { byte * filterListPtr = Utf8EncodeNullable(filterList); byte * defaultPathPtr = Utf8EncodeNullable(defaultPath); IntPtr outPathPtr; nfdresult_t result = INTERNAL_NFD_SaveDialog( filterListPtr, defaultPathPtr, out outPathPtr ); Marshal.FreeHGlobal((IntPtr)filterListPtr); Marshal.FreeHGlobal((IntPtr)defaultPathPtr); outPath = UTF8_ToManaged(outPathPtr, true); return(result); }