Skip to content

DLL Export Reference

The VBA Padlock runtime DLL exports a set of stdcall functions that can be called directly from any language that supports Windows DLL calls. This page documents every exported function with its native signature.

VBA Padlock produces two runtime DLLs per project, one for each Office architecture. The DLL names are derived from your project name using the pattern {ProjectName}run32.dll and {ProjectName}run64.dll:

FileArchitectureUsage
[YourProject]run32.dll32-bit (x86)Used with 32-bit Office
[YourProject]run64.dll64-bit (x64)Used with 64-bit Office

For example, if your project is named MyApp, the runtime DLLs are MyApprun32.dll and MyApprun64.dll.

Both DLLs export the same functions with the same stdcall calling convention.


Before calling any other function, the DLL must be initialized by executing a compiled function (which triggers internal setup). The VBA Bridge handles this automatically via VBAPL_Execute.


Displays the EULA dialog.

function VBAPLShowEULA(ForceDisplay: Integer): Integer; stdcall;
ParameterTypeDescription
ForceDisplayInteger1 = force display even if already accepted. 0 = normal behavior.
ReturnMeaning
1Accepted
0Declined or cancelled
-1Error showing dialog
-2EULA not configured

Checks if the EULA has been accepted.

function VBAPLIsEulaAccepted: Integer; stdcall;
ReturnMeaning
1Accepted
0Not accepted
-1Not configured

Returns the EULA acceptance date as an ISO string.

function VBAPLGetEulaAcceptanceDate(out OutDate: WideString): Integer; stdcall;
ParameterTypeDirectionDescription
OutDateWideStringOutReceives the date in YYYY-MM-DD HH:NN:SS format.
ReturnMeaning
0Success
-1Not configured or not accepted

Checks if the current license is valid.

function VBAPLIsLicenseValid: Integer; stdcall;
ReturnMeaning
1Valid (or activation not required)
0Invalid
-1Not initialized

Returns the project-specific Hardware ID for this machine.

function VBAPLGetHardwareID(out OutHardwareID: WideString): Integer; stdcall;
ParameterTypeDirectionDescription
OutHardwareIDWideStringOutReceives the Hardware ID string.
ReturnMeaning
0Success
-1Not initialized
-2Error generating Hardware ID

Shows the activation dialog.

function VBAPLShowActivation(ForceDisplay: Integer): Integer; stdcall;
ParameterTypeDescription
ForceDisplayInteger1 = force display, 0 = normal.
ReturnMeaning
1Activation successful
0Cancelled or failed
-1Not initialized
-2Activation not configured

Deactivates the license programmatically (no GUI).

function VBAPLDeactivate(out OutCertificate: WideString): Integer; stdcall;
ParameterTypeDirectionDescription
OutCertificateWideStringOutReceives the deactivation certificate string.
ReturnMeaning
0Success
-1Not initialized
-2No license stored
-3Already deactivated
-4Deactivation not allowed
-5Internal error

Returns the deactivation status.

function VBAPLGetDeactivationInfo: Integer; stdcall;
ReturnMeaning
0Allowed (license active)
1Allowed (no license stored)
2Not allowed
3Already deactivated
-1Not initialized

Shows a deactivation dialog with certificate display.

function VBAPLDeactivateGUI: Integer; stdcall;
ReturnMeaning
0Success
1Cancelled by user
-1Not initialized
-2No license stored
-3Already deactivated
-4Not allowed
-5Internal error

Checks if running in trial mode.

function VBAPLIsTrialMode: Integer; stdcall;
ReturnMeaning
1Trial mode
0Not trial mode
-1Not initialized

Returns the remaining trial limit.

function VBAPLGetTrialLimitLeft: Integer; stdcall;
ReturnMeaning
>= 0Remaining limit (days, runs, or days until expiration)
-1Not initialized
-2Not in trial mode

Checks if a license key is stored.

function VBAPLHasStoredLicense: Integer; stdcall;
ReturnMeaning
1License stored
0No license
-1Not initialized

Returns the registered user name.

function VBAPLGetRegisteredName(out OutName: WideString): Integer; stdcall;
ParameterTypeDirectionDescription
OutNameWideStringOutReceives the registered name.
ReturnMeaning
0Success
-1Not initialized
-2No license stored

Shows the trial nag screen.

function VBAPLShowTrialNag(ForceDisplay: Integer): Integer; stdcall;
ParameterTypeDescription
ForceDisplayInteger1 = force display, 0 = normal.
ReturnMeaning
0Continue trial
1Activate
2Purchase (URL opened)
-1Not initialized
-2Not in trial mode
-3Silent mode enabled

Returns a project property value.

function VBAPLGetProperty(const PropName: OleVariant; const DefValue: OleVariant): OleVariant; stdcall;
ParameterTypeDescription
PropNameOleVariantProperty name (case-insensitive): AppTitle, AppVersion, AppCompany, AppCopyright, AppDescription, RegisteredName, LicenseKey.
DefValueOleVariantDefault value returned if the property is not found.

Returns: The property value, or DefValue if not found.


Verifies the Authenticode signature of the runtime DLL.

function VBAPLVerifyDLLSignature: Integer; stdcall;
ReturnMeaning
0Valid (signed by G.D.G. Software)
1Not signed
2Invalid or corrupted signature
3Wrong publisher
4Certificate expired
5System error

Performs an online license validation against the activation server.

function VBAPLValidateOnline(Silent: Integer = 1): Integer; stdcall;
ParameterTypeDefaultDescription
SilentInteger10 = show error dialogs, 1 = silent mode.
ReturnMeaning
1Validation successful
0Failed or license revoked
-1Not initialized
-2Online validation not configured
-3No license stored
-4Network error
-5Server error
-6Security validation failed

Checks if an online validation is due (based on the configured interval).

function VBAPLIsValidationRequired: Integer; stdcall;
ReturnMeaning
1Validation required now
0Not required yet
-1Not initialized
-2Online validation not configured

Loads localization strings from a JSON string. This overrides the built-in English strings used in activation dialogs, trial nag screens, and other UI elements.

function VBAPLLoadLocale(const JSONContent: WideString): Integer; stdcall;
ParameterTypeDescription
JSONContentWideStringA JSON object containing key-value pairs for localized strings.
ReturnMeaning
1Success
0Failed (invalid JSON)
-1Empty content

Returns information about the currently loaded locale.

function VBAPLGetLocaleInfo(out OutLocale: WideString): Integer; stdcall;
ParameterTypeDirectionDescription
OutLocaleWideStringOutReceives locale information.
ReturnMeaning
1Custom locale loaded
0Using default locale

#FunctionCategory
1VBAPLShowEULAEULA
2VBAPLIsEulaAcceptedEULA
3VBAPLGetEulaAcceptanceDateEULA
4VBAPLIsLicenseValidLicense Status
5VBAPLGetHardwareIDLicense Status
6VBAPLShowActivationLicense Status
7VBAPLDeactivateDeactivation
8VBAPLGetDeactivationInfoDeactivation
9VBAPLDeactivateGUIDeactivation
10VBAPLIsTrialModeTrial
11VBAPLGetTrialLimitLeftTrial
12VBAPLHasStoredLicenseLicense Info
13VBAPLGetRegisteredNameLicense Info
14VBAPLShowTrialNagTrial
15VBAPLGetPropertyProperties
16VBAPLVerifyDLLSignatureSecurity
17VBAPLValidateOnlineOnline Validation
18VBAPLIsValidationRequiredOnline Validation
19VBAPLLoadLocaleLocalization
20VBAPLGetLocaleInfoLocalization