Skip to content

cPLI External Program Interface Component ​

Introduction ​

cPLI (Programmable Language Interface) is an external program call interface component used to call external executables (such as Python, Node.js scripts) from VB6 applications and exchange data through standard input/output.

How It Works ​

┌─────────────────┐      ┌─────────────────┐      ┌─────────────────┐
│   VB6 App       │ ──▶ │  cPLI Component │ ──▶ │  External (PLI) │
│                 │      │                 │      │                 │
│  PLI.Request()  │      │  Base64 encode  │      │  VBMAN.PLI     │
│                 │      │  Execute cmd    │      │  (Python/Exe)  │
│  Get result     │ ◀──  │  Return result  │ ◀──  │  Process data   │
└─────────────────┘      └─────────────────┘      └─────────────────┘

File Description ​

FileDescription
VBMAN.PLIExternal executable (main program)
VBMAN.PSCScript/config file
VBMAN.DATData exchange file (for large return values)

Features ​

  • Parameter Passing: Uses Base64 + UTF-8 encoding to pass parameters
  • Timeout Control: Can set command execution timeout
  • Large Return Values: Supports returning large data via file
  • Auto Search: Auto searches multiple paths for PLI program

Quick Start ​

Basic Call ​

vb
Dim PLI As New cPLI
Dim result As String

' Call external program
result = PLI.Request("param1", "param2", "param3")

Debug.Print "Return result: " & result

Set Timeout ​

vb
Dim PLI As New cPLI

' Set 60 second timeout (default 30 seconds)
PLI.TimeOut = 60 * 1000

Dim result As String
result = PLI.Request("data")

Process JSON Data ​

vb
Dim PLI As New cPLI

' Send JSON data
Dim json As String
json = "{\"name\":\"John\",\"age\":25}"

Dim result As String
result = PLI.Request(json)

' Parse returned JSON
Dim response As New cJson
response.Decode result
Debug.Print response.GetItem("status")

File Path Search Order ​

Component searches for VBMAN.PLI in the following order:

  1. App.Path\VBMAN.PLI
  2. App.Path\bin\VBMAN.PLI
  3. App.Path\..\bin\VBMAN.PLI

If not found, throws 404 error.

Typical Use Cases ​

ScenarioDescription
Python ScriptsCall Python for data processing, AI inference
Node.js ProgramsCall JavaScript tools
Command Line ToolsCall system command line programs
Data ProcessingComplex calculations, format conversion, etc.

Last Updated: 2026-05-17

VB6 and LOGO copyright of Microsoft Corporation