1. 0 2.0

Duplicates an HPENDATA object, allowing an application to generate clones of existing pen data.

HPENDATA DuplicatePenData( HPENDATA hpendata, UINT gmemFlags )



Pen data to be duplicated.


Flag that specifies whether or not the Windows GlobalAlloc function should create a shared memory object when the pen data object is created. This should be either 0 or GMEM_DDESHARE. The GMEM_MOVEABLE and GMEM_ZEROINIT flags are added to this value and other GMEM_ flags are ignored.

Return Value

Returns a handle to the duplicated pen data object if successful; otherwise, it returns NULL. It returns NULL if memory is not allocated successfully.


The DuplicatePenData function duplicates the data specified by the hpendata parameter by creating a second pen data memory block. The application is responsible for destroying this memory block by calling DestroyPenData.

See Also

, DestroyPenData

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples