Delphi “array of const” to “varargs”

后端 未结 4 647
囚心锁ツ
囚心锁ツ 2020-12-16 23:19

Please help! I need this conversion to write wrapper for some C headers for Delphi.

As an example:

function pushfstring(fmt: PAnsiChar): PAnsiChar; c         


        
4条回答
  •  误落风尘
    2020-12-16 23:55

    An "array of const" is actually an array of TVarRec, which is a special variant type. It's not compatible with varargs, and you really should be able to call the varargs function directly without a wrapper around it.

提交回复
热议问题