IDSFDevice::Inserted Property

The Inserted property describes whether a simulated device appears to be physically present in a system.

This property is read/write.

Syntax

HRESULT put_Inserted(
  [in]           VARIANT_BOOL fvarInserted
);

HRESULT get_Inserted(
  [out, retval]  VARIANT_BOOL *pfvarInserted
);

Property Value

A Boolean value that designates whether the simulated device appears physically present in the system.

Error Codes

Inserted returns one of the following values:

Name Meaning
S_OK

The operation succeeded.

E_POINTER

The pfvarInserted parameter was not a valid pointer.

E_INVALIDARG

The fvarInserted parameter is not a valid VARIANT_BOOL value.

Examples

The following VBScript code example shows how to set and get the Inserted 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 device's Inserted property
Dim Inserted
Inserted = DSFDevice.Inserted

` If the device is not inserted, insert it
If Inserted <> TRUE Then
 DSFDevice.Inserted = TRUE;
End If

See Also

IDSFDevice

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010