IDSFDevice::Guid Property

The Guid property gets or sets the GUID for a device.

This property is read/write.

Syntax

HRESULT put_Guid(
  [in]           BSTR bstrGuid
);

HRESULT get_Guid(
  [out, retval]  BSTR *pbstrGuid
);

Property Value

A new GUID for the device.

Error Codes

Guid returns one of the following values:

This property can also return other standard COM return values.

Name Meaning
S_OK

The operation succeeded.

E_POINTER

The pbstrGuid parameter was not a valid pointer.

E_OUTOFMEMORY

Guid could not allocate space to hold the GUID.

Remarks

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

Examples

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

const LoopbackGUID       = "{ 438CB71F-ED63-42A1-B839-1543ABDAC796}"

' 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 evice GUID
Dim DeviceGuid
DeviceGuid = DSFDevice.Guid

' If the device GUID is not LoopBackGUID, set it to LoopBackGUID
If DeviceGuid <> LoopBackGUID Then
 DSFDevice.Guid = LoopBackGUID
End If

See Also

IDSFDevice

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010