IIXC_Page::LockPageBlock Method

From Tracker Software PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
Line 2: Line 2:
 
{{#customTitle:IIXC_Page::LockPageBlock Method}}
 
{{#customTitle:IIXC_Page::LockPageBlock Method}}
 
{{#parentPage:PXV:IIXC_Page|LockPageBlock Method|method}}
 
{{#parentPage:PXV:IIXC_Page|LockPageBlock Method|method}}
{{ToWrite}}
+
 
 
{{ToReview}}
 
{{ToReview}}
  
The method of interface of PDF-XChange Editor SDK.
+
The method locks a rectangular portion of the page and provides direct access to the page's data. Any pixel data that you write to the buffer is copied to the page when you call [[PXV:IIXC_Page_UnlockPageBlock|IIXC_Page::UnlockPageBlock]].
  
 
== Syntax ==
 
== Syntax ==
Line 14: Line 14:
 
== Parameters ==
 
== Parameters ==
 
;pRect
 
;pRect
:[in]  Pointer to RECT.
+
:[in]  Pointer to a rectangle that specifies the portion of the page to be locked.
 
;nFlags
 
;nFlags
:[in]  Value of ULONG.
+
:[in]  Set of [[PXV:IXC_PageBlockLockFlags|flags]] that specify whether the locked portion of the bitmap is available for reading or for writing and whether the caller has already allocated a buffer.
 
;pBlockData
 
;pBlockData
:[in, out]  Pointer to [[PXV:IXC_PageBlockData|IXC_PageBlockData]].
+
:[in, out]  Pointer to the [[PXV:IXC_PageBlockData|IXC_PageBlockData]] structure. If the [[PXV:IXC_PageBlockLockFlags#Constants|PageBlock_UserBuf]] flag of the flags parameter is cleared, then blockData serves only as an output parameter. In that case, the '''pData''' data member of the [[PXV:IXC_PageBlockData|IXC_PageBlockData]] structure receives a pointer to a temporary buffer which is filled with the values of the requested pixels. The other data members of the [[PXV:IXC_PageBlockData|IXC_PageBlockData]] structure receive attributes (width, height, and stride) of the pixel data in the temporary buffer. If the [[PXV:IXC_PageBlockLockFlags#Constants|PageBlock_UserBuf]] flag of the flags parameter is set, then blockData serves as an input parameter (and possibly as an output parameter). In that case, the caller must allocate a buffer for the pixel data that will be read or written. The caller also must create a [[PXV:IXC_PageBlockData|IXC_PageBlockData]] structure, set the '''pData''' data member of that [[PXV:IXC_PageBlockData|IXC_PageBlockData]] structure to the address of the buffer, and set the other data members of the [[PXV:IXC_PageBlockData|IXC_PageBlockData]] structure to specify the attributes (width, height, and stride) of the buffer
  
 
== Return Value ==
 
== Return Value ==
Line 24: Line 24:
  
 
== See Also ==
 
== See Also ==
See also [[PXV:IIXC_Page|IIXC_Page]].
+
:[[PXV:IIXC_Page|IIXC_Page]]
 +
:[[PXV:IIXC_Page_UnlockPageBlock|IIXC_Page::UnlockPageBlock]]
 +
:[[PXV:IXC_PageBlockData|IXC_PageBlockData]]
 +
:[[PXV:IXC_PageBlockLockFlags|IXC_PageBlockLockFlags]]

Revision as of 04:50, 7 May 2015


The method locks a rectangular portion of the page and provides direct access to the page's data. Any pixel data that you write to the buffer is copied to the page when you call IIXC_Page::UnlockPageBlock.

Syntax

HRESULT LockPageBlock([in]       RECT*               pRect,
                      [in]       ULONG               nFlags,
                      [in, out]  IXC_PageBlockData*  pBlockData);

Parameters

pRect
[in] Pointer to a rectangle that specifies the portion of the page to be locked.
nFlags
[in] Set of flags that specify whether the locked portion of the bitmap is available for reading or for writing and whether the caller has already allocated a buffer.
pBlockData
[in, out] Pointer to the IXC_PageBlockData structure. If the PageBlock_UserBuf flag of the flags parameter is cleared, then blockData serves only as an output parameter. In that case, the pData data member of the IXC_PageBlockData structure receives a pointer to a temporary buffer which is filled with the values of the requested pixels. The other data members of the IXC_PageBlockData structure receive attributes (width, height, and stride) of the pixel data in the temporary buffer. If the PageBlock_UserBuf flag of the flags parameter is set, then blockData serves as an input parameter (and possibly as an output parameter). In that case, the caller must allocate a buffer for the pixel data that will be read or written. The caller also must create a IXC_PageBlockData structure, set the pData data member of that IXC_PageBlockData structure to the address of the buffer, and set the other data members of the IXC_PageBlockData structure to specify the attributes (width, height, and stride) of the buffer

Return Value

Returns S_OK if operation was successful or error code in other cases.

See Also

IIXC_Page
IIXC_Page::UnlockPageBlock
IXC_PageBlockData
IXC_PageBlockLockFlags