A Windows-only console/terminal demo of calling a function inside a DLL from Python with ctypes. The script loads bin/R8_lib.dll, calls R8_GetLicenseType() and prints the result. ctypes is part of the Python standard library, so a DLL can be called directly without writing any C wrapper code. The bundled DLLs are win64 binaries, and opencv_world420.dll ships alongside because the R8 library depends on it.

 

[Folder Structure]

  • CLAUDE.md / AGENT.md: program specification (identical content).
  • CHANGELOG.md: change log.
  • copyright.txt: copyright notice.
  • bin/R8_lib.dll: the DLL the demo calls, plus opencv_world420.dll, which it depends on.
  • src/: the demo, the launcher scripts and this document.
  • venv/: Python virtual environment, created by step 1.

[Prerequisites]

  • Operating system: Windows 11. The bundled DLLs are win64 binaries, so this demo is Windows-only.
  • Python 3 and pip.
  • No third-party packages are needed: ctypes is part of the standard library.
  • No GPU required.

[Instructions]

Step 1: create the virtual environment

Create the venv. There are no requirements to install, because the demo uses the standard library only.

 

Windows 11: src\01_venv_create.bat

Ubuntu 24.04: bash src/01_venv_create.sh

 

Step 2: activate the virtual environment

Activate the venv you just created. On Linux, source it so the environment variables apply to the current shell.

 

Windows 11: src\02_venv_activate.bat

Ubuntu 24.04: source src/02_venv_activate.sh

 

Step 3: call the DLL

Load bin/R8_lib.dll, call R8_GetLicenseType() and print what it returns.

 

Windows 11: src\03_dll_demo.bat

Ubuntu 24.04: bash src/03_dll_demo.sh

 

Step 4: clear the virtual environment (optional)

Delete the venv/ folder to free disk space when you no longer need it.

 

Windows 11: src\99_venv_clear.bat

Ubuntu 24.04: bash src/99_venv_clear.sh

 

[Usage Notes]

  • This demo only works on Windows, because the bundled DLLs are win64 binaries. On Linux or macOS the script exits with a clear message rather than failing obscurely.
  • opencv_world420.dll must stay next to R8_lib.dll: it is the dependency the R8 library loads at run time.

 

This SDK is built in AppForAI - AI Dev Tools.

 

Purchase license separately:  USD 600, permanent authorization, single APP authorization, single machine authorization, one-year activation, one-year download, one-year update, one-year email technical support.