public string[] GetKeys(string group_name) { IntPtr error; IntPtr native_group_name = Marshaller.StringToPtrGStrdup(group_name); string[] ret = Marshaller.NullTermPtrToStringArray(g_key_file_get_keys(Handle, native_group_name, IntPtr.Zero, out error), true); Marshaller.Free(native_group_name); if (error != IntPtr.Zero) { throw new GException(error); } return(ret); }
public string[] GetLocaleStringList(string group_name, string key, string locale) { IntPtr error; IntPtr native_group_name = Marshaller.StringToPtrGStrdup(group_name); IntPtr native_key = Marshaller.StringToPtrGStrdup(key); IntPtr native_locale = Marshaller.StringToPtrGStrdup(locale); string[] ret = Marshaller.NullTermPtrToStringArray(g_key_file_get_locale_string_list(Handle, native_group_name, native_key, native_locale, IntPtr.Zero, out error), true); Marshaller.Free(native_group_name); Marshaller.Free(native_key); Marshaller.Free(native_locale); if (error != IntPtr.Zero) { throw new GException(error); } return(ret); }