예제 #1
0
        public static string[] TableNames(SE_CONNECTION_64 connection)
        {
            try
            {
                unsafe
                {
                    Pointer2Pointer ptr = new Pointer2Pointer();
                    System.Int64    num = 0;


                    if (Wrapper92_64.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++)
                    {
                        Int64 result = Wrapper92_64.SE_reginfo_has_layer(reginfo[i]);
                        if (result != 0)
                        {
                            byte[] buffer = new byte[CONST.SE_QUALIFIED_TABLE_NAME];
                            Wrapper92_64.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];
                             * Wrapper92_64.SE_reginfo_get_description(reginfo[i], buffer);
                             * string descr = System.Text.Encoding.ASCII.GetString(buffer).Replace("\0", "");
                             * sb.Append(" ("+descr+")" + ";");
                             * */
                        }
                        Wrapper92_64.SE_reginfo_free(reginfo[i]);
                    }
                    return(sb.ToString().Split(';'));
                }
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
예제 #2
0
 public static extern System.Int64 SE_registration_get_info_list(SE_CONNECTION_64 connection, ref Pointer2Pointer reg_list_addr, ref System.Int64 count_addr);