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.


Initializes the runtime and binds it to the host application. The VBA Bridge calls this automatically on first use; call it yourself only when driving the DLL from another language.

function VBAPLInit(const ApplicationCallerRef: OleVariant; SecurityCode: Cardinal): Integer; stdcall;
ParameterTypeDescription
ApplicationCallerRefOleVariantThe host Application COM object (Excel, Word, PowerPoint, or Access).
SecurityCodeCardinalThe project’s Security Code (whole number between 1 and 2147483647, from Project Info).

Returns: a positive value on success; 0 or negative on failure (wrong Security Code, missing satellite DLL, …).


ExecuteVBAFunction0 … ExecuteVBAFunction4

Section titled “ExecuteVBAFunction0 … ExecuteVBAFunction4”

Execute a compiled function with 0 to 4 arguments.

function ExecuteVBAFunction0(const ID: OleVariant): OleVariant; stdcall;
function ExecuteVBAFunction1(const ID, Param1: OleVariant): OleVariant; stdcall;
function ExecuteVBAFunction2(const ID, Param1, Param2: OleVariant): OleVariant; stdcall;
function ExecuteVBAFunction3(const ID, Param1, Param2, Param3: OleVariant): OleVariant; stdcall;
function ExecuteVBAFunction4(const ID, Param1, Param2, Param3, Param4: OleVariant): OleVariant; stdcall;
ParameterTypeDescription
IDOleVariantFunction identifier: "ModuleName|FunctionName" or just "FunctionName" (searched in the default Main script).
Param1..4OleVariantArguments passed through to the compiled routine.

Returns: The value returned by the compiled function. On licensing/security failure the runtime returns the string codes NOT_LICENSED or SECURITY_BLOCKED.


Executes a compiled function with any number of arguments, packed as a SAFEARRAY of Variants.

function ExecuteVBAFunctionN(const ID: OleVariant; const Args: OleVariant): OleVariant; stdcall;

The VBA Bridge’s VBAPL_Execute routes calls with 0-4 arguments to the dedicated exports above and everything else here, transparently.


Evaluation entry point optimized for worksheet-formula (UDF) calls with a single parameter. Like the execution family, it enforces EULA acceptance and license state before running.

function VBAPLEvalFormD(const ID, Param: OleVariant): OleVariant; stdcall;

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

28 exports in total:

#FunctionCategory
1VBAPLInitInitialization
2ExecuteVBAFunction0Execution
3ExecuteVBAFunction1Execution
4ExecuteVBAFunction2Execution
5ExecuteVBAFunction3Execution
6ExecuteVBAFunction4Execution
7ExecuteVBAFunctionNExecution
8VBAPLEvalFormDExecution (UDF path)
9VBAPLShowEULAEULA
10VBAPLIsEulaAcceptedEULA
11VBAPLGetEulaAcceptanceDateEULA
12VBAPLIsLicenseValidLicense Status
13VBAPLGetHardwareIDLicense Status
14VBAPLShowActivationLicense Status
15VBAPLDeactivateDeactivation
16VBAPLGetDeactivationInfoDeactivation
17VBAPLDeactivateGUIDeactivation
18VBAPLIsTrialModeTrial
19VBAPLGetTrialLimitLeftTrial
20VBAPLHasStoredLicenseLicense Info
21VBAPLGetRegisteredNameLicense Info
22VBAPLShowTrialNagTrial
23VBAPLGetPropertyProperties
24VBAPLVerifyDLLSignatureSecurity
25VBAPLValidateOnlineOnline Validation
26VBAPLIsValidationRequiredOnline Validation
27VBAPLLoadLocaleLocalization
28VBAPLGetLocaleInfoLocalization