我试图包含 IOUtils 库并使用 CSIDL 命令,但它不起作用......
这是执行此操作的代码部分:
//------------------- Includes -----------------------
#include <fmx.h>
#include <IOUtils.hpp>
#pragma hdrstop
#include "Unit1.h"
#include "Unit2.h"
#include "Unit3.h"
//---------------------- end ------------------------
//---- On Form Show (bugged event: It doesn't create the needed folder) ----
void __fastcall TfrmInicio::FormShow(TObject *Sender)
{
if (TDirectory::Exists("CSIDL_APPDATA\\Nintersoft\\Ninterfin")) {
if (FileExists("CSIDL_APPDATA\\Nintersoft\\Ninterfin\\Inf.nf")) {
mmInfo->Lines->LoadFromFile("CSIDL_APPDATA\\Nintersoft\\Ninterfin\\Inf.nf");
}
}
else {
TDirectory::CreateDirectory("CSIDL_APPDATA\\Nintersoft\\Ninterfin");
}
}
//--------------------------------- end ------------------------------------
我希望你能帮助我...非常感谢XD