Closed pyscripter closed 4 years ago
Thank you. This will be implemented in #2 The Models release.
You shouldn't take the SAL for granted. For instance when a callback function parameter is declared as [in], in Delphi this should be a var to avoid a $FFFFFFFF (nil) pointer exception, however on FPC this works. And so there are many others behaving different than C/C++ compiler meanings that are valid for C/C++ but not for Delphi. The only way is testing, other ways it would be easy to translate C/C++ API's, don't you think? By the way: at the time MfPack was introduced, there was a poor or wrong documentation from MS. Since Docs is introduced it gets a lot better, but still has errors and incompletions. That is for the interface function sequences as wel a different explanation comparing the header files. We keep working on it.
Windows header files have SAL annotations that make the indent of the code explicit. An example of such annotation is _Out_writesbytes. See the Annotating function parameters and return values topic. The SAL annotations should be ignored.
Example: In d2d1svg.h you have:
This is translated as:
This should be:
The above has been tested and it works.