如何在 Delphi 中实现以下 Windows 函数?
HRESULT URLDownloadToFile(
LPUNKNOWN pCaller,
LPCTSTR szURL,
LPCTSTR szFileName,
DWORD dwReserved,
LPBINDSTATUSCALLBACK lpfnCB
);
URLDownloadToFile 函数:http://msdn.microsoft.com/en-us/library/ms775123(VS.85).aspx
这里提出了提示我的问题。
Downloading flv from youtube using curlpp on top of curl - video not playing
问候,彼得。
最佳答案
uses
URLMon, ShellApi;
function DownloadFile(SourceFile, DestFile: string): Boolean;
begin
try
Result := UrlDownloadToFile(nil, PChar(SourceFile), PChar(DestFile), 0, nil) = 0;
except
Result := False;
end;
end;
关于Delphi 使用 URLDownloadToFile 从 Internet 下载视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4067434/