public static string[] TableNames(SE_CONNECTION connection) { try { unsafe { Pointer2Pointer ptr = new Pointer2Pointer(); System.Int32 num = 0; if (Wrapper10.SE_registration_get_info_list(connection, ref ptr, ref num) != 0) { return(null); } IntPtr *reginfo = (System.IntPtr *)ptr.pointer[0]; StringBuilder sb = new StringBuilder(); for (int i = 0; i < num; i++) { Int32 result = Wrapper10.SE_reginfo_has_layer(reginfo[i]); if (result != 0) { byte[] buffer = new byte[CONST.SE_QUALIFIED_TABLE_NAME]; Wrapper10.SE_reginfo_get_table_name(reginfo[i], buffer); string table = System.Text.Encoding.ASCII.GetString(buffer).Replace("\0", ""); sb.Append(table); /* * buffer = new byte[CONST.SE_MAX_DESCRIPTION_LEN]; * Wrapper10.SE_reginfo_get_description(reginfo[i], buffer); * string descr = System.Text.Encoding.ASCII.GetString(buffer).Replace("\0", ""); * sb.Append(" ("+descr+")" + ";"); * */ } Wrapper10.SE_reginfo_free(reginfo[i]); } return(sb.ToString().Split(';')); } } catch (Exception ex) { return(null); } }
public static extern System.Int32 SE_registration_get_info_list(SE_CONNECTION connection, ref Pointer2Pointer reg_list_addr, ref System.Int32 count_addr);