Win32_CodecFile class

The Win32_CodecFile WMI class represents the audio or video codec installed on the computer system. Codecs convert one media format type to another, typically a compressed format to an uncompressed format. The name "codec" is derived from a combination of compress and decompress. For example, a codec can convert a compressed format, such as MS-ADPCM, to an uncompressed format such as PCM, which most audio hardware can play directly.

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

Syntax

[Dynamic, Provider("CIMWin32"), UUID("{8502C4C3-5FBB-11D2-AAC1-006008C78BC7}"), AMENDMENT]
class Win32_CodecFile : CIM_DataFile
{
  uint32   AccessMask;
  boolean  Archive;
  string   Caption;
  boolean  Compressed;
  string   CompressionMethod;
  string   CreationClassName;
  datetime CreationDate;
  string   CSCreationClassName;
  string   CSName;
  string   Description;
  string   Drive;
  string   EightDotThreeFileName;
  boolean  Encrypted;
  string   EncryptionMethod;
  string   Extension;
  string   FileName;
  uint64   FileSize;
  string   FileType;
  string   FSCreationClassName;
  string   FSName;
  string   Group;
  boolean  Hidden;
  datetime InstallDate;
  uint64   InUseCount;
  datetime LastAccessed;
  datetime LastModified;
  string   Manufacturer;
  string   Name;
  string   Path;
  boolean  Readable;
  string   Status;
  boolean  System;
  string   Version;
  boolean  Writeable;
};

Members

The Win32_CodecFile class has these types of members:

Methods

The Win32_CodecFile class has these methods.

Method Description
ChangeSecurityPermissions Changes the security permissions for the logical file specified in the object path.
ChangeSecurityPermissionsEx Changes the security permissions for the logical file specified in the object path.
Compress Compresses the logical file (or directory) specified in the object path.
CompressEx Compresses the logical file (or directory) specified in the object path.
Copy Copies the logical file or directory specified in the object path to the location specified by the input parameter.
CopyEx Class method that copies the logical file or directory specified in the object path to the location specified by the FileName parameter.
Delete Deletes the logical file (or directory) specified in the object path.
DeleteEx Deletes the logical file (or directory) specified in the object path.
GetEffectivePermission Determines whether the caller has the aggregated permissions specified by the permission argument not only on the file object, but on the share the file or directory resides on (if it is on a share).
Rename Class method that renames the logical file (or directory) specified in the object path.
TakeOwnerShip Obtains ownership of the logical file specified in the object path.
TakeOwnerShipEx Class method that obtains ownership of the logical file specified in the object path.
Uncompress Uncompresses the logical file (or directory) specified in the object path.
UncompressEx Uncompresses the logical file (or directory) specified in the object path.

Properties

The Win32_CodecFile class has these properties.

AccessMask

Data type: uint32

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Access Rights")

Bitmask that represents the access rights required to access or perform specific operations on the codec file. For bit values, see File and Directory Access Rights Constants.

Note

On FAT volumes, the FULL_ACCESS value is returned instead, which indicates no security has been set on the object.

This property is inherited from CIM_LogicalFile.

FILE_READ_DATA (file) or FILE_LIST_DIRECTORY (directory) (1)

FILE_WRITE_DATA (file) or FILE_ADD_FILE (directory) (2)

FILE_APPEND_DATA (file) or FILE_ADD_SUBDIRECTORY (directory) (4)

FILE_READ_EA (8)

FILE_WRITE_EA (16)

FILE_EXECUTE (file) or FILE_TRAVERSE (directory) (32)

FILE_DELETE_CHILD (directory) (64)

FILE_READ_ATTRIBUTES (128)

FILE_WRITE_ATTRIBUTES (256)

DELETE (65536)

READ_CONTROL (131072)

WRITE_DAC (262144)

WRITE_OWNER (524288)

SYNCHRONIZE (1048576)

Archive

Data type: boolean

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Should Be Archived")

If True, the file should be archived.

This property is inherited from CIM_LogicalFile.

Caption

Data type: string

Access type: Read-only

Qualifiers: MaxLen (64), DisplayName ("Caption")

Short description of the object.

This property is inherited from CIM_ManagedSystemElement.

Compressed

Data type: boolean

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Compressed")

If True, the file is compressed.

This property is inherited from CIM_LogicalFile.

CompressionMethod

Data type: string

Access type: Read-only

Qualifiers: DisplayName ("Compression Method")

Algorithm or tool used to compress the logical file. If it is not possible (or not desired) to describe the compression scheme (perhaps because it is not known), use the following words: "Unknown" to represent that it is not known whether the logical file is compressed or not; "Compressed" to represent that the file is compressed but either its compression scheme is not known or not disclosed; and "Not Compressed" to represent that the logical file is not compressed.

This property is inherited from CIM_LogicalFile.

CreationClassName

Data type: string

Access type: Read-only

Qualifiers: CIM_Key, DisplayName ("Class Name")

Name of the first concrete class to appear in the inheritance chain used in the creation of an instance. When used with the other key properties of the class, the property allows all instances of this class and its subclasses to be uniquely identified.

This property is inherited from CIM_LogicalFile.

CreationDate

Data type: datetime

Access type: Read-only

Qualifiers: DisplayName ("Creation Date")

File creation date.

This property is inherited from CIM_LogicalFile.

CSCreationClassName

Data type: string

Access type: Read-only

Qualifiers: Propagated ("CIM_FileSystem.CSCreationClassName"), CIM_Key, DisplayName ("Computer System Class Name")

Class of the computer system.

This property is inherited from CIM_LogicalFile.

CSName

Data type: string

Access type: Read-only

Qualifiers: Propagated ("CIM_FileSystem.CSName"), CIM_Key, DisplayName ("Computer System Name")

String representing the name of the computer system.

This property is inherited from CIM_LogicalFile.

Description

Data type: string

Access type: Read-only

Qualifiers: Override (Description), MappingStrings ("Win32Registry|System\\CurrentControlSet\\control\\MediaResources\\icm|Description")

Full name of the codec driver. This string is intended to be displayed in large (descriptive) spaces.

This property is inherited from CIM_ManagedSystemElement.

Example: "Microsoft PCM Converter"

Drive

Data type: string

Access type: Read-only

Qualifiers: Fixed, Schema ("Win32"), DisplayName ("Drive")

Drive letter (including colon) of the file.

This property is inherited from CIM_LogicalFile.

Example: "c:"

EightDotThreeFileName

Data type: string

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Eight Dot Three File Name")

DOS-compatible file name for this file.

This property is inherited from CIM_LogicalFile.

Example: "c:\progra~1"

Encrypted

Data type: boolean

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Encrypted")

If True, the file is encrypted.

This property is inherited from CIM_LogicalFile.

EncryptionMethod

Data type: string

Access type: Read-only

Qualifiers: DisplayName ("Encryption Method")

Algorithm or tool used to encrypt the logical file. If it is not possible (or not desired) to describe the encryption scheme (perhaps for security reasons), use the following words: "Unknown" to represent that it is not known whether the logical file is encrypted or not; "Encrypted" to represent that the file is encrypted but either its encryption scheme is not known or not disclosed; and "Not Encrypted" to represent that the logical file is not encrypted.

This property is inherited from CIM_LogicalFile.

Extension

Data type: string

Access type: Read-only

Qualifiers: Fixed, Schema ("Win32"), DisplayName ("File Extension")

File name extension (without the dot).

This property is inherited from CIM_LogicalFile.

Examples: "txt", "mof", "mdb"

FileName

Data type: string

Access type: Read-only

Qualifiers: Fixed, Schema ("Win32"), DisplayName ("File Name")

Name (without the extension) of the file.

This property is inherited from CIM_LogicalFile.

Example: "autoexec"

FileSize

Data type: uint64

Access type: Read-only

Qualifiers: DisplayName ("Size"), Units ("bytes")

Size of the file (in bytes).

This property is inherited from CIM_LogicalFile.

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

FileType

Data type: string

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("File Type")

File type (indicated by the Extension property).

This property is inherited from CIM_LogicalFile.

FSCreationClassName

Data type: string

Access type: Read-only

Qualifiers: Propagated ("CIM_FileSystem.CreationClassName"), CIM_Key, DisplayName ("File System Class Name")

Class of the file system.

This property is inherited from CIM_LogicalFile.

FSName

Data type: string

Access type: Read-only

Qualifiers: Propagated ("CIM_FileSystem.Name"), CIM_Key, DisplayName ("File System Name")

Name of the file system.

This property is inherited from CIM_LogicalFile.

Group

Data type: string

Access type: Read-only

Qualifiers: MappingStrings ("Win32Registry|SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\drivers.desc")

Codec represented by this class.

The values are:

"Audio"
"Video"

Audio ("Audio")

Video ("Video")

Hidden

Data type: boolean

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Hidden")

If True, the file is hidden.

This property is inherited from CIM_LogicalFile.

InstallDate

Data type: datetime

Access type: Read-only

Qualifiers: MappingStrings ("MIF.DMTF|ComponentID|001.5"), DisplayName ("Install Date")

Object was installed. This property does not require a value to indicate that the object is installed.

This property is inherited from CIM_ManagedSystemElement.

InUseCount

Data type: uint64

Access type: Read-only

Qualifiers: DisplayName ("Current File Open Count")

Number of "file opens" that are currently active against the file.

This property is inherited from CIM_LogicalFile.

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

LastAccessed

Data type: datetime

Access type: Read-only

Qualifiers: DisplayName ("Last Accessed")

File was last accessed.

This property is inherited from CIM_LogicalFile.

LastModified

Data type: datetime

Access type: Read-only

Qualifiers: DisplayName ("Last Modified")

File was last modified.

This property is inherited from CIM_LogicalFile.

Manufacturer

Data type: string

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Manufacturer")

Manufacturer string from version resource, if one is present.

This property is inherited from CIM_DataFile.

Name

Data type: string

Access type: Read-only

Qualifiers: Key

Inherited name that serves as a key of a logical file instance within a file system. Full path names should be provided.

This property is inherited from CIM_ManagedSystemElement.

Example: "C:\Windows\system\win.ini"

Path

Data type: string

Access type: Read-only

Qualifiers: Fixed, Schema ("Win32"), DisplayName ("Path")

Path of the file. This includes leading and trailing backslashes.

This property is inherited from CIM_LogicalFile.

Example: "\windows\system\"

Readable

Data type: boolean

Access type: Read-only

Qualifiers: DisplayName ("Readable")

File can be read.

This property is inherited from CIM_LogicalFile.

Status

Data type: string

Access type: Read-only

Qualifiers: MaxLen (10), DisplayName ("Status")

Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, yet the managed element is neither "OK" nor in one of the other states.

This property is inherited from CIM_ManagedSystemElement.

Values include the following:

OK ("OK")

Error ("Error")

Degraded ("Degraded")

Unknown ("Unknown")

Pred Fail ("Pred Fail")

Starting ("Starting")

Stopping ("Stopping")

Service ("Service")

Stressed ("Stressed")

NonRecover ("NonRecover")

No Contact ("No Contact")

Lost Comm ("Lost Comm")

System

Data type: boolean

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("System File")

If True, the file is a system file.

This property is inherited from CIM_LogicalFile.

Version

Data type: string

Access type: Read-only

Qualifiers: Schema ("Win32"), DisplayName ("Version")

Version string from version resource, if one is present.

This property is inherited from CIM_DataFile.

Writeable

Data type: boolean

Access type: Read-only

Qualifiers: DisplayName ("Writeable")

If True, the file can be written.

This property is inherited from CIM_LogicalFile.

Remarks

The Win32_CodecFile class is derived from CIM_DataFile.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
Root\CIMV2
MOF
CIMWin32.mof
DLL
CIMWin32.dll

See also

CIM_DataFile

Operating System Classes