Exemplo n.º 1
0
    public Int32 DLL_FileSystem_AtList(ref LISTDATA listData, Int32 atNum, ref string dest)
    {
        var s      = new byte[8192];
        var result = GetProcAddress <Functions.DLL_FileSystem_AtList>()(ref listData, atNum, s, 8192);

        if (result > 0)
        {
            dest = Encoding.UTF8.GetString(s, 0, result);
        }
        else
        {
            dest = "";
        }
        return(result);
    }
Exemplo n.º 2
0
    public string[] GetFiles(ref Cm3d2Dll.FSDATA fsdata)
    {
        var listdata = new LISTDATA();

        DLL_FileSystem_CreateList(ref fsdata, "", 3, ref listdata);

        var filenames = new string[listdata.size];

        for (int i = 0; i < listdata.size; i++)
        {
            string str = "";
            DLL_FileSystem_AtList(ref listdata, i, ref str);
            filenames[i] = str;
        }
        DLL_FileSystem_DeleteList(ref listdata);
        return(filenames);
    }
Exemplo n.º 3
0
 public void DLL_FileSystem_DeleteList(ref LISTDATA listData)
 {
     GetProcAddress <Functions.DLL_FileSystem_DeleteList>()(ref listData);
 }
Exemplo n.º 4
0
 public void DLL_FileSystem_CreateList(ref FSDATA fsdata, string path, Int32 listType, ref LISTDATA listData)
 {
     GetProcAddress <Functions.DLL_FileSystem_CreateList>()(ref fsdata, stringToNullTerminatedUtf8(path), listType, ref listData);
 }