I have translated the prototype for DoFileDownload from VB to Delphi as follows:

VB:
Private Declare Function DoFileDownload Lib "shdocvw" (ByVal lpszFile As String)
As Long

Delphi:
function DoFileDownload(lpszFile: PChar): Longint; far; external 'shdocvw.dll';

When I call it, I get a warning dialog "Download could not complete" with a
series of unprintable characters followed by the word "from".
The program is then apparently closed by Windows.

As I understand this call, lpszFile is the URL to download.

Thought it might be a widestring, so redefined as:
function DoFileDownload(lpszFile: PWideChar): Longint; far; external
'shdocvw.dll';

No joy.

Anyone have a very simple working example that makes this call?

Thanks,

Glenn Lawler
www.incodesystems.com


Reply via email to