Contents

setProperty

Synchronized method to construct and add an OSData property to a registry entry's property table.

Declaration

virtual bool setProperty(
 const char *aKey, 
 void *bytes, 
 unsigned intlength);

Parameters

  • aKey:

    The property's name as a C-string.

  • bytes:

    The property's value as a pointer. OSData will copy this data.

  • length:

    The property's size in bytes, for OSData.

Return Value

true on success or false on a resource failure.

Overview

This method will add or replace a property in a registry entry's property table, using the OSDictionary::setObject semantics. This method is synchronized with other IORegistryEntry accesses to the property table. The property is created as an OSData copied from the supplied data and length, set in the property table with the given name, and released.

See Also

Miscellaneous