DelphiÖÐʵÏÖÎļþ¿½±´µÄÈýÖÖ·½·¨
1£®µ÷ÓÃAPIº¯Êý
procedure CopyFile(fromFileName,ToFileName:string);
var
f1,f2:file;
Begin
AssignFile(f1,fromFileName); file://Ö¸¶¨Ô´ÎļþÃû
AssignFile(f2,ToFileName); file://Ö¸¶¨Ä¿±êÎļþÃû
Reset(f1);
Try
Rewrite(f2);
Try
If Lzcopy(TfileRec(f1).handle,TfileRec(f2).Handle)<0
Then
Raise EinoutError.creat('Îļþ¸´ÖÆ´íÎó')
Finally
CloseFile(f2); file://¹Ø±Õ f2
End;
Finally
Until length(sLine)<=0;
End;
End;
2.ÎļþÁ÷
procedure copyfile;
var f1,f2: tfilestream ;
begin
f1:=Tfilestream.Create(sourcefilename,fmopenread);
try
f2:=Tfilestream.Create(targetfilename,fmopenwrite or fmcreate);
try
f2.Copyfrom(f1,f1.size);
finally
f2.Free;
end;
finally
f1.Free;
end;
end;
3£®ÀûÓÃÄÚ´æ¿é¶ÁдbufferʵÏÖ
Procudure FileCopy(const fromfile,Tofile:string);
Var
F1,F2:file;
NumRead,Numwritten:word;
Buf:array [1..2048] of char;
Begin
AssignFile(F1,fromfile);
Reset(F1,1);
AssignFile(F2,Tofile);
Rewrite(F2,1);
Repeat
BlockRead(F1,buf,sizeof(buf),NumRead);
BlockWrite(F2,buf,Numread,NumWritten);
Until (NumRead=0) or (NumWritten<>NumRead);
CloseFile(F1);
CloseFile(F2);
End;
Ïà¹ØÎĵµ£º
º¯ÊýÒ»£º
view plaincopy to clipboardprint?
uses
Windows,
SysUtils,
Classes,
ShellAPI;
function RunAndWait(FileName: string; Visibility: Integer): THandle;&nbs ......
×î½üÐèÒª½«Magento(¹úÍâ±È½Ï³öÃûµÄ¿ªÔ´PHP+MySQLµç×ÓÉÌÎñÍøÕ¾)ÓëÒ»¸öERP½øÐÐÕûºÏ£¬¾ÍÐèÒªµ÷ÓÃMagentoµÄWebservice¡£
MagentoÌṩ2Ì×api¡£
×¢£ºÈç¹ûÐèҪͬ¹¹µ÷ÓÃÐèҪʹÓõÚ1¸öwsdl£¬ÈçÒì¹¹³ÌÐòµ÷ÓÃÐèʹÓõÚ2¸öwsdl¡£
1.http://xxx.xxxxxxx.xxx/magento/api/soap/?wsdl
2.http://xxx.xxxxxxx.xxx/magento/api/v2_soap/?ws ......
Delphi²Ù×÷XMLÊǺܷ½±ãµÄ£¬Ö÷ÒªÓÐÁ½ÖÖ·½·¨£»
1.ÓÃTClientDataSet²Ù×÷XML£»TClientDataSetÊǸöºÃ¶«Î÷£¬ÓÃËü²Ù×÷XMLÊǺܼòµ¥µÄÊ£¬²»¹ýȱµãÊÇÖ»ÄܲÙ×÷¹Ì¶¨¸ñʽµÄ XML£¬ËüÊʺϲÙ×÷±í½á¹¹µÄÊý¾Ý£¬Èç¹ûÄãÐèÒª°ÑÊý¾Ý±íµ¼³ö³ÉXMLÄÇÓÃTClientDataSetÊǸöºÃÖ÷Ò⣬±ÈÈçÏÂÃæÊÇÒ»¸öÊý¾Ý¼¯µ¼³ö³ÉXMLµÄ· ......
ÏÔʾһ¸öGIF¶¯»
procedure ShowGIF( GIFFileName : String );
var TargetFrameName,PostData,Heads,Flags : OleVariant; URL : widestring; begin TargetFrameName := '';{Ö¸¶¨FrameµÄ¿Õ×Ö·û´®Ê±,ÔòÔÚµ±Ç°FrameÖдò¿ª¶¯»Îļþ} PostData := false;{²»·¢ËÍÊý¾Ý} Heads := '';{HeaderÐÅϢΪ¿Õ} Flags := 0;{FlagsÉèΪ0} ......