library TestDll;uses
SysUtils,
windows,
Classes;function UrlDownLoadToFile(Caller,URL,FileName: PAnsiChar;Reserved: LongWord;
StatusCB: Pointer): LongWord;
stdcall; external 'URLMON.DLL' name 'URLDownloadToFileA';function downloadfile(sourcefile, destfile: string): boolean; stdcall;begintryresult:= urldownloadtofile(nil, pchar(sourcefile), pchar(destfile), 0, nil) = 0;exceptresult:= false;end;end;procedure down;stdcall;
begin
downloadfile('####', '####")
end;
-----------------------------------------------------------------------
我用rundll32 testdll.dll,down 怎么不能下载????___________________________________________________________________________
SysUtils,
windows,
Classes;function UrlDownLoadToFile(Caller,URL,FileName: PAnsiChar;Reserved: LongWord;
StatusCB: Pointer): LongWord;
stdcall; external 'URLMON.DLL' name 'URLDownloadToFileA';function downloadfile(sourcefile, destfile: string): boolean; stdcall;begintryresult:= urldownloadtofile(nil, pchar(sourcefile), pchar(destfile), 0, nil) = 0;exceptresult:= false;end;end;procedure down;stdcall;
begin
downloadfile('####', '####")
end;
-----------------------------------------------------------------------
我用rundll32 testdll.dll,down 怎么不能下载????___________________________________________________________________________
解决方案 »
- 求助:把字符串转换成16位MD5的源码
- tchart坐标设定
- 我用D7写DDE程序,客户端可以Request,服务端怎么没有响应的事件或方法!是要交互的而不是只控制服务器做事而不回复的。。。不知道我说明白了没有
- 麻烦大家推荐一个比较好用的 Socket 类。要免费的。 客户端的就行了。
- 各位大虾,高分求助关于TreeView的父节点拖动问题
- 在OpenDialog上如何加一个按钮?
- 急急急急!!!!!! Dephi如何进行文件操作
- 各位高手:如何在界面上加入GIF格式的图片
- 各位高手:我的程序中客户端需要通过Socket与服务器通讯以存取数据库中的数据,包括浏览、查询、增、删、改等,是否能够实现?
- 菜鸟送分:多字段索引
- WebBrowser中(内核为IE7),向网页中填写内容时的问题
- 非常奇怪的文件格式
自己Debug找找问题吧
能不能给个socket在dll应运的例子
我找不见问题所在,你帮我写个吧
var
FFile: TFileStream;
begin
with TIdHTTP.Create(nil) do
try
FFile := TFileStream.Create(ADestFile, fmCreate or fmOpenReadWrite);
try
Get(AUrl, FFile);
Result := FFile.Size;
finally
FFile.Free;
end;
finally
Free;
end;
end;