GetPreferredPacketDescription function (recapis.h)
Retrieves a packet description that contains the packet properties the recognizer uses.
Syntax
HRESULT GetPreferredPacketDescription(
HRECOGNIZER hrec,
PACKET_DESCRIPTION *pPacketDescription
);
Parameters
hrec
Handle to the recognizer.
pPacketDescription
Describes the content of the packets the recognizer uses. For more information, see the PACKET_DESCRIPTION structure.
To retrieve the packet description, initialize the packet description with zeroes and call the GetPreferredPacketDescription function. The function populates the property and button counts, which you use to allocate space for the pPacketProperties and pguidButtons members of the PACKET_DESCRIPTION structure. Call the function again to populate the rest of the packet description.
The pguidButtons member of the PACKET_DESCRIPTION structure may be zero when GetPreferredPacketDescription returns. This means the packets have no button data, so this member does not have any pguidButtons allocated. In this case, the calling function should leave the pointer NULL.
Return value
This function can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
The parameter is an invalid pointer. |
|
The pPacketDescription buffer is too small. |
|
An unspecified error occurred. |
|
An invalid argument was received. |
Remarks
Typically, recognizers use the (x, y) coordinate properties and ignore the others. If you save the ink to a file for recognition at a later time, use the preferred packet description to only save those properties that the recognizer uses.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP Tablet PC Edition [desktop apps only] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | recapis.h |
DLL | inkobjcore.dll |