IDSFDevice::Persistent Property
The Persistent property describes whether a simulated device should remain present in the system after the computer restarts.
This property is read/write.
Syntax
HRESULT put_Persistent(
[in] VARIANT_BOOL fvarPersistent
);
HRESULT get_Persistent(
[out, retval] VARIANT_BOOL *pfvarPersistent
);
Property Value
A new persistence state for the device.
Error Codes
Persistent returns one of the following value:
Name | Meaning |
---|---|
S_OK | The operation succeeded. |
E_POINTER | The pfvarPersistent parameter was not a valid pointer. |
E_INVALIDARG | The fvarPersistent parameter was not VARIANT_BOOL. |
Examples
The following VBScript code example shows how to set and get the Persistent 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 Persistent property
Dim Persistent
Persistent = DSFDevice.Persistent
` If the device is not persistent, make the device persistent
If Persistent <> TRUE Then
DSFDevice.Persistent = TRUE;
End If
See Also
Send comments about this topic to Microsoft
Build date: 9/21/2010