function PdfLibraryConfigurationSealed: Boolean;
BooleanPdfLibraryConfigurationSealed 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
if not PdfLibraryConfigurationSealed then
ConfigurePdfLibrary(TPdfLibraryConfiguration.Hardened);