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

ÓÃ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 Long, ByVal dwProcessId As Long) As Long
Private Declare Function EnumProcesses Lib "psapi" (ByRef lpidProcess As Long, ByVal cb As Long, ByRef cbNeeded As Long) As Long
Private Declare Function EnumProcessModules Lib "psapi" (ByVal hProcess As Long, ByRef lphModule As Long, ByVal cb As Long, ByRef cbNeeded As Long) As Long
Private Declare Function GetModuleFileNameExA Lib "psapi" (ByVal hProcess As Long, ByVal hModule As Long, ByVal ModuleName As String, ByVal nSize As Long) As Long
'ÉÏΪº¯ÊýÉùÃ÷£¬Ôڴ˳ÌÐòÖÐEnumProcessModulesΪ·Ç±ØÒª£¬Ã¶¾Ù½ø³Ì·¾¶£¬²¢²»ÐèҪȥö¾Ù½ø³ÌµÄÄ£¿é¡£
Dim cbNeeded As Long, cbNeeded2 As Long, ProcessIDs(1 To 255) As Long
Dim lRet As Long, ModuleName As String, hProcess As Long
Const PROCESS_QUERY_INFORMATION = &H400
Const PROCESS_VM_READ = &H10
Dim DeskW As Long, DeskH As Long
Private Sub Command1_Click()
Dim ProcessCount As Long, I As Long
List1.Clear
Call EnumProcesses(ProcessIDs(1), 256, cbNeeded) '·µ»Ø½ø³ÌPIDÊý×éºÍ½ø³ÌÊý×é´óС
ProcessCount = cbNeeded / 4 '¼ÆËã³ö½ø³ÌÊý
For I = 1 To ProcessCount
hProcess = OpenProcess(&H400 Or &H10, False, ProcessIDs(I))
If hProcess <> 0 Then
ModuleName = Space(255) 'Ϊģ¿éÃû·ÖÅä¿Õ¼ä£¬ÕâºÜÖØÒª
'Ä£¿é¾ä±úÖ¸ÕëΪÁãĬÈÏ»ñÈ¡½ø³ÌÃû£¬ÎÞÐèö¾Ù½ø³ÌÄ£¿é
lRet = GetModuleFileNameExA(hProcess, 0, ModuleName, 255)
List1.AddItem ProcessIDs(I) & Chr(9) & ModuleName '½«½ø³ÌPIDºÍ·¾¶Ìí¼Óµ½Áбí¿ò
End If
lRet = CloseHandle(hProcess) '¹Øµô½ø³Ì¾ä±ú
Next
End Sub
2010-02-23
 http://www.docin.com/p-1549182.html


Ïà¹ØÎĵµ£º

VB³õ¼¶ÄæÏòÓëÀûÓÃ

½ñÌì×öÒ»¸öVB³ÌÐòµÄ×ÔÏÔ×¢²áÂë¡£ÎÒÒ²²»ÖªµÀ¸ÃÔõô½Ð£¬¾ÍÊÇÕÒµ½³öÏÖ×¢²áÂëµÄµØ·½£¬È»ºóÓöԻ°¿òµ¯³öÀ´¡£Ëµ°×Á˾ÍÊÇÓÃMessageBox°ÑÒ»¸ö×Ö·û´®¸øµ¯³öÀ´£¨Ã»×·Ç󰢡£¡£¡££©
    ÎªÁËÓеã×·Ç󣬽ñÌì²»µ¼Èëuser32ÀïÃæµÄAPI£¬¶øÊÇ°ÑVBÀïÃæ×Ô´øµÄMsgboxº¯Êý¸øÍÚ³öÀ´µ÷Ó㬾ÍÊÇÒýÓÃMSVBVM60.rtcMsgBoxº¯Êý¡£ÎÒÊ ......

VBÄæÏò¹¤³ÌʵսÑÝÏ°

û¿Ç,ûÓÐCommand Button,ËùÓеÄÄÚÈݶ¼ÔÚForm_LoadÀï¡£ÓÃVBDE²é¿´£¬Form_LoadÔÚ00406A90,´ò¿ªW32dsm£¬ÔØÈëCasinoÂÖÅÌÖÇÄÜ»úÆ÷ÈË£¬²éÕÒ00406A90£¬·´»ã±à´úÂëÈçÏ£º
Quote:
:00406A90 55                   &nb ......

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ʵÏÖExcelÎļþµÄ×Ô¶¯ºÏ²¢

¼òµ¥¶øʵÓõĺϲ¢ExcelÎļþµÄº¯Êý£¬Äܹ»½«¶à¸öXLSÎļþÖÐÖ¸¶¨ÊýÁ¿µÄ¹¤×÷±í×Ô¶¯ºÏ²¢µ½Ò»¸öXLSÎļþÀï¡£µ±È»£¬Èç¹ûÖ»ÊÇÊý¾ÝºÏ²¢£¬ÔòʹÓÃADO¾Í¿ÉÒÔʵÏÖ£¬µ«Èç¹ûÒª±£Áô±í¸ñ¸ñʽ£¬Ôò¿ÖÅÂÖ»ÄÜʹÓð³µÄ·½·¨ÁË¡£
    Ò»¡¢º¯Êý´úÂ룺
Option Explicit
'* ********************************************************* ......

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


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