TPLIntPtr

Data types

Description

TPLIntPtr is the signed integer the library uses to carry a native handle or a pointer address. It is declared in the unit PDFlibTypes and resolves to NativeInt on targets other than Windows, to IntPtr in a Win64 build and to Integer in a Win32 build.

The PauseGate parameter of SetRenderJobControl takes the handle of a manual-reset event that the renderer waits on between content-stream operators while a background render job is paused; 0 stands for synchronous rendering without a gate.

The KeyHandle parameter of OpenCNGKeyHandle on TPDFlibPFXFile and of SetSignProcessCNGKeyByHandle takes an open CNG key handle that belongs to the caller.

Syntax

{$IFNDEF OS_WINDOWS}
  TPLIntPtr= NativeInt;
{$ELSE}
{$IFDEF WIN64}
  TPLIntPtr= IntPtr;
{$ELSE}
  TPLIntPtr= Integer;
{$ENDIF}
{$ENDIF}

Remarks

SetRenderJobControl stores the gate for the following rendering calls; the caller keeps ownership of the event. A background render job passes the handle of its own pause event on Windows and the address of the event object on other targets. The renderer waits on the gate while it is not signalled and re-checks the cancel flag after every wake-up.

OpenCNGKeyHandle rejects a KeyHandle of 0 with srBadFormat and never closes the handle: the signer closes only the provider and key handles that it opened itself in OpenCNGKey. It also checks that the algorithm group of the key, RSA or ECDSA, matches the certificate.

SetSignProcessCNGKeyByHandle rejects a zero handle the same way and returns 0.

TPLUIntPtr is the unsigned counterpart declared next to TPLIntPtr. The Crypto API bindings of the library store CERT_CONTEXT addresses in a TPLIntPtr through PLCertContextHandle and read them back with PLCertContextFromHandle.

See also

SetRenderJobControl, TPDFlibPFXFile, SetSignProcessCNGKeyByHandle, StartRenderPageJob, TPLByteArray