Quote:
Originally Posted by uchimata
I create my game as a DLL. Moreover, the host application does not copy any files to any System directory. So I would like to distribute my game as a DLL and I have to place the Squall.DLL next to it. When my game starts up, the working directory is set to the host application dir, and not to my game's (dll) dir. So, sqall.dll is not found.
With dynamic binding I could set the directory where the DLL should be loaded from.
|
I wanted to load the DLL after extracting it from an ASDb (like the BASS.DLL is done in the "Hasteroids" example), so I had a go at converting the squall.pas file using the one you supplied as a template of sorts. After a few snags and many key punches, it's done now if you or anyone else is still interested.
Basically, I added a LoadDll(dllname): THandle; function to squall.pas, so you'll want to call it from SquallSound.pas or your main form (you'll have to include squall.pas in that case) before anything else.
And you'll want to call FreeLibrary(Handle) after you call SQUALL_Free().
That's about it.