现有一个接口说明:
函数名:getcompinfo
入口参数:无。
出口参数:字符串。
格 式:getcompinfo(szOut)
函数返回值:0,正确;非0整数,错误码。
出口参数说明:
序号 数据项 类型 长度 说明
1 编号 C 20
2 名称 C 200 我用delphi写的代码:
function getcompinfo(var szout:pchar):integer;stdcall;external 'abc.dll'
procedure aaa();
var
str : pchar; i:integer;
begin
if getcompinfo(str) = 0 then
showmessage(str);
end;跟踪得到的结果:str:Inaccessible value
看起来是内存不足,请帮忙看看如何解决。谢谢。
函数名:getcompinfo
入口参数:无。
出口参数:字符串。
格 式:getcompinfo(szOut)
函数返回值:0,正确;非0整数,错误码。
出口参数说明:
序号 数据项 类型 长度 说明
1 编号 C 20
2 名称 C 200 我用delphi写的代码:
function getcompinfo(var szout:pchar):integer;stdcall;external 'abc.dll'
procedure aaa();
var
str : pchar; i:integer;
begin
if getcompinfo(str) = 0 then
showmessage(str);
end;跟踪得到的结果:str:Inaccessible value
看起来是内存不足,请帮忙看看如何解决。谢谢。
解决方案 »
- 不同数据库结构相同的表之间复制记录,但是有一列是自动赋值的,怎么设置IDENTITY_INSERT 为 ON
- 高手求救,线程同步问题
- 急啊,怎么办,“没有执行可选特性”,没法执行sql语句。问题在哪里啊?
- 关于在dxdbgrid中对记录进行拖缀的问题
- 我做了个三层结构的东西,在xp和2000下能正常运行,但在98下,找不到server,连不上服务器
- 单步跟踪的时候,怎样才能不进入控件的代码?
- 如何将鼠标改为自己想要的图片内容??VB中控件就提供自定义鼠标图片,但DELPHI中不知如何做??
- 如何比较字符串和label长度?
- 如何让程序对STRING的每行信息数其字符数,要求得到包括空格多少字,不包括空格多少字。其中汉字,字母,标点符号都算一位。
- 用delphi开发Client\Server应用程序,ODBC和BDE如何配置
- Delphi调用vc的dll文件,怎么解决响应问题?
- 用delphi7写的程序 要使用串口 软件打开不报错但是在软件里面串口显示无法打开
序号 数据项 类型 长度 说明
1 编号 C 20
2 名称 C 200
需要分配220的空间,你就声明了一个str:Pchar,没有分配空间
var
str : pchar; i:integer;
begin
Getmem(str,220);
if getcompinfo(str) = 0 then
showmessage(str);
end;这样写也还是一样啊
function getcompinfo(out szout: WideString): integer;stdcall;external 'abc.dll'
procedure aaa();
var
str: WideString;
begin
if getcompinfo(str) = 0 then
showmessage(str);
end;
那个东西需要.net的,再有,他可能是activex dll,非标准dll