Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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


Ïà¹ØÎÊ´ð£º

PythonÖеÄUnicodeÔÚDelphiÈçºÎ»¹Ô­³ÉGb2312£¿

ÒÑÖªPython ÖУº
s = unicode("²âÊÔ", "gb2312")
s = u'\u6d4b\u8bd5'
print s
²âÊÔ

ÔÚDelphiÀïÃæÈçºÎ½«\u6d4b\u8bd5ÕâÑùµÄ»¹Ô­³ÉGb2312µÄºº×ÖÄØ£¿
ÕÒµ½¸ö·½·¨
......

delphiµÄdll×Ó´°ÌåÎÊÌâµÄ½â¾ö - Delphi / ·Ç¼¼ÊõÇø

Ò»Ö±ÏëʹÓÃdll£¬µ«delphiµÄdll×Ó´°Ìå¾­³£Óи÷ÖÖÎÊÌ⣬±ÈÈçÖ÷´°¿ÚÓëdll×Ó´°¿ÚµÄ½¹µãÎÊÌ⣬×Ó´°¿ÚÖпؼþµÄtab¼ü¡¢Èȼü¡¢enter¼üµÈµÄÎÊÌ⣬×Ó´°¿ÚÍ˳öµÄÎÊÌâ¡¢Æ½Ãæ°´Å¥ÎÊÌâµÈµÈ£¬ÍøÕ¾ÉϽøÐÐÁËËÑË÷£¬Ã»ÓбȽÏÍêÃÀµÄ½â¾ö· ......

DELPHI DLLʵ²Î´«´°Ìå

//DLL ·ÅÔÚEXEÖÐûÎÊÌâ
function SkinForm(var skfrm:TForm):Integer;stdcall;
var
  skf:TbsBusinessSkinForm;
  nskfrm:TForm;
begin
  frmUUMain:=skfrm;
  skf:=TbsBus ......

Delphi Thread

Ö÷´°Ìå:
Delphi(Pascal) code:

procedure TfrmMain.btnResumeClick(Sender: TObject);
begin
myThread := TClientThread.Create(LeftPart(cbbServer.Text, ':'), StrToInt(RightPart(cbbServer.Text, ':')) ......

DelphiµÄÓï·¨ÎÊÌâ - Delphi / ÓïÑÔ»ù´¡/Ëã·¨/ϵͳÉè¼Æ

Àý×Ó³ÌÐò¼û¸½¼þ£¬ÓÃDelphi 7½øÐбàÒë
ÎÊÌâ´úÂëΪ 
Delphi(Pascal) code:
if Node.ChildNodes <> nil then
begin
for i := 0 to Node.ChildNodes.Count - 1 do
begin
cNode := N ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ