易截截图软件、单文件、免安装、纯绿色、仅160KB

VC静态调用DELPHI DLL

Delphi(Pascal) code:
library Smart;

uses
SysUtils,
Classes,
Forms,
Dialogs,
Windows,
SmartWord in 'SmartWord.pas' {frmSmartWord},
pub in 'pub.pas';

{$R *.res}

var
AppDLL:TApplication;
ScrDLL:TScreen;

//
procedure MyDLLProc(Reason:Integer);
begin
try
if Reason=DLL_PROCESS_DETACH then
begin
Application:=AppDLL;
Screen:=ScrDLL;
end;
except
on e:Exception do
begin
ShowMessage(e.Message);
end;
end;
end;

//function SmartWord(App:TApplication;Scr:TScreen;DoctorName,UserName:PChar):Boolean;stdcall;
function SmartWord(DoctorName,UserName:PChar):Boolean;stdcall;
begin
//Application:=App;
//ScrDLL:=Screen;
//showmessage(doctorname);
//showmessage(username);
sDoctorName:=DoctorName;
sUserName:=UserName;
if not Assigned(frmSmartWord) then
Application.CreateForm(TfrmSmartWord,frmSmartWord);
frmSmartWord.Show;
end;

exports
SmartWord;

begin
try
AppDLL:=Application;
ScrDLL:=Screen;
DLLProc:=@MyDLLProc;
except
on e:Exception do
ShowMessage(e.Message);
end;
end.

用delphi来静态调用没有问题
Delphi(Pascal) code:
function SmartWord(DoctorName,UserName:PChar):Boolean;stdcall;ex


相关问答:

Delphi怎么取返回内容中的指定部分.

返回的内容是如下代码,怎么能渠道2b?
<p class="text1">1a </p>
<p class="text1">2b </p>
<p class="text1">3c </p>
<p cl ......

DELPHI DLL实参传窗体

//DLL 放在EXE中没问题
function SkinForm(var skfrm:TForm):Integer;stdcall;
var
  skf:TbsBusinessSkinForm;
  nskfrm:TForm;
begin
  frmUUMain:=skfrm;
  skf:=TbsBus ......

VB/delphi 修改text文件 - VB / 基础类

各位好!!
假设我有两个text文件
一个名叫 1.text
内容:
I like PC.... 
另外一是2.text
内容:
function yk as string
endfunction
globals
endglobals
***********************分界线********** ......

问几个delphi的属性问题

edit.begindrag(false,10);表面看应该是开始拖动里面的false,10参数本别对应什么? 
procedure TDragForm.ListDragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: B ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号