RealTimeStylus.AddCustomStylusDataToQueue Method

RealTimeStylus.AddCustomStylusDataToQueue Method

Adds custom data to a queue of the RealTimeStylus object.


Visual Basic .NET Public Sub AddCustomStylusDataToQueue( _
ByVal queue As StylusQueues, _
ByVal guid As Guid, _
ByVal data As Object _
C# public void AddCustomStylusDataToQueue(
StylusQueues queue,
Guid guid,
object data
Managed C++ public: void AddCustomStylusDataToQueue(
StylusQueues *queue,
Guid *guid,
Object *data


queue Microsoft.StylusInput.StylusQueues. The queue and the location within the queue in which to add the custom data.

Specifies to add data to the input queue. When data is added to the input queue, it is automatically added to the output queue.
Add data to the output queue only, before any currently-processing Sync notification.
Specifies to add data to the output queue only.
guid System.Guid. The globally unique identifier (GUID) which identifies the type of custom data that is being added.
data System.Object. The custom data to add to the queue.


ArgumentException Leave Site:
ArgumentException Leave Site:
ArgumentNullException Leave Site: The data parameter is null.
COMException Leave Site:
Exception Leave Site:
InvalidOperationException Leave Site: One of the following occurs.
InvalidOperationException Leave Site: One of the following occurs.
ObjectDisposedException Leave Site: The RealTimeStylus object is disposed.


This method allows you to extend the functionality of the RealTimeStylus object by adding custom information to the RealTimeStylus object's queue. Such information is added as a CustomStylusData object. You could use this method to implement selection and erasing on your RealTimeStylus object by creating custom data for entering and exiting the selection and eraser modes.

The queue parameter controls how the custom information is handled by the RealTimeStylus object. The RealTimeStylus object receives information from the tablets on its input queue. It sends each data object to the objects in the collection in its SyncPluginCollection property and then places the data object on its output queue. Both queues are first in, first out (FIFO) queues.

See the following table for how the value of the queue parameter affects where the custom data is added and the custom data's relationship to the current data being processed by the IStylusSyncPlugin object's in the StylusSyncPluginCollection collection. For more information on how custom data is added to the RealTimeStylus object's queue, see Custom Stylus Data.

queue Value Description
StylusQueues.OutputImmediate The custom data is added to the output queue before the current data.
StylusQueues.Output The custom data is added to the output queue after the current data.
StylusQueues.Input The custom data is added to the head of the input queue.

When two objects in the StylusSyncPluginCollection collection add custom data to the same queue in response to the same data, then the custom data from the second synchronous plug-in is added to the queue behind the custom data from the first.

When an object which is not on the RealTimeStylus object's thread calls the AddCustomStylusDataToQueue method, the custom data's relationship on the queues to the packets that the RealTimeStylus object is processing is indeterminate.

Caution: Be careful when adding custom data to the input queue in response to custom data received by an object which implements the IStylusSyncPlugin interface, as this may create an infinite loop on the RealTimeStylus object's thread.

See Also