How to use a DLL with WinBasicGL Download(ImportDLL_example.zip)
In the previous tutorial we have showed how to make a DLL for WinBasicGL using the C language, now we will show
how to import and use the new function.
First of all we must write a definition file to declare the new functions list, file syntax structure is :
[return type] "function name 1" [Number of parameters] [parameter(1) type] [parameter(2) type] ... [parameter(N) type]
[return type] "function name 2" [Number of parameters] [parameter(1) type] [parameter(2) type] ... [parameter(N) type]
[return type] "function name 3" [Number of parameters] [parameter(1) type] [parameter(2) type] ... [parameter(N) type]
....
END
accepted types are :
VOID (to use if the command do not return values)
INTEGER
FLOAT
STRING
(!) for each function the max number of supported parameters are 16
Now insert at the top of declaration section the ImportDLL istruction and use
the new commands into the program.
The above example show how to use "Obj3D.dll".
|