[fpc-pascal] passing "array of const" into cdecl procvar

Maciej Izak hnb.code at gmail.com
Fri May 13 21:47:36 CEST 2016


2016-05-13 17:58 GMT+02:00 Seth Grover <sethdgrover at gmail.com>:

> How can I do this? Is there any way for me to pass an array of const
> argument through directly to a cdecl'ed procvar call?
>

Sven is wrong, of course you can, but it requires some work. Maybe not much
multi-platform and in few cases limited but works fine for x86 on Windows.

Look my old question and great answer from Barry Kelly:

http://stackoverflow.com/questions/2305962/delphi-array-of-const-to-varargs

It can be ported to other platforms/architectures but not so easy :)

-- 
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160513/2e7ca798/attachment.html>


More information about the fpc-pascal mailing list