哦,还是很容易,不过你没有问清楚罢了。
var
hCur : hDBICur;
Config : CFGDesc;
ContinueIt: boolean;
begin
if DbiInit(nil) = DBIERR_NONE then
begin
hCur := nil;
if DbiOpenCfgInfoList(nil, dbiREADWRITE, cfgPersistent,
'/DRIVERS/PARADOX/INIT', hCur) = DBIERR_NONE then
begin
if DbiSetToBegin(hCur) = DBIERR_NONE then
begin
ContinueIt := true;
while ContinueIt do
begin
if(DbiGetNextRecord(hCur, dbiWRITELOCK, @Config, nil)
<> DBIERR_NONE) then
ContinueIt := false
else
if StrIComp(Config.szNodeName, 'NET DIR') = 0 then
begin
StrCopy(Config.szValue, 'C:/NewDir');
DbiModifyRecord(hCur, @Config, true);
ContinueIt := false
end;
end;
end;
end;
DbiExit();
end;
end;