Delen via


SetFileDeviceElement method of the BcdObject class

Sets the specified file device element.

Syntax

boolean SetFileDeviceElement(
  [in] uint32 Type,
  [in] uint32 DeviceType,
  [in] string AdditionalOptions,
  [in] string Path,
  [in] uint32 ParentDeviceType,
  [in] string ParentAdditionalOptions,
  [in] string ParentPath
);

Parameters

Type [in]

The element type. This parameter is one of the Device element types from the following enumerations:

It can also be a custom element type created for your own use.

DeviceType [in]

The device type. This parameter can be one of the following values.

Value Meaning
BootDevice
1
Device that initiated the boot.
FileDevice
3
File that contains file system metadata and is treated as a device.
PartitionDevice
2
Disk partition.
RamdiskDevice
4
Ramdisk.
UnknownDevice
5
Unknown.

AdditionalOptions [in]

Either a GUID in string form with surrounding curly braces that represents another object in the store, or the empty string ("").

Path [in]

The file path.

ParentDeviceType [in]

The device type. This parameter can be one of the following values.

Value Meaning
BootDevice
1
Device that initiated the boot.
FileDevice
3
File that contains file system metadata and is treated as a device.
PartitionDevice
2
Disk partition.
RamdiskDevice
4
Ramdisk.
UnknownDevice
5
Unknown.

ParentAdditionalOptions [in]

Either a GUID in string form with surrounding curly braces that represents another object in the store, or the empty string ("").

ParentPath [in]

The path of the parent. This parameter can be an empty string ("") if the parent device is of a type that does not have a path.

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Namespace
Root\WMI
MOF
Bcd.mof

See also

BcdObject