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 ÖУº
s = unicode("²âÊÔ", "gb2312")
s = u'\u6d4b\u8bd5'
print s
²âÊÔ
ÔÚDelphiÀïÃæÈçºÎ½«\u6d4b\u8bd5ÕâÑùµÄ»¹Ô³ÉGb2312µÄºº×ÖÄØ£¿
ÕÒµ½¸ö·½·¨
......
·µ»ØµÄÄÚÈÝÊÇÈçÏ´úÂë,ÔõôÄÜÇþµÀ2b?
<p class="text1">1a </p>
<p class="text1">2b </p>
<p class="text1">3c </p>
<p cl ......
VC ¿ØÖÆÌ¨³ÌÐò:
#include <iostream>
using namespace std;
int main()
{
const int def_buffer = 1024 * 4;
DWORD t;
BYTE b[def_buffer];
memset(b, 0, sizeof(b));
PBYTE p;
t = GetTickC ......
ÎÒ±¾À´ÔÚѧУÊÇŪµÄJ2EE
×òÌìÈ¥Á˳¤É³Ò»¼Ò¹«Ë¾Ó¦Æ¸ ˵ÊÇÓÐÒ»¸öÏîÄ¿ delphiµÄ
ʵϰÆÚÒ»¸öÔ ËÄÌì°ëµÄdelphiÅàѵ ºóÃæ25Ìì¸øÄãÒ»¸öÉè¼ÆÎĵµ×Ô¼º×öÒ»¸öÏîÄ¿
×ߺ󲻾ôòµç»°¹ýÀ´½ÐÎÒÐÇÆÚһȥ±¨µ½
¿´µ½delphiµ ......
xml := CreateOleObject('Microsoft.XMLHTTP');
xml.Open('GET','http://www.google.com', False);
xml.Send;
xml.responseText;
ʹÓÃxml.responseText¿ÉÒÔ»ñÈ¡ÍøÒ³Ô´Âë,µ«ÊÇÔÙ´Î ......