请问DELPHI中如何创建DLL文件?
公司要求把一些文件转成DLL,我是新手,不知道怎么创建.
找了些资料,多数是讲理论的,请问哪位能告诉我创建步骤?
最好能有个例子,不胜感激!
新键一个DLL项目:File->new->Other在new页选择"DLL Wizard",然后把你的函数,代码移进去然后Exports。自己找些资料看看吧,一两句话说不清楚
Delphi制作DLL
http://blog.csdn.net/aroc_lo/archive/2009/02/12/3881437.aspx
new->other-Dll wizard
创建一个基本的dll工程框架
给你一个简单的示例代码
Delphi(Pascal) code:
library Project1;
{ 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. }
uses
SysUtils,
Classes;
{$R *.res}
function myFunc(A: integer): Integer; stdcall;
begin
Result := A;
end;
exports
myFunc;
begin
end.
myFunc是一个要输出的函数,
相关问答:
已知Python 中:
s = unicode("测试", "gb2312")
s = u'\u6d4b\u8bd5'
print s
测试
在Delphi里面如何将\u6d4b\u8bd5这样的还原成Gb2312的汉字呢?
找到个方法
......
procedure DynArrayDelete(var A;elSize:Longint;index,Count:Integer);
var
len,MaxDelete:Integer;
P:PLongint; //4 个字节的长整形指针
begin
P:=PLongint(A);// 取的 A 的 ......
请问Delphi有树形控件吗?
怎样使用?
Ttreeview
treeview.items.addchild(nil(上级节点),'案发时发'(text));
raize 控件包里面有,csdn有下载的
查帮助TTreeView和TNode两个类
TTreeView ......
如题:
我的程序 Create 的时候 创建了N 个线程;这N个线程不停的在 监听N个COM口的数据;当分析数据时,有些时候要弹出application.messagebox 对话框判断 是否继续 执行线程,还是挂起线程。当多个线程同时 ......