注册 登录
编程论坛 Delphi论坛

delphi 调用c++ dll

mdxhappy 发布于 2013-11-12 15:54, 2971 次点击
请教个问题,Delphi调用c++的dll,,有遇到的吗,感觉是hwnd的问题。procedure ShowDlg(hMainWnd:hwnd;szContent:PWideChar;szURL:PWideChar;nAutoCloseTimer:integer);stdcall;
external 'cnee.dll' name 'ShowDlg';
ShowDlg(self.Handle,'平台','http://www.baidu.com',10);
6 回复
#2
wp2319572013-11-12 15:55
没看明白你想问什么
#3
mdxhappy2013-11-12 16:20
就是delphi 调用c++ dll 出错
只有本站会员才能查看附件,请 登录
#4
mdxhappy2013-11-12 16:21
c++ 接口函数 void ShowDlg(HWND hMainWnd, TCHAR *szContent, TCHAR *szURL, UINT nAutoCloseTimer)
#5
mdxhappy2013-11-12 16:24
版主,帮忙看下啊
#6
wp2319572013-11-12 16:25
既然是c++接口

那么stdcall 就是不对的

试试

procedure ShowDlg(hMainWnd:hwnd;szContent:PWideChar;szURL:PWideChar;nAutoCloseTimer:integer);cdecl ;
external 'cnee.dll' name 'ShowDlg';
#7
mdxhappy2013-11-12 16:27
谢了,我搞了半天没搞定,
1