Git Product home page Git Product logo

Comments (5)

GCuser99 avatar GCuser99 commented on July 19, 2024

Edit: Passing Null does not work. Crashes app.

from windevlib.

fafalone avatar fafalone commented on July 19, 2024

Nothing is the proper thing to pass for an optional ByVal interface you're not using.

ret = UrlDownloadToFile(Nothing, Url, filePath, 0&, Nothing)

Null is misleading; it's a special Variant thing, doesn't work with anything else.

vbNullPtr is only for UDTs. If you find an argument that's now a UDT where before it was "As Any" and you were passing ByVal 0, you'd now pass vbNullPtr (No ByVal, but that's likely to change before tB 1.0 to more clearly indicate we mean to pass a null pointer.)

I've asked Wayne to give us a single consistent equivalent of C/C++ NULL, so hopefully less confusing in the future.

from windevlib.

GCuser99 avatar GCuser99 commented on July 19, 2024

That makes sense, now that you point it out. I don't know why I didn't think of it. Thanks Jon!

from windevlib.

GCuser99 avatar GCuser99 commented on July 19, 2024

It might be helpful to add a note for novices like me in your (very excellent BTW!) Readme that:
"You should pass Nothing to an optional argument ByVal [Interface] that you are not using".

from windevlib.

fafalone avatar fafalone commented on July 19, 2024

I'll add that and try to make the section clearer, thanks for the feedback. 👍

from windevlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.