Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÔÚVB6ÖÐÓÃCopyMemory¿½±´×Ö·û´®µÄÖÖÖÖèÄ壨һ£©

±¾ÎÄÀ´×Ô´ËÌûµÄÈß³¤ÌÖÂÛ£¬¸ÐлTiger_ZhaoµÄÈ«³ÌÖ¸µãºÍ³Â»Ô¡¢°¢Ó¡¢ÂíÔƽ£µÈºÜ¶àÅóÓѵÄÈÈÐIJÎÓë¡£±¾ÎÄÆäËû²¿·ÖÔÚ£º£¨¶þ£©¡¢£¨Èý£©¡¢£¨ËÄ£©¡£
 
»°ËµVB6ÊǸöºÜÈÏÕæϸÖµÄÂèÂ裬Ëü»áÇÄûÉùµØ°ïÄã×öºÜ¶àÊ¡£½ñÌìÎÒÃÇÀ´ËµµÄÊÇVB6ÔÚAPIµ÷ÓÃʱ×Ô¶¯¶Ô×Ö·û´®²ÎÊý½øÐÐת»»µÄ“ºÃÈ˺ÃÊ”¡£ 
µÚÒ»½Ú ÌåÌùµÄVBÂèÂè
ÎÒÃÇÖªµÀ£¬ÔÚVB6ÖÐ×Ö·û´®¶¼ÊÇÒÔUnicode±àÂë´æÔڵģ¬¶øWindows APIº¯ÊýÖкܶàʱºòÓõÄÊÇANSI×Ö·û´®¡£VBÂèÂ躦ųÌÐòÔ±ÃÇÀÛ×Å£¬ËùÒÔÔÚVB³ÌÐòÔ±µ÷ÓÃAPIʱ£¬»á×Ô¶¯µÄ¶ÔÆäÖеÄ×Ö·û´®²ÎÊý×öUnicodeµ½ANSIµÄת»»£¨ÒÔϼò³ÆUAת»»£©£¬ÔÚAPIµ÷ÓýáÊøºó»áÔÙ°Ñ×Ö·û´®²ÎÊý×öANSIµ½UnicodeµÄת»»£¨ÒÔϼò³ÆAUת»»£©¡£ÕâÑù˵¿ÉÄÜÓеã³éÏó£¬ÎÒÃÇÀ´¿´ÏÂÃæµÄÀý×Ó¡£'ÕýÈ·µÄByVal StringµÄÓ÷¨
Option Explicit
Const STR_E = "PowerVB"
Private String1 As String
Private String2 As String
Private pString1 As Long
Sub test7()
Dim String1 As String
Dim String2 As String
' Dim _tmp1 As String, _tmp2 As String

String1 = "PowerVB" '14 bytes
String2 = String$(7, 0) '14 bytes

CopyMemory ByVal String2, ByVal String1, 7

' _tmp1 = StrConv(String1, vbfromUnicode) '7 bytes
' _tmp2 = StrConv(String2, vbfromUnicode) '7 bytes
' CopyMemory ByVal _tmp2, ByVal _tmp1, 7

Debug.Print String2
End Sub
ÈçÉÏͼËùʾ£¬µ±ÎÒÃÇÔÚVBÖе÷ÓÃCopyMemory ByVal String2, ByVal String1, 7µÄʱºò·¢ÉúÁËÈçÏÂÊÂÇ飺
¢ÙÊ×ÏÈVBÂèÂè°ïÎÒÃǶÔString1ºÍString2×Ô¶¯×öÁËUAת»»£¬Ò²¾ÍÊÇÏ൱ÓÚ×öÁËÈçÏÂÊÂÇ飺Dim _tmp1 As String, _tmp2 As String
_tmp1 = StrConv(String1, vbfromUnicode) '7 bytes
_tmp2 = StrConv(String2, vbfromUnicode) '7 bytesÒ²¾ÍÊÇ˵£¬Á½¸ö14×Ö½ÚµÄUnicode×Ö·û´®ÏÖÔÚ±»´æÔÚÁ½¸ö7×Ö½ÚµÄANSI×Ö·û´®ÀïÁË¡£
¢ÚÈ»ºóCopyMemoryº¯Êý¾Í×öʵ¼ÊµÄ¿½±´¶¯×÷¡£×¢Ò⣬ÕâʱCopyMemoryµÃµ½µÄ²ÎÊý²»ÊÇString1, String2ÁË£¬¶øÊÇVBÂèÂè´«¸øËüµÄ_tmp1, _tmp2ÁË¡£ËùÒÔ£¬Êµ¼ÊÉÏ£¬CopyMemoryͬѧÊÇÔÚÕâô¸É»î£ºCopyMemory ByVal _tmp2, ByVal _tmp1, 7¡£Ò²¾ÍÊÇ£¬´Ó_tmp1µÄ»º³åÇø¿½±´7¸ö×Ö½Úµ½_tmp2µÄ»º³åÇø¡£
¢ÛCopyMemoryͬѧ¸ÉÍê»î£¬VBÂèÂèÓÖϸÐĵØ×öÉƺó¹¤×÷¡£Ëü°Ñ_tmp2µÄÄÚÈÝÔÙת³É14×Ö½ÚµÄUnicode×Ö·û´®£¬²¢°ÑËü¸øString2¡£
PS£º
£¨1£© ÎÄ×ÖÖдøÈ


Ïà¹ØÎĵµ£º

¹ØÓÚActiveXµÄ½Ì³Ì[vb]£¨×ªÌû£©

¹ØÓÚActiveXµÄ½Ì³Ì
Visual BasicÊÇÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆÓïÑÔ£¬Î¢Èí¹«Ë¾ÍƳöÁËActiveX¼¼Êõ£¬ÀûÓÃActiveX¼¼ÊõÌá³öµÄ±ê×¼£¬¶Ô½çÃæµÄÉè¼Æ½øÐÐÁË·â×°£¬ÐγÉÁËһϵÁбà³Ì¿Ø¼þ£¬¼´Ìض¨¹¦ÄܵijÌÐòÄ£¿é¡£ÔÚ³ÌÐòµÄÉè¼ÆÖУ¬Éè¼ÆÈËÔ±Ö»ÐèÒªÍ϶¯ËùÐè¿Ø¼þµ½´°Ì壬Ȼºó¶Ô¿Ø¼þ½øÐÐÊôÐÔÉèÖúÍʹÓÃÆä·½·¨¡¢Ê¼þ¼´¿É£¬´ó´ó¼õÇáÁË·±ËöµÄ³ÌÐòÉè¼Æ¡ ......

VCµ÷ÓÃVBµÄdll

Óо²Ì¬ºÍ¶¯Ì¬Á½ÖÖ£¬¾²Ì¬µÄÐèÒªlib¶ø¶¯Ì¬µÄÖ»ÐèÒªÒ»¸ödll¾Í¿ÉÒÔÁË£¨µ«ÊÇÒªÖªµÀº¯ÊýµÄ¶¨ÒåÒ»°ãÊÇÍ·ÎÄ
¼þ£©¶¯Ì¬Ïà¶Ô¸´ÔÓÒ»µã£¡µ«ÊÇÕÆÎÕÁËÒ²²»ÊǺÜÄÑ  
  //µÚÒ»²½     ¶¨Ò庯ÊýÖ¸Õë¾ÍÊÇÄãÒªµ÷Óõĺ¯Êý£¬²ÎÊý±ØÐëÒ»Ö£¬²»È»¾ÍÄÚ´æй¶  
  typedef   HANDLE ......

oracle¿Í»§¶ËÅäÖÃÓëʹÓã¨vb£©

   ʹÓÃoracleÊý¾Ý¿âÓÐÁ½ÖÖ·½·¨£º                   
1¡¢ÔÚ¿Í»§¶Ë»úÆ÷ÉÏ°²×°oracleµÄ¿Í»§¶ËÈí¼þ¡£Î¨Ò»µÄÀýÍâ¾ÍÊÇjavaÁ¬½ÓÊý¾Ý¿âµÄʱºò£¬¿ÉÒÔÓÃjdbc thinģʽ£¬²»ÓÃ×°oracleµÄ¿Í»§¶ËÈí¼þ¡£
2¡¢Èç¹ûÄãÔÚ»úÆ÷É ......

[VB]VBÖе÷ÓÃMSN 6.2 APIº¯Êý

VBÖе÷ÓÃMSN 6.2 APIº¯Êý
¡¡¡¡Á˽âÕâ·½ÃæÄÚÈݵÄÆðÒòÊÇÔçÉÏÓÐλÅóÓÑÈÃÎÒ¿´Ò»¶Î¹ØÓÚMSN¿ª·¢³ÌÐò£¬ÏÖÔÚÎÞ·¨ÔËÐУ¬ÎÒ´ò¿ª¹¤³Ì·¢ÏÖÊÇÕë¶Ô4.7±àдµÄ£¬¶øËûµÄ¼ÆËã»ú°²×°µÄ6,2£¬ÒòΪÎÒÒ²ÓÃ6.2ËùÒÔÎÒÔÚVBÖв鿴ÁËһϣ¬·¢ÏÖÊÇȱÉÙMessenger Type Library¡£µ«ÊǶàÁËMessenger API Type Library£¬¿ÉÄÜÊÇ×öΪMessenger Type LibraryµÄÌ ......

ÔÙ̸ÓÃVBÎÞ´°¿Ú͸Ã÷Usercontrol±àд͸Ã÷¸¡¶¯°´Å¥

    È¥ÄêÔøд¹ýһƪ²©ÎÄ£¬Ãû³Æ½Ð¡¶ÓÃVBÎÞ´°¿Ú͸Ã÷Usercontrol±àд͸Ã÷¸¡¶¯°´Å¥¡·£¬¸ÃÎÄÓÐÒ»¸ö¹ÛµãÊÇ´íÎóµÄ£¬¼´Í¸Ã÷ÎÞ´°¿ÚUsercontrol²»Ö§³ÖÉè¼ÆʱµãÑ¡¡£Æäʵ£¬Í¨¹ýÔÚUserControl_HitTest¹ý³ÌÀï¼ÓÈëHitResult = vbHitResultHitÓï¾ä£¬¾Í¿ÉÒÔʵÏÖÉè¼ÆʱµÄµãÑ¡ÁË£¬Îª´Ë£¬Ð޸ĴúÂëÈçÏ£º
'* ******************* ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ