Beispiel #1
0
    public static List <string> Databases(string wild = null)
    {
        IntPtr        intPtr = MySQL1.mysql_list_dbs(MySQL1.SQL, wild);
        List <string> result;

        if (intPtr == IntPtr.Zero)
        {
            result = null;
        }
        else
        {
            List <string> list = new List <string>();
            for (ulong num = 0uL; num < MySQL1.mysql_num_rows(intPtr); num += 1uL)
            {
                IntPtr ptr = MySQL1.mysql_fetch_row(intPtr);
                list.Add(Marshal.PtrToStringAnsi(Marshal.ReadIntPtr(ptr)));
            }
            result = list;
        }
        return(result);
    }