Ik ben bezig met een mp3 verzend progje te maken... Met server en client...
Maar nu probeer ik een mp3 te splitten en geeft hij de error:
Code:
[Error] Server.pas(128): Undeclared identifier: 'TNLDFileSplitter'
Nu weet ik niet hoe dit komt, moet ik iets toevoegen zodat TNLDFileSplitter wel herkent wordt...
dit is mijn code tot nu toe
Code:
procedure TForm1.Button4Click(Sender: TObject);
function BrowseDialog(const Title:string; const Flag:integer):string;
var
lpItemID: PItemIDList;
BrowseInfo:TBrowseInfo;
DisplayName: array[0 ..MAX_PATH] of char;
TempPath: array[0 ..MAX_PATH] of char;
i:integer;
begin
// file openen
opendialog1.options:=opendialog1.options + [ofFileMustExist];
opendialog1.Options:=opendialog1.options - [ofAllowMultiSelect];
if opendialog1.execute then
edit2.text:=opendialog1.filename;
// destination //
result:='';
FillChar(BrowseInfo,sizeof(TBrowseInfo),#0);
with BrowseInfo do
begin
hwndowner:=Application.handle;
pszDisplayName:=@DisplayName;
lpszTitle:=pchar(Title);
ulFlags:=Flag;
end;
lpItemID:=SHBRowseForFolder(BrowseInfo);
if lpItemID <> nil then
begin
SHGetPathFromIDList(lpItemID,TempPath);
Result:=TempPath;
GlobalFreePtr(lpItemID);
end;
end;
const
//toon hint in BrowseDialog, ontbreekt in ShlObj
BIF_UAHINT = $100;
var
dir:string;
fs:TNLDFileSplitter;
begin
//gebruik de newstyle dialog
dir:=BrowseDialog('Select destination dir',{BIF_USENEWUI}BIF_NEWDIALOGSTYLE or BIF_UAHINT);
if dir <> '' then
edit2.Text:=dir;
end;
///aantal packeds
//LblSplitPieces.Caption:=inttostr('9999');
/////splitten
fs:=TNLDFileSplitter.create(nil);
try
fs.Onspliterror:=doedeerror;
fs.OnBeforeSplit:=doevoordesplit;
fs.OnAfterSplit:=doenadesplit;
fs.AutoCreateDir:=ChkAutoCreateDir.checked;
fs.FileName:=EdtSplitFileName.Text;
fs.DestDir:=EdtSplitDestDir.Text;
fs.numberofpieces:=udSplitPieces.Position;
fs.SizeOfPieces:=strtoint(edtsize.text);
fs.SplitOptions:=TSplitoptions(rgSplitOptions.itemindex);
fs.split;
finally
fs.free;
/////////zenden data....../////////////////////////////////
end
.
Wie kan mij helpen?
bvd,
Bookmarks