Delphi IntegerתΪbyte[]
ÔÚDelphiÖÐIntegerÕ¼ÓÃ4¸ö×Ö½Ú£¬ÏÖÔÚÔõô°ÑÒ»¸öIntegerת»»Îª³¤¶ÈΪ4µÄbyte[] ?
byte(x) x:integer;
1Â¥£ºÐ´µÄʲô¶«¶«¡£
2Â¥£ºÎÒÈ¥ÊÔÒ»ÊÔ¡£
2Â¥£ºÕâ¸öд·¨ÊÇ´ó¶Ë»¹ÊÇС¶ËÄØ£¿
var
i:integer;
buf:array[0..3] of byte;
begin
move(i,buf[0],4);
end;
Type
PbyteAry=^TbyteAry;
TbyteAry=Array[0..3] of byte;
var b:TbyteAry;
i:integer;
begin
i:=1000;
//·½·¨1
move(i,b,SizeOf(TbyteAry));
//·½·¨2
b:=PbyteAry(@i)^;
//showmessage(inttostr(Integer(b)));
end;
»¹¿ÉÒÔǰ³ÌRecordµÄÀ´ÊµÏÖ£º
Type
TRec=Record
case boolean of
True:(Int:Integer);
False:(ByteAry:Array[0..3] of byte);
end;
var r:TRec;
begin
r.Int:=1000;
showmessage(inttostr(Integer(r.ByteAry)));
end;
var
bb : array[0..3] of byte;
a :integer;
a := 5;
move(a,bb,4);
¶àл¸÷λ!!2¥ͦºÃ¶®!!
Ïà¹ØÎÊ´ð£º
¸÷λ¸ßÊָϿì°ï°ïæ¡£
ÏÖÔÚÓÐÒ»¸ödelphiдµÄdll£¬º¯ÊýÖÐÓÐPIntegerµÄ·µ»Ø²ÎÊý£¬ÔÚdelphiÖпÉÒÔÕý³£µ÷Ó㬵«ÊÇÎÒÔÚvbÀïдµÄʱºò¾Í²»ÖªµÀ¸ÃÔõôÀ´µ÷ÓÃÁË¡£
Çë¿´´úÂë
ÒÔÏÂÊÇdelphiÖеĺ¯Êý¶¨ÒåºÍµ÷ÓôúÂ룬ÄÜÕý³£ÔËÐ ......
¼±Óá£ÁªÏµQQ£º8775262£¬Ð»Ð»¡£
ÐèÒª½øÐÐDllImportµÄµØ·½Ö±½ÓдDLLImport.·½·¨Ãû¡£
È磺DLLImport.GlobalAddAtom(¡¡);
Îļþ£ºUShare.pas
Delphi(Pascal) code:
unit UShare;
interface
uses Windows, Me ......
ÎÒÔÚÍøÉÏÕÒÁ˸ö¹ØÓÚIEBHOµÄ´úÂ룬Ȼºó°´ÕÕÄĸöÉèÖÃÁË£¬ºóÀ´ÔËÐеÄʱºò³öÏÖ
¹¹½¨
[¾¯¸æ] Project2.dpr(14): File not found: 'MYbho.TLB'
[¾¯¸æ] Project2.dpr(16): File not found: 'MYbho.RES'
......
ÎÒÔÚÍøÉÏÕÒÁ˸ö¹ØÓÚIEBHOµÄ´úÂ룬Ȼºó°´ÕÕÄĸöÉèÖÃÁË£¬ºóÀ´ÔËÐеÄʱºò³öÏÖ
[´íÎó] Unit1.pas(15): Undeclared identifier: 'GetTypeInfoCount'
[´íÎó] Unit1.pas(15): Undeclared identifier: 'GetTypeInfo ......
delphi »ñµÃÖ÷°åµÄÓ²¼þÐÅÏ¢
Win32_DiskDriveÒª»»Ò»Ï£¬Äã²éÏÂmsdn
http://hi.baidu.com/xuchuantao17/blog/item/dd6f1fdfe22ec41a48540314.html
²å¸ö±ê¼Ç
ÒýÓÃ
Win32_DiskDriveÒª»»Ò»Ï£¬Äã²éÏÂmsdn
Õ ......