¸ÄдÁËÒ»¸ö³£ÓõÄDELPHIµÄ¼Ó½âÃܺ¯Êý
DELPHI
//////////////////////////////////
Function EncrypKey (Src:String; Key:String):string;
var
idx :integer;
KeyLen :Integer;
KeyPos :Integer;
offset :Integer;
dest :string;
SrcPos :Integer;
SrcAsc :Integer;
TmpSrcAsc :Integer;
Range :Integer;
begin
KeyLen:=Length(Key);
if KeyLen = 0 then key:='Think Space';
KeyPos:=0;
SrcPos:=0;
SrcAsc:=0;
Range:=256;
Randomize;
offset:=Random(Range);
dest:=format('%1.2x',[offset]);
for SrcPos := 1 to Length(Src) do
begin
SrcAsc:=(Ord(Src[SrcPos]) + offset) MOD 255;
if KeyPos < KeyLen then KeyPos:= KeyPos + 1 else KeyPos:=1;
SrcAsc:= SrcAsc xor Ord(Key[KeyPos]);
dest:=dest + format('%1.2x',[SrcAsc]);
offset:=SrcAsc;
end;
Result:=Dest;
end;
//½âÃܺ¯Êý
Function UncrypKey (Src:String; Key:String):string
Ïà¹ØÎĵµ£º
Delphi×Ö·û´®º¯Êý´óÈ«
uses StrUtils;
¡¾×Ö·û´®º¯Êý´óÈ«¡¿
Êײ¿ function AnsiResemblesText(const AText, AOther: string): Boolean;
$[StrUtils.pas
¹¦ÄÜ ·µ»ØÁ½¸ö×Ö·û´®ÊÇ·ñÏàËÆ
  ......
Delphi ¹Ø¼ü×ÖÏê½â---absolute//ËüʹµÃÄãÄܹ»´´½¨Ò»¸öбäÁ¿, ²¢ÇҸñäÁ¿µÄÆðʼµØÖ·ÓëÁíÒ»¸ö±äÁ¿Ïàͬ.
var
Str: string[32];
StrLen: Byte absolute Str;
//Õâ¸öÉùÃ÷Ö¸¶¨Á˱äÁ¿StrLenÆðʼµØÖ·ÓëStrÏàͬ.
//ÓÉÓÚ×Ö·û´®µÄµÚ0¸öλÖñ£´æÁË×Ö·û´®µÄ³¤¶È, ËùÒÔStrLenµÄÖµ¼´×Ö·û´®³¤¶È.
begin
Str := 'abc';
Edit ......
Delphi in a Unicode World Part II: New RTL Features and
Classes to Support Unicode
By: Nick
Hodges
ÔÎÄÁ´½Ó:http://dn.codegear.com/article/38498
Abstract: This article will cover the new features of the Tiburon
Runtime Library that will help handle Unicode strings.
//
& ......
´ËÎÄÊǸù¾Ý°éË®ÀÏ´óµÄʵÀý×öµÄСÐ޸ģ¡
ÒÔÏÂÊǸöÈ˼û½â£¬ÈçÓдíÎóÇëÖ¸Õý:)
ÒªÏë¿ç½ø³Ì·ÃÎÊDBGRID£¬Ã²ËÆÖ»ÄÜÓÃHOOK£¬Ð´Ò»¸öDLLÏë°ì·¨×¢È뵽Ŀ±ê½ø³Ì¡£×¢Èë³É¹¦ºó£¬Ê¹DLLÓëÄ¿±ê½ø³ÌÔÚͬһ½ø³Ì¿Õ¼äÖÐ(ÆäÄÚÓÐһЩϸ½ÚÎÊÌ⣬Çë²Î¼û´úÂë)£¬Õâʱ¿ÉÒÔ·ÃÎÊÄ¿±ê½ø³ÌµÄVCL×é¼þ¡£²¢°ÑVCL×é¼þµÄÊý¾Ýͨ¹ ......
ÏÖÔÚÓ¦ÓÃϵͳÁ÷ÐÐÓÃB/S¿ª·¢£¬Ô缸Äêǰ¿ÉÊÇC/SµÄÌìÏÂÄØ£¬ÎÒÏÖÔÚ×öµÄijº½¿Õ¹«Ë¾»õÔ˽áËãά»¤¹¤×÷£¬Æäϵͳ¾ÍÊÇÀûÓÃDelphi¿ª·¢µÄC/SÓ¦ÓóÌÐò£¡ÔÚÈÕ³£µÄά»¤¹¤×÷ÖУ¬ÄÑÃâÒª¶ÔÒѾ×öºÃµÄCOM+×é¼þ½øÐе÷ÊÔ£¬ÒԲ鿴¾ßÌåµÄ´¦ÀíÂß¼£¡±¾ÎľÍÊǽéÉÜÔÚWindowsXP»·¾³ÏÂÈçºÎÔÚDelphiÖе÷ÊÔCOM+×é¼þ£¡
µÚÒ»²½£º¼Ç¼ÏÂÄãÏ£Íûµ÷ÊÔµÄCOM+×é¼þ ......