VC动态库DLL在DELPHI下调用

一游 2009-07-15 07:32:43
BOOL __stdcall EzCfg_Open(char *pszPassWord);
void __stdcall EzCfg_Close();

int __stdcall EzCfg_GetNode(BYTE* MACAddr);
MACAddr 是这样的一个数组 BYTE MACAddr[100][6];

void __stdcall EzCfg_SetLocalIpPort(int nIndex, ULONG dwIp, USHORT nPort);
void __stdcall EzCfg_GetLocalIpPort(int nIndex, ULONG* dwIp, USHORT* nPort);

void __stdcall EzCfg_SetRemoteIpPort(int nIndex, ULONG dwIp, USHORT nPort);
void __stdcall EzCfg_GetRemoteIpPort(int nIndex, ULONG* dwIp, USHORT* nPort);

void __stdcall EzCfg_SetBaud(int nIndex, int nBaud);
void __stdcall EzCfg_GetBaud(int nIndex, int* nBaud);

void __stdcall EzCfg_SetSubnetMask(int nIndex, ULONG dwMask);
void __stdcall EzCfg_GetSubnetMask(int nIndex, ULONG* dwMask);

void __stdcall EzCfg_SetGateway(int nIndex, ULONG dwGateway);
void __stdcall EzCfg_GetGateway(int nIndex, ULONG* dwGateway);

以上为VC下DLL的导出函数,请帮忙写成DELPHI下的函数声明方式,最好每个函数有点示例

BOOL __stdcall EzCfg_Open(char *pszPassWord);
void __stdcall EzCfg_Close();

int __stdcall EzCfg_GetNode(BYTE* MACAddr);
最主要是翻译出这三个函数的用法
...全文
59 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ccrun.com 2009-07-16
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 asciil 的回复:]
ULONG* dwIp, USHORT* nPort);
对应
dwIp: PULONG; nPort: PShortInt); stdcall;

好像不对
[/Quote]

你测试一下,应该没什么问题。只要你的函数原型正确。
一游 2009-07-16
  • 打赏
  • 举报
回复
我再试试看了
sanguomi 2009-07-15
  • 打赏
  • 举报
回复
你DLL的问题,
sanguomi 2009-07-15
  • 打赏
  • 举报
回复
好象没什么问题
一游 2009-07-15
  • 打赏
  • 举报
回复
ULONG* dwIp, USHORT* nPort);
对应
dwIp: PULONG; nPort: PShortInt); stdcall;

好像不对
ccrun.com 2009-07-15
  • 打赏
  • 举报
回复
大概是这个样子:
function EzCfg_Open(pszPassWord: PChar): BOOL; stdcall;
procedure EzCfg_Close(); stdcall;

function EzCfg_GetNode(MACAddr: PByte): Integer; stdcall;

procedure EzCfg_SetLocalIpPort(nIndex: Integer; dwIp: ULONG; nPort: ShortInt); stdcall;
procedure EzCfg_GetLocalIpPort(nIndex: Integer; dwIp: PULONG; nPort: PShortInt); stdcall;

procedure EzCfg_SetRemoteIpPort(nIndex: Integer; dwIp: Cardinal; nPort: ShortInt); stdcall;
procedure EzCfg_GetRemoteIpPort(nIndex: Integer; dwIp: PULONG; nPort: PShortInt); stdcall;

procedure EzCfg_SetBaud(nIndex, nBaud: Integer); stdcall;
procedure EzCfg_GetBaud(nIndex: Integer; nBaud: PInteger); stdcall;

procedure EzCfg_SetSubnetMask(nIndex: Integer; dwMask: ULONG); stdcall;
procedure EzCfg_GetSubnetMask(nIndex: Integer; dwMask: PULONG); stdcall;

procedure EzCfg_SetGateway(nIndex: Integer; dwGateway: ULONG); stdcall;
procedure EzCfg_GetGateway(nIndex: Integer; dwGateway: PULONG); stdcall;

5,930

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧