Windows API help with CopyFileExA() and Callback to show Progress

Its the same trick I’m using here. :wink:

TLDR, the compiler isnt too fussy about the data types used in api declarations in clarion map modules() and windows isnt either provided the number of bytes of each parameter matches up in the right order.

A Real is an 8byte data type, so it gets its bytes and only later in the runtime does the code to process a Real get used.

A Real could be used where ever an 8byte parameter is specified, which would be alot of the 64bit api’s.

I should add, where you need to match the calling convention like whats detailed here x86 calling conventions - Wikipedia
just reverse the order of the parameters like I did, so these are the same

  map
  module('win32')
  Pragma ('call(c_conv=> on)')
  someWinAPIusingC(MatchingByteLengthDataType param1, MatchingByteLengthDataType param2),C
  Pragma ('call(c_conv=> off)')
  end
  end

  map
  module('win32')
  someWinAPIusingC(MatchingByteLengthDataType param2, MatchingByteLengthDataType param1)
  end
  end

I think its a few levels of progression up from a vintage tupperware shape sorter ball. :nerd_face: