Delphi 2010 µÄChar
½ñÌìÓÃdelphi 2010£¬×öÒ»¸ö¼òµ¥µÄÄÚ´æÓ³ÉäµÄ³ÌÐò£¬ÔÚdelphiÒÔǰ°æ±¾ÉÏÅܵĺúõijÌÐò£¬ÔÚ2010ÉÏ£¬¾ÓÈ»³öÏÖÁ˲»Í¬µÄЧ¹û£¬·¢ËͶ˷¢Ë͵Ä×Ö·û´®£¬½ÓÊÕ¶ËÖ»ÊÕµ½Ò»°ë£¬´ó¸Å³ÌÐòÈçÏ£º
·¢ËͶˣº
var
str : String;
begin
CopyMemory(@(PShare^.Data),str,Length(str)); //°ÑÊý¾Ý¿½±´µ½¹²ÏíÄÚ´æ
end;
½ÓÊÕ¶Ë£º
mmo1.Text := PShare^.Data;
²éÕÒ°ïÖú£¬LengthµÄ°ïÖúÖÐÓÐÄÇôһ¾ä»°£ºFor Unicode (WideString) strings, Length returns the number of bytes divided by two.
Ī·ÇÊÇUnicodeÔÚµ·¹í£¿ÉÏÍø²é²é£¬·¢ÏÖdelphi2010ÀïÃæ´ó·¶Î§µÄʹÓÃÁËUnicode¸ñʽ£¬pCharÒ²´ÓÒÔǰAnsi¸ñʽµÄ1byte£¬±ä³É2byte£¬ÔÚLenghµÄʱºò¾Í³ýÒÔ2£¬ÄÇôÎÒÕâ¸östrÀïÃæ²»¹ÜÓÐʲôµ±È»¾Í»á±»ÑüÕ¶ÁË¡£
Ôõô½â¾öÄØ£¿
ÍòÒ»ÀÏʦ˵£¬¿ÉÒÔÓÃByteLengthº¯Êý£¬µ«ÊÇÒ²ÓÐÈË˵£¬ByteLengthº¯ÊýÖ»ÄܶÔUnicode×Ö·û´®Çó×Ö½Ú³¤¶È£¬Èç¹ûÒª¶ÔAnsi×Ö·û´®½øÐмÆË㣬ÄÇô½á¹û»áÊÇÕýÈ·ÖµµÄÁ½±¶£¬ËäÈ»ÔÚÕâ¸ö³ÌÐòÖУ¬ByteLengthº¯Êý×ã¹»Âú×ãÎÒµÄÐèÇóÁË£¬µ«ÊÇΪÁËÑø³ÉÁ¼ºÃµÄϰ¹ß£¬ÎÒ²ÉÓÃÁËÁíÍâÒ»ÖÖ·½·¨£¬¾ÍÊÇLength(str)*SizeOf(Char)£¬ÕâÑù²»¹ÜÊÇÇóAnsiChar»¹ÊÇUnicode CharµÄ×Ö·û³¤¶È£¬¶¼¿ÉÒÔÊÊÓÃÁË¡£
·¢ËͶ˳ÌÐòÐÞ¸ÄÖ®ºó£º
CopyMemory(@(PShare^.Data),str,Length(str)*SizeOf(Char));
¾¹ý²âÊÔ£¬³É¹¦ÁË£¡
Ïà¹ØÎĵµ£º
Delphi Äܲ»ÄÜ´ÓRing 3½øÈëRing 0?
Â¥Ö÷skyworld_xm£¨skyworld£©2004-11-19 09:58:55 ÔÚ Delphi / Windows SDK/API ÌáÎÊ
Delphi Äܲ»ÄÜ´ÓRing 3½øÈëRing 0?
ÓÐÀý×ÓÂð?
¶àл. ÎÊÌâµãÊý£º100¡¢»Ø¸´´ÎÊý£º20Top
1 Â¥jinjazz£¨½üÉí¼ô£©»Ø¸´ÓÚ 2004-11-19 10:13:27 µÃ ......
¸½¼þ×ÊÁÏ
*ÀàµÄÄÚ´æÐÅÏ¢£¨´úÂ룩
ʾÀý£º»ñÈ¡ÀàÐÅÏ¢
˵Ã÷£º±È¶Ôͨ¹ýÀàµØÖ·ÒÔ¼°Í¨¹ýÀà·½·¨»ñÈ¡ÐÅÏ¢µÄЧ¹û¡£
´úÂ룺
type
TMyObject = class(TObject)
private
FData: Integer;
protected
......
*ÀàµÄ¹«¿ªÊôÐÔ£¨´úÂ룩
ʾÀý£º·ÃÎÊÀàµÄpublishedÊôÐÔ
˵Ã÷£ºvmtFieldTable£¨Published Field±í£©Ö¸ÏòPublished Field±íÓÐÐòÅÅÁУ¬Ö»´æ´¢µ±Ç°ÀàµÄPublishedField±í£¬µÃµ½¸¸ÀàµÄPublished Field±íÐèÒªÍùÉϱéÀú¡£
×¢Ò⣺ֻÓÐÀàÐÍÊÇÀà»ò½Ó¿ÚµÄÊý¾Ý³ÉÔ±²Å¿É¶¨ÒåΪpublishedµÄ·ÃÎʼ¶±ð
´úÂ룺
type
TMyO ......
ÔÚÌÖÂÛÕâ¸ö»°Ìâ֮ǰ£¬±ØÐëҪ˵Ã÷µÄÊÇ£¬Èç¹ûÄã¸Õѧϰdelphi£¬Ç벻Ҫģ·Â£¬ÒòΪ̸²»ÉÏתÐÍ£»Èç¹ûÄãÓÃdelphiÒѾ³Éϰ¹ß£¬²¢ÇÒÊìϤhtmlÓïÑÔ¡¢ÓÐBS½á¹¹»ù´¡¡¢¶ÔJAVAÓ﷨ûÓÐÕϰ£¨Èç¹ûÄã¿´²»¶®¼òµ¥µÄ»ù´¡JAVA´úÂ룬½¨ÒéÄ㻹ÊǼÌÐøÄãµÄd°É£©£¬Ï£ÍûÕâ¶ÎÄÚÈݶÔÄãÓÐËù°ïÖú£¬´Ë»°Ìâ²»ÌÖÂÛ¾ßÌå¼¼Êõ£¬Ö»ËµËµÎÒµÄѧϰ²½ÖèºÍÐĵá£
1¡¢ ² ......
Delphi´Ó6.0¾Í¿ªÊ¼Ö§³ÖWeb ServicesµÄ¿ª·¢ºÍÓ¦ÓÃÁË£¬±¾ÎÄͨ¹ýʹÓÃDelphi 7.0µ÷ÓÃÐÂÀË·¢ËͶÌÐŵÄWeb Service½øÐжÌÐÅÓ¦ÓóÌÐò¿ª·¢ÕâһʵÀýÏêϸµÄ½éÉÜÔÚDelphiÖÐÈçºÎ¿ª·¢»ùÓÚWeb ServicesµÄÓ¦ÓÃϵͳ¡£
µÚÒ»²½£¬×¼±¸¹¤×÷£¬Á˽âÐÂÀ˶ÌÐÅWeb Service¡£ÐÂÀË·¢ËͶÌÐŵÄWeb ServiceµØÖ·ÊÇhttp://smsinter.sina.com.cn/ws/smswebs ......