Click to Rate and Give Feedback
MSDN
MSDN Library
WMI Reference
WMI Classes
Win32 Classes
 Win32_VolumeChangeEvent Class
Win32_VolumeChangeEvent Class

The Win32_VolumeChangeEventWMI class represents a local drive event that results from the addition of a drive letter or mounted drive on the computer system. Network drives are not currently supported.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties and methods are in alphabetic order, not MOF order.

Syntax

class Win32_VolumeChangeEvent : Win32_DeviceChangeEvent
{
  string DriveName;
  uint16 EventType;
  uint8  SECURITY_DESCRIPTOR[];
  uint64 TIME_CREATED;
};

Methods

The Win32_VolumeChangeEvent class does not define any methods.

Properties

The Win32_VolumeChangeEvent class defines the following properties.

DriveName
Data type: string
Access type: Read-only

Drive name (letter) that has been added or removed from the system.

EventType
Data type: uint16
Access type: Read-only

Type of event. This property is inherited from Win32_DeviceChangeEvent.

ValueMeaning
1

Configuration Changed

2

Device Arrival

3

Device Removal

4

Docking

 

SECURITY_DESCRIPTOR
Data type: uint8 array
Access type: Read-only

Descriptor used by the event provider to determine which users can receive the event. This property is inherited from __Event.

TIME_CREATED
Data type: uint64
Access type: Read-only

Unique value that indicates the time at which the event was generated. This property is inherited from __Event.

For more information about using uint64 values in scripts, see Scripting in WMI.

Remarks

The Win32_VolumeChangeEvent class is derived from Win32_DeviceChangeEvent.

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.

Requirements

Minimum supported clientWindows XP
Minimum supported serverWindows Server 2003
MOFCimwin32.mof
DLLCimwin32.dll
Namespace\root\cimv2

See Also

Operating System Classes

 

 

Send comments about this topic to Microsoft

Build date: 12/9/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Possible Error      Programmer28   |   Edit   |   Show History

It seems that Win32_VolumeChangeEvent is not available in Windows XP.

Source: http://www.microsoft.com/technet/scriptcenter/resources/qanda/feb06/hey0213.mspx

Please correct the error.

Pavel

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker