IDSFDevice::Name Property

The Name property gets or sets the display name for a device.

This property is read/write.


HRESULT put_Name(
  [in]           BSTR bstrName

HRESULT get_Name(
  [out, retval]  BSTR *pbstrName

Property Value

The new name for the device.

Error Codes

Name returns one of the following values:

Name Meaning

The operation succeeded.


The pbstrName parameter was not a valid pointer.


Name could not allocate space to hold the device name.


The Name property is reserved for future use and is included for completeness.

The name that Name specifies is arbitrary, for application use, and does not have to be unique.


The following VBScript code example shows how to set and get the Name property.

 ' Create a USB device
Dim USBDevice : Set USBDevice = CreateObject("SOFTUSB.SoftUSBDevice")

' Get the DSFDevice object from the USB device
Dim DSFDevice : Set DSFDevice = USBDevice.DSFDevice

' Get the Name property
Dim Name
Name = Name

' If Name is not LoopBack, set it to LoopBack
If Name <>  "LoopBack" Then
 DSFDevice.Name = "LoopBack"
End If

See Also




Send comments about this topic to Microsoft

Build date: 9/21/2010