VB ʹÓÃWMI±à³Ì£¨Ò»£©
Óɵ×ÖÁÉÏÊÇ£º
• ÍйÜ×ÊÔ´
• WMI »ù´¡½á¹¹
• ʹÓÃÕß
ÍйÜ×ÊÔ´
ÍйÜ×ÊÔ´ÊÇÈÎÒâÂß¼»òÎïÀí×é¼þ£¬Í¨¹ýʹÓà WMI ½øÐй«¿ªºÍ¹ÜÀí¡£¿ÉÒÔʹÓà WMI ¹ÜÀíµÄ Windows ×ÊÔ´°üÀ¨£º¼ÆËã»úϵͳ¡¢´ÅÅÌ¡¢ÍâΧÉ豸¡¢Ê¼þÈÕÖ¾¡¢Îļþ¡¢Îļþ¼Ð¡¢Îļþϵͳ¡¢ÍøÂç×é¼þ¡¢²Ù×÷ϵͳ×Óϵͳ¡¢ÐÔÄܼÆÊýÆ÷¡¢´òÓ¡»ú¡¢½ø³Ì¡¢×¢²á±íÉèÖᢰ²È«ÐÔ¡¢·þÎñ¡¢¹²Ïí¡¢SAM Óû§ºÍ×é¡¢Active Directory¡¢Windows °²×°³ÌÐò¡¢Windows Çý¶¯³ÌÐòģʽ (WDM) É豸Çý¶¯³ÌÐò£¬ÒÔ¼° SNMP ¹ÜÀíÐÅÏ¢»ù (MIB) Êý¾ÝµÈ¡£WMI ÍйÜ×ÊԴͨ¹ýÒ»¸öÌṩ³ÌÐòÓë WMI ͨѶ¡£
WMI »ù´¡½á¹¹
Öмä²ãÊÇ WMI »ù´¡½á¹¹¡£WMI ÓÉËĸöÖ÷Òª×é¼þ¹¹³É£º¹«¹²ÐÅϢģÐͶÔÏó¹ÜÀíÆ÷£¨Common Information Model Object Manager£¬CIMOM£©¡¢¹«¹²ÐÅϢģÐÍ£¨Common Information Model£¬CIM£©´¢´æ¿â£¬ÒÔ¼°Ìṩ³ÌÐò¡£ÕâÈý¸ö WMI ×é¼þ¹²Í¬Ìṩͨ¹ýÆ䶨Òå¡¢¹«¿ª¡¢·ÃÎʺͼìË÷ÅäÖú͹ÜÀíÊý¾ÝµÄ»ù´¡½á¹¹£¬ÎªÁËÐðÊöºÍÀí½â·½±ã£¬ÎÒÃÇÔÚ±¾ÎÄÖоͽ«ÕâÈý¸ö×é¼þͨ³ÆΪCIM´¢´æ¿â¡£µÚËĸö×é¼þÊÇ WMI ½Å±¾¶ÔÏó¿â£¬¾ÍÊÇÎÒÃÇÇ°Ã漸¸öÀý³Ì¶¼±ØÐëÒýÓõēMicrosoft WMI Scripting V1.1 Library”¶ÔÏó¿â£¬¾ÍÎÒÃÇÀ´Ëµ — ¾ÍÊÇʹÓÃÕߣ¬Ê×ÏȾÍÊÇͨ¹ýWMI ½Å±¾¿âÓëCIM´¢´æ¿â´ò½»µÀÈ¥¹ÜÀíϵͳµÄ¸÷ÖÖÍйÜ×ÊÔ´¡£Òò´ËÎÒÃÇÖصã¹Ø×¢µÄÓ¦¸ÃÊÇCIM´¢´æ¿âºÍWMI½Å±¾¶ÔÏó¿â¡£
CIM ´¢´æ¿â
WMI µÄ»ù±¾Ë¼ÏëÊÇ — ¿ÉÒÔÓÃÒ»¸ö¼Ü¹¹Í³Ò»±íʾÀ´×Ô²»Í¬Ô´µÄÅäÖú͹ÜÀíÐÅÏ¢¡£CIM ¾ÍÊÇÕâ¸ö¼Ü¹¹£¬»¹µ÷ÓÃÁËÄ£ÐÍ»¯Íйܻ·¾³ºÍ¶¨Òåÿ¸öÓÉ WMI ¹«¿ªµÄÊý¾Ý¿éµÄ¶ÔÏó´¢´æ¿â»òÀà´æ´¢¡£¸Ã¼Ü¹¹»ùÓÚ DMTF ¹«¹²ÐÅϢģÐͱê×¼¡£
CIM ÓÉÀà ×é³É¡£ÀàÊÇÒ»¸ö WMI ÍйÜ×ÊÔ´µÄÒ»¸öÄ£ÐÍ¡£CIM Ààͨ³£±íʾ¶¯Ì¬×ÊÔ´£¬¾ÍÊÇ˵ÍйÜ×ÊÔ´µÄʵÀý²¢²»´æ´¢ÔÚ CIM ÖУ¬¶øÊÇͨ¹ý»ùÓÚʹÓÃÕßÇëÇóµÄÌṩ³ÌÐò¶¯Ì¬¼ìË÷¡£ÆäÔÒòºÜ¼òµ¥£¬´ó¶àÊý WMI ÍйÜ×ÊÔ´µÄ²Ù×÷״̬¸ü¸ÄºÜƵ·±£¬Òò¶ø±ØÐë°´Ðè¶ÁÈ¡ÒÔÈ·±£¼ìË÷µÄÊÇ×îеÄÐÅÏ¢£¬¾ÍÏóÎÒÃÇÀý³Ì1ÖеĽø³ÌºÍÀý³Ì2ÖеķþÎñËæʱ¶¼Ôڱ䶯µÄ¡£
×¢ÔÚ CIM µÄÉÏÏÂÎÄÖУ¬´¢´æ¿âÕâÒ»ÊõÓïÓÐЩ±»Îó½â¡£¾¡¹Ü CIM ÊÇÒ»¸ö´¢´æ¿â£¬¶øÇÒÄܹ»´æ´¢¾²Ì¬Êý¾Ý£¬µ«ÆäÖ÷Òª½ÇÉ«ÊÇ´æ´¢ÍйÜ×ÊÔ´µÄÄ
Ïà¹ØÎĵµ£º
Private Sub Command12_Click()
Dim i As Integer
On Error GoTo ABC
ShowPrinterSetup Me
For i = 1 To Adodc1.Recordset.RecordCount
If Picture2.Picture <> LoadPicture("") Then
Printer.PaintPicture Picture2.Picture, 200, Picture1.Top + 1000
Else
......
ÕâÄêÍ·,ÔÚÕâ¸öÂÛ̳ÀïÃæÒѾûÓÐʲô¼¼ÊõÌùÁË...ºÇºÇ~·¢Ò»Æª¾ªÌìµØ,Æü¹íÉñµÄÌû×Ó.µ±È»Õâ¸öÖ»ÊÇÄ£Äâ¼üÅ̵ÄÖÕ¼«Ä£Äâ.ºÇºÇ~
¼üÅÌÊÇÎÒÃÇʹÓüÆËã»úµÄÒ»¸öºÜÖØÒªµÄÊäÈëÉ豸ÁË£¬¼´Ê¹ÔÚÊó±ê´óÐÐÆäµÀµÄ½ñÌ죬ºÜ¶à³ÌÐòÒÀÈ»Àë²»¿ª¼üÅÌÀ´²Ù×÷¡£µ«ÊÇÓÐʱºò£¬Ò»Ð©Öظ´ÐԵģ¬ºÜ·±ËöµÄ¼üÅ̲Ù×÷×Ü»áÈÃÈËÆ£±¹£¬ÓÚÊÇ ......
VBÊý¾Ý¿â²Ù×÷ʵÀý
2008-02-22 05:49
VBÊý¾Ý¿â²Ù×÷¶ÔºÜ¶à³õѧÕßÅóÓѸе½±È½Ï³ÔÁ¦£¬Ä¿Ç°½Ì²ÄÖеÄʵÀý¶ÔÊý¾Ý¿â²Ù×÷¶¼±È½Ïµ¥Ò»£¬ºÜ¶àÅóÓÑÌáÒéÎÒ×öÒ»¸ö°üÀ¨ä¯ÀÀ¡¢Ìí¼Ó¡¢Ð޸ġ¢É¾³ý¹¦ÄܵÄÊý¾Ý¿â²Ù×÷ʵÀý£¬ÏÂÃæÕâ¸öʵÀý¾ÍÊÇÒ»¸öÕâÑùµÄÊý¾Ý¿â²Ù×÷ʵÀý¡£
¡¶Êé¿â¹ÜÀíϵͳ¡·ÊÇÒ»¸ö×î¼òµ¥µÄÊý¾Ý¿â²Ù×÷ʵÀý ......
½¨Á¢ VPN ²¦ºÅÈ«²¿´úÂëÈçÏÂ:
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
......
Imports System.Data.OleDb
Inherits System.Windows.Forms.Form
Dim myconnection As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" & Application.StartupPath & "\student0.mdb") ‘------------------------- Á´½ÓÊý¾Ý¿â
......