IDSFDevice::State Property

The State property gets the state bits for a device.

This property is read-only.

Syntax

HRESULT get_State(
  [out, retval]  long *plState
);

Property Value

Caller-allocated space to hold state bits.

Error Codes

State returns S_OK if the operation succeeds or E_POINTER if the plState parameter is not a valid pointer.

Remarks

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

State bits are device-specific.

Examples

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

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

Dim READY : READY = 1

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

' Get the State property
Dim State
State = DSFDevice.State

' If State is ready, enable the device
If State == READY Then
 DSFDevice.DeviceEnabled = TRUE
End If

See Also

IDSFDevice

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010