将delphi的dll给vc调用遇到的问题
我将别人以前写的一个delphi转换为dll,给vc调用。
导出函数定义如下:
Delphi(Pascal) code:
function CreateDoubleLayerPDF (sPath:PChar):integer; stdcall;
begin
Application.Initialize;
Application.CreateForm(Tfrm_main, frm_main);
frm_main.SetPath(sPath);
Application.Run;
result := 0;
end;
exports CreateDoubleLayerPDF;
在Tfrm_main中的退出过程中,直接调用close;
但是vc调用后,直接退出,会出现错误,提示如下:the value of ESP was not properly saved across a fnction call.This is usually a result of callin a function declared with one calling convention with a function pointer declared with a different calling convention。
VC中调用的函数定义如下:typedef int(*CreatePDF)(char*);
急啊!!大家帮帮忙吧!
如需要阅读该回复,请登录或注册CSDN!
相关问答:
已知Python 中:
s = unicode("测试", "gb2312")
s = u'\u6d4b\u8bd5'
print s
测试
在Delphi里面如何将\u6d4b\u8bd5这样的还原成Gb2312的汉字呢?
找到个方法
......
这个是拦截按键消息并测试是否为ENTER键。
begin
case wParam of
WM_KEYDOWN:
fEatKeystroke := (p.vkCode = VK_RETURN);
& ......
Delphi
怎样获取网页部分内容(代码),并且显示出来!
(只是网页里面的一部分内容并不是全部)
没弄懂!
类似websever的功能?
估计是利用ie的接口。。。。。。。。
是类似websever的功能 ......
昨晚在Delphi数据库查询中遇到了一个疑惑。代码如下:
procedure TFormSearchAchievement.ComboBoxXYChange(Sender: TObject);
var
XY : string;
begin
XY := comboboxxy.Items[comboboxx ......
研发类:
• 系统架构师 1名
• 职位要求:
1、Delphi 4年以上开发经验、 同时熟悉C++等开发语言和基于Windows的编程;
2、精通面向对象的编程方式;
3、熟练掌握UML及相关工具; ......