Git Product home page Git Product logo

Comments (2)

CMCHTPC avatar CMCHTPC commented on August 26, 2024

Cause the calling convention is stdcall, The 'in' params are casted as call by reference in this case. This is to be compatible to the COM standard. So for FPC the "const" keyword is not necessary. For Delphi I don't know, but I think should be the same behavior.

from delphidx12.

FactoryXCode avatar FactoryXCode commented on August 26, 2024

The C++ const does not exactly behave like Delphi const.
However for instance; When pointers to structs are required and alignment is the same, you should use const in the Delphi translation too.

In this case the function should be (At least in Delphi XE7. From Delphi 10.3 Nullable types are introduced):
/// <summary> /// Create a D2D bitmap by copying a WIC bitmap. /// </summary> //<= Delphi 10.2 function CreateBitmapFromWicBitmap(wicBitmapSource: IWICBitmapSource; bitmapProperties: PD2D1_BITMAP_PROPERTIES1 = Nil; out bitmap: PID2D1Bitmap1): HResult; stdcall; //>= Delphi 10.3 function CreateBitmapFromWicBitmap(wicBitmapSource: IWICBitmapSource; bitmapProperties: D2D1_BITMAP_PROPERTIES1 = Nil; out bitmap: PID2D1Bitmap1): HResult; stdcall;

from delphidx12.

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.