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
Ïà¹ØÎÊ´ð£º
ÎÒ±¾À´ÔÚѧУÊÇŪµÄJ2EE
×òÌìÈ¥Á˳¤É³Ò»¼Ò¹«Ë¾Ó¦Æ¸ ˵ÊÇÓÐÒ»¸öÏîÄ¿ delphiµÄ
ʵϰÆÚÒ»¸öÔ ËÄÌì°ëµÄdelphiÅàѵ ºóÃæ25Ìì¸øÄãÒ»¸öÉè¼ÆÎĵµ×Ô¼º×öÒ»¸öÏîÄ¿
×ߺ󲻾ôòµç»°¹ýÀ´½ÐÎÒÐÇÆÚһȥ±¨µ½
¿´µ½delphiµ ......
xml := CreateOleObject('Microsoft.XMLHTTP');
xml.Open('GET','http://www.google.com', False);
xml.Send;
xml.responseText;
ʹÓÃxml.responseText¿ÉÒÔ»ñÈ¡ÍøÒ³Ô´Âë,µ«ÊÇÔÙ´Î ......
³ÌÐòʹÓõÄÊÇOrcalÊý¾Ý¿â£¬Ï붨ÆÚ£¨Ã¿¼¾¶È£©¶ÔÊý¾Ý¿â½øÐб¸·Ý£¬Ã»É¶Í·Ð÷£¬ÇëÎÊÓ¦¸ÃÔõôŪ£¿
ÓÐÊ²Ã´ÌØÊâÒªÇóÂ𣬱ÈÈçҪǰ¶Ë½çÃæ£¿
Ò»°ãÓÃÊý¾Ý¿â×Ô´øµÄ¡°¼Æ»®ÈÎÎñ¡±ÅäÖÃһϾ͹»ÁË
ûÓÐÊ²Ã´ÌØÊâÒªÇó¡£ÀýÈ磬ֻҪµ ......
delphi ÈçºÎ°ÑÊý¾Ýµ¼³öµ½EXCELÖУ¿ÄÄλÄܸøÎÒ¸öÀý×Ó£¿¶àл
´ÓÍøÉÏÕÒÁËЩ×ÊÁÏ£¬ËµÐèÒªÒýÈëEXCEL×é¼þ¶Ô°É£¿ÄÇÑùµÄ»°×îÖÕÈí¼þÉú³ÉEXEʱÕâ¸ö×é¼þÊǵ¥¶ÀµÄÎļþ°É£¿
ÓÐûÓа취×îÖÕ²»Éú³É¶ÀÁ¢ÎļþµÄÇé¿öϵ¼³öEXCEL£¿
² ......