Skip to content

CallDLL

Narta Xaymar Dirks edited this page Oct 28, 2026 · 6 revisions

Blitz3DBlitzPlusBlitzBasic

CallDLL

CallDLL:Int32 dll_name:String, func_name:String, in_bank:Int32=0, out_bank:Int32=0
Parameter Mode Type Default Description
dll_name In String required Name of the library, without a path.
func_name In String required Name of the function to call.
in_bank In Int32 0 A bank given to the function as input. Defaults to none.
out_bank In Int32 0 A bank given to the function to fill. Defaults to none.

Returns: The value the function returned, or 0 when the library or function was not found.

Description

Calls a function in a dynamic library and returns what it returns. The function is passed the banks, and a library or function that does not exist makes the call return 0 instead of failing. Which libraries exist depends on the platform, so a program that uses this is only as portable as the library it calls.

Examples

; Windows only: asks the system which process this is
Print CallDLL("kernel32", "GetCurrentProcessId")

Related Commands

AppTitle, CommandLine, DebugLog

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally