|
-
Apr 27th, 2001, 09:22 AM
#1
Thread Starter
New Member
URLDownloadToFile From COM Component (HOW??!)
I am trying to use URL download to file within an ActiveX dll. but I cant get it to work.
The code is a follows:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Function DownloadFile(strURL As String, strLocalFilename As String) As Boolean
Dim lngRetVal As Long
DownloadFile = False
lngRetVal = URLDownloadToFile(0, strURL, strLocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
I have a feeling that the first parameter can't be null or 0 when using within a dll but I cant find out what to use instead!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|