USUÁRIO:
SENHA:
SALVAR LOGIN ?
Dicas
Visual Basic
(Windows)
Título da Dica:
Obtendo informações das impressoras instaladas utilizando WMI
Postada em 21/6/2003 por
cacá
Esse dica funcionará sem problemas no Windows 2000 e no XP. Para utlizar a WMI no Windows 98 vocês devem instalar o WMI Core. Vocês podem fazer o download em
http://www.microsoft.com/downloads/details.aspx?FamilyID=98a4c5ba-337b-4e92-8c18-a63847760ea5&DisplayLang=en
On Error Resume Next
Dim dcSet As SWbemObjectSet
Dim objItem As SWbemObject
Set dcSet = GetObject("winmgmts:{impersonationLevel=impersonate}"). _
InstancesOf("Win32_Printer")
For Each objItem In dcSet
Debug.Print "Attributes: " & objItem.Attributes
Debug.Print "Availability: " & objItem.Availability
Debug.Print "AveragePagesPerMinute: " & objItem.AveragePagesPerMinute
Debug.Print "Capabilities: " & objItem.Capabilities
Debug.Print "CapabilityDescriptions: " & objItem.CapabilityDescriptions
Debug.Print "Caption: " & objItem.Caption
Debug.Print "ConfigManagerErrorCode: " & objItem.ConfigManagerErrorCode
Debug.Print "ConfigManagerUserConfig: " & objItem.ConfigManagerUserConfig
Debug.Print "CreationClassName: " & objItem.CreationClassName
Debug.Print "DefaultPriority: " & objItem.DefaultPriority
Debug.Print "Description: " & objItem.Description
Debug.Print "DetectedErrorState: " & objItem.DetectedErrorState
Debug.Print "DeviceID: " & objItem.DeviceID
Debug.Print "DriverName: " & objItem.DriverName
Debug.Print "ErrorCleared: " & objItem.ErrorCleared
Debug.Print "ErrorDescription: " & objItem.ErrorDescription
Debug.Print "HorizontalResolution: " & objItem.HorizontalResolution
Debug.Print "InstallDate: " & objItem.InstallDate
Debug.Print "JobCountSinceLastReset: " & objItem.JobCountSinceLastReset
Debug.Print "LanguagesSupported: " & objItem.LanguagesSupported
Debug.Print "LastErrorCode: " & objItem.LastErrorCode
Debug.Print "Location: " & objItem.Location
Debug.Print "Name: " & objItem.Name
Debug.Print "PaperSizesSupported: " & objItem.PaperSizesSupported
Debug.Print "PNPDeviceID: " & objItem.PNPDeviceID
Debug.Print "PortName: " & objItem.PortName
Debug.Print "PowerManagementCapabilities: " & objItem.PowerManagementCapabilities
Debug.Print "PowerManagementSupported: " & objItem.PowerManagementSupported
Debug.Print "PrinterPaperNames: " & objItem.PrinterPaperNames
Debug.Print "PrinterState: " & objItem.PrinterState
Debug.Print "PrinterStatus: " & objItem.PrinterStatus
Debug.Print "PrintJobDataType: " & objItem.PrintJobDataType
Debug.Print "PrintProcessor: " & objItem.PrintProcessor
Debug.Print "SeparatorFile: " & objItem.SeparatorFile
Debug.Print "ServerName: " & objItem.ServerName
Debug.Print "ShareName: " & objItem.ShareName
Debug.Print "SpoolEnabled: " & objItem.SpoolEnabled
Debug.Print "StartTime: " & objItem.StartTime
Debug.Print "Status: " & objItem.Status
Debug.Print "StatusInfo: " & objItem.StatusInfo
Debug.Print "SystemCreationClassName: " & objItem.SystemCreationClassName
Debug.Print "SystemName: " & objItem.SystemName
Debug.Print "TimeOfLastReset: " & objItem.TimeOfLastReset
Debug.Print "UntilTime: " & objItem.UntilTime
Debug.Print "VerticalResolution: " & objItem.VerticalResolution
Next
Observação: Nem todos os objetos retornam resultados
CyberWEB Network Ltda. © Copyright 2000-2024 - Todos os direitos reservados.
Powered by
HostingZone -
A melhor hospedagem para seu site