busTRACE This WEB page comes from the busTRACE 10.0 User's Manual. (Table of Contents)

Previous Topic Next Topic
 

You can configure your script to issue any IOCTL to the device object that the script is currently running against. Simply drag and drop the Execute IOCTL option from the Script Nodes docked window into your script matrix window. To edit the script node, you simply double-click the node (in the script matrix window) or right click the node and choose the Edit Node option.

 

In order to send an IOCTL to the device object, you should be completely familiar with the DeviceIoControl function as defined in the Windows SDK. You should also understand exactly which IOCTLs your device object / class driver will support. The ability to send any IOCTL to the device object is for advanced users only. Use is recommended only for experienced Windows software engineers.

The following fields are available for you to edit:

IOCTL Code

In this field, you specify the 32-bit IOCTL value. Append the value with 'h' to indicate that it is a hex value. You will need to refer to the Windows Driver Kit to determine the supported IOCTL codes for your device object.

Data In Length

This field specifies the amount of data specified in the IOCTL input buffer (i.e. lpInBuffer and nInBufferSize as documented in the SDK for DeviceIoControl). You can append the value with 'h' if you want to enter a hex value. If you specify a non-zero value, the Edit Buffer button will be enabled. You can then click on that button to edit the buffer that is sent down to the device object with the IOCTL.

Data Out Length

This field specifies the amount of data specified in the IOCTL output buffer (i.e. lpOutBuffer and nOutBufferSize as documented in the SDK for DeviceIoControl). You can append the value with 'h' if you want to enter a hex value.

Description (optional)

This field is optional. You can type a brief one line description of what the IOCTL will do when it is executed. This can help you self-document the script.

Predefined IOCTLs

We have included a small list of available IOCTLs you can send down to your device object. To use one of our predefined IOCTLs, simply select the IOCTL in the list and click on the Set Parameters button. Alternatively, you can simply double-click on any of the list items. The predefined IOCTL settings are then automatically copied into the "DeviceIoControl Parameters" section directly above.

 

When the executing script gets to this script node, it will send the given IOCTL to the current device. You can configure which node the script should branch to, depending on how the IOCTL completes, by clicking on the Node Links tab.

See Also: