IDSFDevice::Name Property

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

This property is read/write.

Syntax

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
S_OK

The operation succeeded.

E_POINTER

The pbstrName parameter was not a valid pointer.

E_OUTOFMEMORY

Name could not allocate space to hold the device name.

Remarks

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.

Examples

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

IDSFDevice

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010