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

vbÔÚµ÷ÓÃAPIµÄÒ»¸öBug¿ÉÄܵ¼ÖÂÄÚ´æй¶

ÆäʵÕâ¸öÎÊÌâÎÒºÜÔçºÜÔçÒÔÇ°¾Í·¢ÏÖÁË£¬Ö»ÊÇһֱûÁôÒ⣬Ҳ²»ÔÚÒâ¡£½ñÌìÎÞÒâÖÐÓÖÓÃVBдÁËÒ»¸ö³ÌÐòÈ«²¿Ê¹ÓÃNTDLLµ¼³öº¯Êý±àд£¬ÓÖ³öÏÖÁËÕâÑùµÄÇé¿ö£¬ÕâÑù¾ÍÓɲ»µÃÎÒ²»×¢ÒâÁË£¬¾­¹ýÎҵķ´¸´²âÊÔÒÔ¼°·´»ã±àÑéÖ¤£¬Ö¤ÊµÁËvb6_sp6ÔÚµ÷ÓÃijЩAPI(²âÊÔµÄÓ¦¸ÃÓкܶàAPI´æÔÚÕâÑùµÄÎÊÌâ)´æÔÚÄÚ´æй¶ÎÊÌâ»òÕßÊǺ¯Êýµ÷ÓÃʧ°Ü¡£Çë´ó¼ÒÏÈ¿´ÎÒдµÄ¼òµ¥Á½¶Î´úÂë¡£
´úÂëÒ»£º
Option Explicit
Private Const MEM_RELEASE = &H8000
Private Const MEM_COMMIT = &H1000
Private Const PAGE_EXECUTE_READWRITE = &H40
Private Declare Function VirtualAlloc Lib "kernel32" (lpAddress As Any, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long
Private Declare Function VirtualFree Lib "kernel32" (lpAddress As Any, ByVal dwSize As Long, ByVal dwFreeType As Long) As Long
Private Sub Code1()
    Dim Base As Long
    Base = VirtualAlloc(ByVal 0&, 100, MEM_COMMIT, PAGE_EXECUTE_READWRITE)
    If Base Then
        MsgBox Hex(Base)
        MsgBox VirtualFree(ByVal Base, 0, MEM_RELEASE)
        MsgBox Hex(GetLastError)
    End If
End Sub
Õâ¶Î´úÂëÊÇÉêÇëÒ»¶ÎÄڴ棬ȻºóÂíÉÏÊÍ·ÅËü£¬´úÂëûʲôÄÑÒÔÀí½âµÄ·Ç³£¼òµ¥¡£´ó¼Ò×Ðϸ¿´´úÂëÉϺÃÏñÒ²²»´æÔÚÓÐʲôÎÊÌ⣬ÄÇôÎÊÌâÔÚʲôµØ·½ÄØ£¿
ÎÒÒ»¾äÒ»¾äÀ´½âÎöÊ×ÏÈ“Base = VirtualAlloc(ByVal 0&, 100, MEM_COMMIT, PAGE_EXECUTE_READWRITE)”
ÕâÐдúÂëÉêÇëÁËÒ»¶Î³¤100×Ö½ÚµÄÄÚ´æ¸ú×Ù½á¹û³É¹¦ÉêÇëÁ˵óöijµØÖ·£¬È»ºóÎÒÓÃmsgbox°ÑµØÖ·ÏÔʾ³öÀ´
ÕâʱÕâ¶ÎµØÖ·ÊÇ¿ÉÓõģ¬´ó¼Ò¿ÉÒÔʹÓÃһЩÄÚ´æ²ì¿´±à¼­¹¤¾ß£¬±ÈÈç±ùÈÐÖ®ÀàµÄ¡£È»ºóµ÷ÓÓVirtualFree ByVal Base, 0, MEM_RELEASE"ÊÍ·ÅÄڴ棬ʧ°ÜÁË¡£ÎÒ¼ì²éÁ˺ܾòÎÊýºÍAPIÉùÃ÷¾ùû·¢ÏÖÓÐʲôÎÊÌâÄÇôÎÊÌâ³öÔÚʲôµØ·½ÄØ£¿ÎªÁËÇóÖ¤ÎÒдÁË´úÂë¶þ£¬Ò²¾ÍÊÇ´úÂëÒ»×îÖÕÔÚRing3²ãµ÷ÓõÄAPIº¯Êý
´úÂë¶þ£º
Option Explicit
Private Const MEM_RELEASE = &H8000
Private Const MEM_COMMIT = &H1000
Private Const PAGE_EXECUTE_READWRITE = &H40
Private Declare Function Vi


Ïà¹ØÎĵµ£º

VB¶ÔINIÎļþ²Ù×÷

VB¶ÔINIÎļþ²Ù×÷
2009-02-25 00:17
INI ÎļþÊÇʲôÑù×Ó£¿——²»»á°É£¬Õⶼ²»ÖªµÀ¡£INI Îļþ¾ÍÊÇ Windows Öг£¼û
µÄÒÔ .ini ΪÀ©Õ¹ÃûµÄÎļþ£¬ÆäÄÚ²¿¸ñʽºÍ¸÷²¿·ÖµÄÃû³ÆÈçÏ£º
[Section1]
Key1=Value1
Key2=Value2
Key3=Vlaue3
[Section2]
Key1=Value1
Key2=Value5
Key4=Value4
Key5=...
...
 & ......

VB.NETÖÐÄܲ»ÄܶÔDATASETÔÙÓÃSQLÓïÑÔ

¿ÉÒÔɸѡÊý¾Ý£¬µ«²»ÄÜÊDZê×¼µÄSQLÓï¾ä£º
Me.DsUserManager1.Tables(0).Select("id > 5 and id <20")
---------------------------------------------------------------
1.ɸѡ£º
dataset.tables("tabname").select("id=1")'Ï൱ÓÚSQLÖÐWHEREºóµÄÌõ¼þÄÚÈÝ
2.±£´æµ½ÄÄ£¿Õâµ¹ÊDz»Öª ......

vb Á¬½ÓoracleÊý¾Ý¿â

         
    Dim cn As ADODB.Connection
    Dim rs     As ADODB.Recordset
    Set cn = New ADODB.Connection
    cn.Open "Provider=OraOLEDB.Oracle.1;Persist Security Info= ......

ÓÃvbʵÏÖ¼ÆËã»ú¹¦ÄÜ


±¨¸æÊé
Ãû³Æ
ʵÑé10-1 ʵÏÖ¼ÆËãÆ÷µÄ¹¦ÄÜ
ÐÕÃû
 
Ö¸µ¼½Ìʦ
 
ѧºÅ
 
ÈÕÆÚ
 
ÈÎÎñÇåµ¥
ÔÚ±¾Á·Ï°ÖУ¬Ä㽫ʹ»æÖƵļÆËãÆ÷Íê³É¼òµ¥µÄËÄÔòÔËËã¡£
1)        Æô¶¯Visual Studio 2005¡£
2)        н¨Ò»¸öVB WindowsÓ ......

ÓÃVBö¾Ùϵͳ½ø³ÌPID¼°Â·¾¶

http://blog.csdn.net/cw198624/archive/2009/02/19/3911759.aspx
Ìí¼ÓÒ»¸öListBoxºÍÒ»¸ö°´Å¥
Option Explicit
Private Declare Function CloseHandle Lib "kernel32" (ByVal Handle As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As L ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ