indy10中的DirectoryListing怎么使用?
从网上查到需要将UseMLIS属性设置为true,然后在头文件中包含“IdAllFTPListParsers.hpp”;
可是我在使用的时候为什么还是“No Ftp list parsers have been registered”这个错呢?环境是c++builder 2010,控件版本是indy10
idftp2->Disconnect();
idftp2->Host = "192.168.1.12";
idftp2->Port = 21;
idftp2->Username = "111";
idftp2->Password = "111123";
try
{
idftp2->Connect();
TStringList *a = new TStringList();
idftp2->ChangeDir("cc");
idftp2->List(a);
ShowMessage(idftp2->DirectoryListing->Count);
}
catch(Exception &e)
{
s = "网络连接失败,请检查\n" + e.Message;;
ts = "提示:";
Application->MessageBoxA(s.c_bstr(),ts.c_bstr(),MB_OK+16);
}