用DELPHI 做的 DLL 返回 PCHAR 类型,返回值一长就会出错,请教如何解决? 100酬谢!谢谢!!返回值短的时候好像没有任何问题
解决方案 »
- 支持bdmh任大版主
- Intraweb7做的程序读取下一级文件夹出错,除了files外,为什么?
- 怎样控制TEdit中的文本输入只接受英文字母?而不是汉字?
- CONSTRAINT
- CORBA服務器編譯通不過
- 请问高手如何让dbgrid实现输入查询条件的功能:第一行显示字段名,第二行空白让用户输入条件,第三行类似COMBOBOX显示> < =等条件
- 各位高手,有人听说过PCI-7841,帮帮忙吧,拜托了
- 请问:delphi如何从中间开始访问数据库,感激不尽
- 请问ADO的时候用dateset执行update的时候,提示我update没有返回植,不能执行,请问如何解决?(62分献给大家)
- inherited的问题。
- 看看這兩句SQL語句~
- 这里问问题真好~先谢谢大家。一个小问题马上给分~也许大家都曾经遇到过的问题~~
具体:
--------------------------------
Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters
--------------------------------
把你的成功的代码和出错的代码片断贴出来看一下!
S1 := String (PChar (S1));
S1 := String(PChar(S1));
这样处理一下就可以安全的把pchar转换成string