dll creation & loading

Blitz3D Forums/Blitz3D Programming/dll creation & loading

Q80(Posted 2003) [#1]
Hi all;

There was a tutorial on dll creating and loading somewhere. can someone please tell where i can find a tutorial on dll for blitz.

thank in advance


darklordz(Posted 2003) [#2]
Depends in what language you want to create a dll....


Q80(Posted 2003) [#3]
visual c++, there was a tutorial a while back but i don't remember where, maybe someone can tell me?

thanks in advance


DrakeX(Posted 2003) [#4]
if you're looking on how to use the CallDll function i don't advise it, it's kind of kludgy.

if you want to use real DLLs (userlibs) click on the "specs and utils" link at the top and check out the userlib specifications. they're really simple :)


darklordz(Posted 2003) [#5]
How to create a userlib.
I personaly use PureBasic to create windows dll's.

a sample PB dll function
Global Return.l

ProcedureDll.l Test(Title.s,Message.s)
	Return.l = MessageRequester(Title.s,Message.s)
	ProcedureRetrun(Return.l)
EndProcedure
Then I compile the Dll and put it into the Blitz Userlibs Dir. I create a <anyfilename>.decls file. Edit it with notepad and put the following innit.
.lib "dllname.dll"

Test%(Title$,Message$)
I Save the decls file and restart Blitz. Not create a new bb file in blitz and type
X = Test("Hello","World")
Print X
WaitKey
End



Q80(Posted 2003) [#6]
thanks alot guys for the help