|
Post by dw817 on Apr 17, 2009 10:17:31 GMT -5
I hope this hasn't been addressed yet. How do you write a DLL for B4GL. Can I write something in GFABasic or Rapid-Q that is a DLL for B4GL ?
|
|
|
Post by matthew on Apr 17, 2009 13:32:03 GMT -5
I created a guide for making a simple dll in Code::Blocks here. I doubt if you could use GFABasic but I know that you can use FreeBASIC.
|
|
|
Post by dw817 on Apr 17, 2009 13:58:48 GMT -5
Hi Matthew:
* THANKS for the info ! I am investigating both links now ..
I just recently found out that B4GL now handles functions and subs with local var ability !
This is the leading feature that's been keeping me in GFABasic. If I can find DLLs to play MIDs at any position and/or save BMPs/PNGs inside B4GL coding, or write my own DLLs to do so, I may well drop GFABasic completely (which was designed for Windows 3.1 and really has been holding me back all these years)
Are there any examples (w/source) written in FreeBasic showing how to interact and engage DLLs with B4GL ?
|
|
|
Post by matthew on Apr 17, 2009 14:11:16 GMT -5
Here are some other links you might find useful, there is a thread here where djlinux shows you how to use FreeBASIC to design Basic4GL plugins & there is another thread here where the FreeSound plugin is discussed. If you're interested in using a plugin to save images then check out the ToolBox plugin.
|
|
|
Post by dw817 on Apr 17, 2009 15:51:53 GMT -5
Hi Matthew: * Ack ! That's a lotta work. How about something simpler or similar like this ? #saveasdll "newstrings" function string$(n,c$) dim i,t$ for i=1 to n t$=t$+c$ next return t$ endfunction - - - #plugin "newstrings.dll" print string$(5,"*") outputs ***** no fuss, no muss, and the ability to write the DLL in B4GL if you so choose.
|
|
|
Post by matthew on Apr 17, 2009 16:00:05 GMT -5
I would have thought that if it had been possible to write dlls in Basic4GL then djlinux would have have found a way to do it by now. Currently I think the only way is to use C++ or FreeBASIC.
|
|
|
Post by dw817 on Apr 17, 2009 18:22:16 GMT -5
Sometimes people go about the difficult way to do things. I startled one programmer who commented on it by resetting the index for a FOR/NEXT variable as a way to infinitely loop or to exit a FOR/NEXT loop prematurely. Quite simple really, but everyone always has new ideas about how to make things easier. - - - for i=0 to 1 print"*" i=0 next
So hopefully someone has an idea on how to write DLLs directly from B4GL; would be helpful.
Oh, and regarding the custom DLLs already written, really nice ! Now, if someone only had a tutorial or instructs on the drawing2dplugin.dll, I can start work on my project today, or wind up using nasty 1x1 pixel font to emulate plotting pixels like I did years ago in earlier B4GL.
Looking over ThinBasic. Phew ! Whatta mess. Definitely a C++ wannabe.
|
|
|
Post by UNDISCLOSED on Apr 19, 2009 4:54:39 GMT -5
Here is the documantation for the 2D drawing plugin right here.
|
|
|
Post by dw817 on Apr 19, 2009 8:48:38 GMT -5
Hi Woflman:
* Thanks.. Having used it for a bit, I think I'm going to stick with using glvertex2f(x,y). The 2d library clears the entire screen if you plot a sprite, using the glvertex2f doesn't.
|
|