PDFium Delphi Component Docs

PdfLibraryConfigurationSealed function

Unit: PDFium
Reports whether the process-wide native configuration can still be changed

Syntax

function PdfLibraryConfigurationSealed: Boolean;

Parameters

None

Return Value

Boolean

Description

PdfLibraryConfigurationSealed returns True once a LoadLibrary call has begun, which fixes the native configuration for the process

Whilst it returns False, ConfigurePdfLibrary can still replace the stored settings; after it returns True, ConfigurePdfLibrary raises EPdfError

The flag is set at the start of the first native load and is not cleared by UnloadLibrary, so the first load permanently selects the initialisation settings

The check runs under the same critical section as LoadLibrary and ConfigurePdfLibrary, so the answer is race-free

Remarks

Example

if not PdfLibraryConfigurationSealed then
  ConfigurePdfLibrary(TPdfLibraryConfiguration.Hardened);

See Also

ConfigurePdfLibrary, GetPdfLibraryConfiguration, TPdf.LoadLibrary