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


Ïà¹ØÎÊ´ð£º

delphi ÔõÑù½«ucs2±àÂëת»»³ÉÖÐÎÄ

½ÓÊÕµ½µÄÎı¾ÄÚÈÝÊÇucs2±àÂë¸ñʽ£¬ÇëÎÊÔõÑùת»»³ÉÖÐÎÄ
°´ÎÒµÄÀí½â£¬UCS-2ÊÇ×Ö·û¼¯£¬¾ßÌåµÄ±àÂëÓÐUTF-8£¬UTF-16 (LE/BE)µÈ¡£
Èç¹ûÄãÓÃDelphi 2009¼°ÒÔÉϰ汾£¬¿ÉÒÔ¿´¿´TEncodingÀà¡£
btw. Äã˵µÄת»»³ÉÖÐÎÄÊÇɶÒâË ......

delphiÈçºÎµ÷ÓÃdllÎļþÖеÄexe

Çë½Ì¸÷·¸ßÊÖ¡£ÎäÁÖǰ±²¡£ÎÒ½«B.EXE×ö³É×ÊÔ´Îļþ£¬È»ºó¼Óµ½123.dllÖС£ÓÃA.EXEÀ´µ÷ÓÃ123.dllÖеÄB.EXE
Çë¸÷λǰ±²°ïæָ½ÌÏ¡£A.exeÈçºÎÀ´µ÷ÓÃdllÖеÄexe£¿´úÂëÓÖ¸ÃÈçºÎд£¿


ÎÞÈ˻شð£¿

×ö³É×ÊÔ´Î ......

DELPHIÇë´ó¼Ò°ïÎÒ¿´¿´Õâ¶ÎËÑË÷´úÂë³ö´íÔÚÄĶù°¡£¿

procedure TForm4.BitBtn2Click(Sender: TObject);
begin
if (Trim(ComboBox2.Text) <>'')and(Trim(Edit3.Text) <>'')then
  begin
    with ADOQuery1 do ......

Ç¿ÁÒ½¨ÒéDELPHI°æ¸ü»»´ó°æ - Delphi / ·Ç¼¼ÊõÇø

hongqi162¡¢windindance
´Ë2È˳¤ÆÚ²»ÔÚÏߣ¬ÌرðÊÇwindindance
¸ü»»ÓÐÄÜÁ¦µÄÈËÉÏ
hongqi162»¹ÊǾ­³£ÉÏÀ´×ª×ªµÄ

ÒýÓÃ
¸ü»»ÓÐÄÜÁ¦µÄÈËÉÏ
ÆäʵҲ²»ÊÇʲôÄÜÁ¦µÄÔ­Òò£¬Ö÷Òª¿ÉÄÜÊÇʱ¼äÎÊÌâ°É
¹¤×÷µÄ»¹ÒªÉÏ°à£¬Ñ§Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ