Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Sets the metadata for a device, excluding user-defined service metadata.
HRESULT SetMetadata(
[in] const WSD_THIS_MODEL_METADATA *pThisModelMetadata,
[in] const WSD_THIS_DEVICE_METADATA *pThisDeviceMetadata,
[in, optional] const WSD_HOST_METADATA *pHostMetadata,
[in, optional] const WSD_METADATA_SECTION_LIST *pCustomMetadata
);
[in] pThisModelMetadata
Reference to a WSD_THIS_MODEL_METADATA structure which specifies metadata that is common to all instances of the model of this device. The Manufacturer, ModelNames, and ModelNumber members of the structure must contain non-NULL, non-blank entries.
[in] pThisDeviceMetadata
Reference to a WSD_THIS_DEVICE_METADATA structure which specifies metadata unique to this device. The FriendlyName, FirmwareVersion, and SerialNumber members of this structure must contain non-NULL, non-blank entries.
[in, optional] pHostMetadata
Reference to a WSD_HOST_METADATA structure that specifies service host metadata, which the specific data and characteristics of the device (for example, a printer supports color or has a stapler.).
[in, optional] pCustomMetadata
Reference to a WSD_METADATA_SECTION_LIST structure which specifies additional custom metadata associated with this device.
Possible return values include, but are not limited to, the following:
Return code | Description |
---|---|
|
Method completed successfully. |
|
pThisDeviceMetadata is NULL, pThisModelMetadata is NULL, or either structure does not contain the required members. See the parameter descriptions for a list of required members. |
|
Insufficient memory to complete the operation. |
This method must be called at least once prior to starting any device host which was registered with RegisterService. It may be called after the device is started to update the metadata, in which case WS-Discovery Hello messages are issued indicating the new metadata version.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | wsdhost.h (include Wsdapi.h) |
DLL | Wsdapi.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today