gamemaker dll 使用说明(使用说明 GameMaker DLL)
Advanced article: powerful external library call 一DLL use
let you easily achie-terminated). (however, for functions larger than 4 parameters, in the current GM, only parameter types are values, ty real is supported by GM). The parameter must be returned to a value or to a null terminated character.
Two. How to call
Step 1: pay attention to saving the DLL file to your working directory
If you decide to call the DLL function, it is recommended that you put the DLL file in the directory where you save the game file, or import the data (data) file directly into the GM and select output to the working directory. If your DLL file also includes other files, such as icons, you'd better save it in the same directory under DLL, otherwise you might not call any other resource files.
The second step: the call in GM
To use the DLL function in GM, you first need to specify a special GM function to define the external function to call,
External_define (DLL, name, calltype, restype, argnumb, arg 1 type, arg2type,
Among them:
DLL is the file name of the DLL file, name is the name of the function function, and calltype uses the call protocol (), in two ways, dll cdel or dll stdcall. Restype is the result type,
It can also be divided into two types, tyreal or tystring. Argnumb is the number of arguments (between 0~12). Next, for each parameter, y
gamemakerdll使用说明使用说明GameMakerDLL 来自淘豆网www.taodocs.com转载请标明出处.