张志峰的博客

水滴石川,积少成多。

导航

随笔分类 -  Delphi Dll

摘要:@echo 开始注册copy dcc70.dll %windir%\system32\regsvr32 %windir%\system32\dcc70.dll /s@echo dcc70.dll注册成功@pause@echo 开始注册copy dcc70.dll %windir%\SysWOW64\... 阅读全文

posted @ 2015-12-21 16:32 ╰★张志峰★╮ 阅读(630) 评论(0) 推荐(0)

摘要:delphi编写dll心得1。每个函数体(包括exports和非exports函数)后面加 'stdcall;', 以编写出通用的dll2。exports函数后面必须加'export;'(放在'stdcall;'前面)3。对于非exports函数可以使用string类型,而且建议使用string类型进行参数传递4。对于exports函数请使用PChar类型做参数传递5。如果exports调用其他函数,建议在exports函数体内使用变量过渡,然后再调用其他函数; 也就是说:尽量不要把exports的参数再作为参数调用其他函数。6。exports函 阅读全文

posted @ 2013-09-27 17:45 ╰★张志峰★╮ 阅读(5246) 评论(0) 推荐(0)

摘要:最近项目中,需要在一个bpl中调用另一个bpl中的单元的方法, 方法如下:在被调用的单元中定义:procedure Inner_Ex(VoucherType: TVoucherType);exports Inner_Ex;实现:procedure Inner_Ex(VoucherType: TVoucherType);var frm: tfrmaaa;begin frm := tfrmaaa.Create(Application); try frm.VoucherType := VoucherType; frm.ShowModal; finally frm.Free; end;end;在那个b 阅读全文

posted @ 2013-09-27 15:50 ╰★张志峰★╮ 阅读(1757) 评论(0) 推荐(0)

摘要:LibHandle:=LoadLibrary('c:\windows\system32\SpcClass.dll');ShowMessage(SysErrorMessage(GetLastError)); 阅读全文

posted @ 2013-09-25 17:15 ╰★张志峰★╮ 阅读(1034) 评论(0) 推荐(0)