Skip to content

Using PawnIO Modules

namazso edited this page May 25, 2025 · 4 revisions

1. Find if and where PawnIO is installed

Read the InstallLocation value from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PawnIO. This will provide you with the path where PawnIO is installed. As a fallback, %ProgramFiles%\PawnIO can be used, as the installer does not allow changing the install path.

2. Load PawnIOLib

Dynamically load PawnIOLib using LoadLibrary or your language's equivalent:

lib = LoadLibrary(InstallLocation + "PawnIOLib");

3. Resolve functions

Using GetProcAddress or your language's equivalent, you can resolve the functions exposed by the library:

pawnio_open = GetProcAddress(lib, "pawnio_open");

For available functions and their documentation, please refer to `PawnIOLib.h" from the installation.

4. Obtain a module blob

Head over to Releases and grab the latest one. Select the module binary you wish to use, and include its contents in your software.

5. Load a blob

Open a new PawnIO handle, and load a new module blob:

HANDLE handle;
pawnio_open(&handle);
pawnio_load(handle, blob, blob_size);

6. Call an ioctl from the module

Now that a module is loaded into this PawnIO handle, you can call an ioctl from the module:

SIZE_T ret_size;
pawnio_execute(handle, "ioctl_hello", NULL, 0, NULL, 0, &ret_size);

7. Done

Congratulations on integrating PawnIO! Please keep in mind that the example snippets here are pseudocode and lack error handling. Production use should include error handling and provide a more convenient wrapper both for PawnIO interfaces and interfaces of the modules.

Licensing considerations

PawnIO comes with a variety of licenses for the available versions, even though the code is identical:

  • Official and unrestricted binary editions: Proprietary, however redistribution of installer is allowed.
  • Open source edition (source code only): GPL 2 with exception (PawnIO), LGPL 2.1 (PawnIOLib)
  • Custom licensing

It is recommended that users are simply redirected to pawnio.eu for obtaining a copy . This allows any software from proprietary to GPL to implement PawnIO while end-users can opt to locally combine that software with the official PawnIO builds, as the builds are interface-compatible.