The second parameter of ModifyWorldTransform is specified as "var" it should be a pointer.
Original Reporter info from Mantis: 440bx @440bx
-
Reporter name:
Original Reporter info from Mantis: 440bx @440bx
- Reporter name:
Description:
When the mode in ModifyWorldTransform is set to MWT_IDENTITY the transform (second parameter) can be nil/NULL as stated in:
MSDN quote begin:
MWT_IDENTITY Resets the current world transformation by using the identity matrix. If this mode is specified, the XFORM structure pointed to by lpXform is ignored.
MSDN quote end.
Since the MSDN definition allows for nil/NULL to be passed as a parameter, the FPC definition should probably be overloaded with something along the lines of:
function ModifyWorldTransform(dc :HDC; Transform : PXFORM; Mode : DWORD)
: HDC; stdcall; external 'gdi32.dll';
NOTE: the Delphi (v2) has the same problem but, overloading the definition will not cause a compatibility problem.
Steps to reproduce:
code a call to ModifyWorldTransform passing nil as the second parameter, it will not compile (it compiles and executes as it should in C/C++.)
Mantis conversion info:
- Mantis ID: 35257
- OS: Windows
- OS Build: NT+
- Platform: 32 and 64bit
- Version: 3.0.4
- Fixed in revision: 41893 (#28c15a95)