Помогите, пожалуйста, есть 2 функции на Дельфи, нужно для C++ Builder
| Код | procedure ListDir(Path: string; FileList: TStrings); var SR: TSearchRec; begin if FindFirst(Path + '*.*', faDirectory, SR) = 0 then begin repeat if (SR.Attr <> faAnyfile) then begin FileList.Add(Path + SR.Name); end; until FindNext(SR) <> 0; FindClose(SR); end; end;
function GetWinDir():string; var buffer:string; len:uint; begin setlength(buffer,MAX_PATH + 1); len := getwindowsdirectory(PAnsiChar(buffer),MAX_PATH); setlength(buffer,len); GetWinDir := buffer; end;
|
|