RealTimeStylus.AddCustomStylusDataToQueue Method
Adds custom data to a queue of the RealTimeStylus object.
Namespace: Microsoft.StylusInput
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Sub AddCustomStylusDataToQueue ( _
queue As StylusQueues, _
guid As Guid, _
data As Object _
)
'Usage
Dim instance As RealTimeStylus
Dim queue As StylusQueues
Dim guid As Guid
Dim data As Object
instance.AddCustomStylusDataToQueue(queue, _
guid, data)
public void AddCustomStylusDataToQueue(
StylusQueues queue,
Guid guid,
Object data
)
public:
void AddCustomStylusDataToQueue(
StylusQueues queue,
Guid guid,
Object^ data
)
public function AddCustomStylusDataToQueue(
queue : StylusQueues,
guid : Guid,
data : Object
)
Parameters
queue
Type: Microsoft.StylusInput.StylusQueuesOne of the StylusQueues values that specifies the queue and the location within the queue in which to add the custom data.
guid
Type: System.GuidThe globally unique identifier (GUID) that identifies the type of custom data being added.
data
Type: System.ObjectThe custom data to add to the queue.
Remarks
This method enables 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. This method is one way to implement selection and erasing on your RealTimeStylus object by creating custom data for entering and exiting the selection and erasing modes.
You can add custom stylus data to the RealTimeStylus object's queues, StylusQueues, in one of three places using the.
When the queue parameter is set to Input, the custom data is added to the RealTimeStylus object's input queue and is sent to the synchronous plug-in collection before new data from the tablet pen data stream.
- When the queue parameter is set to Output, the custom data is added to the RealTimeStylus object's output queue after the data currently being processed by the synchronous plug-in collection.
When the queue parameter is set to OutputImmediate, the custom data is added to the RealTimeStylus object's output queue before the data currently being processed by the synchronous plug-in collection.
In each of the previous cases, data added by subsequent plug-ins in the synchronous plug-in collection is added after data added by preceding plug-ins.
Custom stylus data is added to the queue as a CustomStylusData object and plug-ins receive this data through their IStylusSyncPlugin.CustomStylusDataAdded or IStylusAsyncPlugin.CustomStylusDataAdded method.
When an object that 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.
Warning
Adding custom data to the input queue in response to custom data received by an object which implements the IStylusSyncPlugin interface may create an infinite loop on the RealTimeStylus object's thread.
For more information about the order in which data is added to the queues, including illustrations, see the conceptual topics contained in Accessing and Manipulating Stylus Input.
The following list describes conditions under which this method throws an exception.
The RealTimeStylus object is disposed.
The data parameter is null (Nothing in Visual Basic .NET).
The RealTimeStylus object is not enabled.
No appropriate plug-ins are attached to the RealTimeStylus object to receive information from the specified queue.
The guid parameter is set to the GUID associated with the DynamicRenderer or the GestureRecognizer class.
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
Microsoft.StylusInput Namespace
Microsoft.StylusInput.PluginData.CustomStylusData