1. 0 2.0

Gets the pen data associated with events in a given range.

Note This function is provided only for compatibility with version 1.0 of the Pen API and will not be supported in future versions. Use DoDefaultPenInput or GetPenInput instead.

REC GetPenHwEventData( UINT wEventRefBeg, UINT wEventRefEnd, LPPOINT lppt, LPVOID lpvOemData, int cPntMax, LPSTROKEINFO lpsi )



Beginning pen event.


Ending pen event.


Address of a an array of POINT structures. The size of the array must be at least sizeof( POINT ) multiplied by cPntMax.


Buffer to fill with OEM-specific data. This can be NULL if no data is required.


Maximum number of samples to return.


Address of a STROKEINFO structure that receives the stroke information, including the count of points and point state. Also included is the time stamp of the first point returned in the buffer, which is the number of milliseconds that have elapsed since Windows started.

Return Value

Returns REC_OK if successful; otherwise, the return value can be one of the following:

The array identified by lppt is not large enough to hold all the points requested.
Invalid parameter.


This function fetches all data collected from the pen event wEventRefBeg up to but not including the pen event wEventRefEnd. If wEventRefBeg equals wEventRefEnd, GetPenHwEventData retrieves the single pen event associated with wEventRefBeg.

The values for wEventRefBeg and wEventRefEnd are obtained by calling the Windows GetMessageExtraInfo function.

This function can be called directly from an application. If it returns REC_BUFFERTOOSMALL, no data is returned and the cPnt member of lpsi contains the number of points between wEventRefBeg and wEventRefEnd. If REC_OK is returned, the cPnt member contains the number of valid points placed in the array at lppt.

See Also


Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database