Bewerken

Delen via


DEVPROP_TYPE_EMPTY

In Windows Vista and later versions of Windows, the DEVPROP_TYPE_EMPTY identifier represents a special base-data-type identifier that indicates that a property does not exist.

Remarks

Use this base-data-type identifier with the device property functions to delete a property.

If a device property function returns this base-data-type identifier, the property does not exist.

DEVPROP_TYPE_EMPTY cannot be combined with the property-data-type modifiers DEVPROP_TYPEMOD_ARRAY or DEVPROP_TYPEMOD_LIST.

Deleting a Property

To delete a property, call the corresponding SetupDiSetXxx property function and set the function parameters as follows:

  • Set the PropertyType parameter to DEVPROP_TYPE_EMPTY, the PropertyBuffer parameter to NULL, and the PropertyBufferSize parameter to zero.

  • Set the other function input parameters as appropriate to set the property.

If DEVPROP_TYPE_EMPTY is used in an attempt to delete a property that does not exist, the delete operation will fail, and a call to GetLastError will return ERROR_NOT_FOUND.

Retrieving a Property that Does Not Exist

A call to a SetupDiGetXxx property function that attempts to retrieve a device property that does not exist will fail, and a subsequent call to GetLastError will return ERROR_NOT_FOUND. The called SetupAPI property function will set the *PropertyType parameter to DEVPROP_TYPE_EMPTY.

Requirements

Header

Devpropdef.h (include Devpropdef.h)