IDSFDevice::OpMode Property

The OpMode property gets or sets the current operating mode (that is, simulation or capture) for a device.

This property is read/write.

Syntax

HRESULT put_OpMode(
  [in]           DSFOpMode Mode
);

HRESULT get_OpMode(
  [out, retval]  DSFOpMode *pMode
);

Property Value

The new operating modes for the device are one of the following:

  • 0 = Capture

  • 1 = Simulate

  • 2 = CaptureAndSimulate

Error Codes

OpMode returns S_OK if the operation succeeds or E_POINTER if the pMode parameter is not a valid pointer.

Remarks

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

Examples

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

Dim DSFSimulate : DSFSimulate = 1
' 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 OpMode property
Dim OpMode
OpMode = DSFDevice.OpMode

' If OpMode is not Simulate, set it to Simulate
If OpMode <> DSFSimulate Then
 DSFDevice.OpMode = DSFSimulate;
End If

See Also

IDSFDevice

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010