dll creation & loading

Blitz3D Forums/Blitz3D Programming/dll creation & loading

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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