Delphi 调用C++ DLL中的函数怎么声明?

2025-05-17 10:20:05
推荐回答(2个)
回答(1):

function 函数名(参数..): 返回值; stdcall; external dll文件;
例如
function dtywzxUI(nCode:Integer; lParam:Integer; lpcszBuffer:PChar): Integer; stdcall; external 'dtywzxUI.dll';

回答(2):

declare时要考虑C function的标准,后续要加stdcall;