调用dll中函数出现访问0地址错误
raised too many consecutive exceptions我在dll中写了一个函数openfile(filename:pchar)函数
在其他程序中调用
myfilename:=pchar(extractfilepath(application.ExeName)+'answer\'+ComBNum.Text+'.ods');
try
OpenFile(myfilename);
except
messagebox(handle,'没有文件可以打开','警告',MB_OK);出现上述错误,请帮忙!
raised too many consecutive exceptions我在dll中写了一个函数openfile(filename:pchar)函数
在其他程序中调用
myfilename:=pchar(extractfilepath(application.ExeName)+'answer\'+ComBNum.Text+'.ods');
try
OpenFile(myfilename);
except
messagebox(handle,'没有文件可以打开','警告',MB_OK);出现上述错误,请帮忙!
解决方案 »
- TPageControl 的一个问题。。。。。。。。。
- 如何提取oleVariant变量的每个字节,如何读一每个字节的数据进行位操作
- 急!急!急!更改注册表,帮帮忙!
- 如何在网页中实现在线播放功能呀?
- 帮新手了!!!!帮者有分
- 请教使用ADO开发三层结构中一些错误提示的问题,欢迎发言
- 关于自制组件的注册问题?
- 用DELPHI编写的IE地址栏监测程序,欢迎大家试用,详情见内
- 在我的DELPHI 5。0中 BUTTON的CAPTION中我设为 &O确定但字符O下没有下花线这是什么回事呀(快捷方式有用)
- to Venne
- 关于组件
- 求《Programming Microsoft DirectShow for Digital Video and Television》电子书及源码
还有,PChar类型不是那么付值的。可以使用如下方法:
var
myfilename: string;
begin
myfilename := extractfilepath(application.ExeName) + 'answer\' + ComBNum.Text + '.ods'
try
OpenFile(PChar(myfilename));
except
messagebox(handle,'没有文件可以打开','警告',MB_OK);
end;
end;