• Welcome to Theos PowerBasic Museum 2017.

Compiler problem with API Function URLDownloadToFile

Started by Marty Francom, November 08, 2011, 03:34:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marty Francom

Jose'
   I am converting a very simple FF31/PB9 program that used the WinAPI and would
compile just fine using FF31/PB9/WinAPI   But when I compile using FF35/PB10/JoseAPI
I get the following compile error.  See screen print:

   Any suggestion?   I have attached the project file.

I posted both here and on FireFly Forum.  I am thinking that this may
be an API problem and you may be able to spot the problem quickly.
Anyway any help you can offer is most appreciated.

José Roca

Use


If UrlDownloadToFile(NOTHING, URLPath, LocalPath, 0, NOTHING) = 0 Then


The one in the PB include files is wrongly declared because they don't have support for low-level COM interfaces.

Marty Francom

Jose's
    Thank you for help.
That worked (of coarse) .

But where does the NOTHING variable come from?
I am guessing it must be defined in your APIs.

       

José Roca

It's not a variable, but a PB reserved word. It can be used to replace any OBJECT variable parameter.  In this case, the compiler passes a null object (or a pointer to a null object if BYREF) in place of a typical parameter.