Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Dreq934
22
Years of Service
User Offline
Joined: 15th Dec 2003
Location: SC, USA
Posted: 20th Feb 2012 02:17
Heya guys.. I started using DarkBasic back when it was a full-screen app with the neat twisty scroll bars and direct x based interface. I even remember the day when they switched from the original forums to the new forum system. I'm finally to the point where I can afford art for my game and have artists doing work now. Although I know C, C++, assembler, etc; working 50 hours a week doesn't lend itself well to spending large amounts of time writing the logic DBP sets up automagically. What I want to do, though, is extend the non-graphical stuff to DLLs. I'd prefer to use pascal (FPC/Delphi). I know how to write DLLs and export them, but what I'm confused about is how to do the name decorations on the DB side to express the parameters and return types/sizes. Opening up the compiled DLL in a hex or text editor, or even a DLL viewer, doesn't seem to show name mangling either. Is there any docs, or anyone who can tell me how DBP expects name mangling to work?

Dark Basic Professional
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Feb 2012 02:24 Edited at: 20th Feb 2012 02:25
You can use DLLs from DBPro without needing the DLL to be created in a special way by using the "load dll" and "call dll" commands. If on the other hand you want commands to be directly callable using their name, you need to write a plugin.

Plugins require a string table which tells DBPro how to map commands to their equivalent function in the DLL. I'm not sure how to add one from delphi, but it's probably possible. I suggest you search these forums for information about creating plugins as there is a lot of information and most of the questions have been answered before. There is also information in the DBPro help files under "Technical Documents -> Third Party Commands".

[b]
Dreq934
22
Years of Service
User Offline
Joined: 15th Dec 2003
Location: SC, USA
Posted: 20th Feb 2012 03:40
Thanks, the plugin route works well. I decided that I'd just use VC6 (amazingly, I still had the install disk, complete with the jewel case and orange serial number sticker). Already have a few commands working

Dark Basic Professional
Dreq934
22
Years of Service
User Offline
Joined: 15th Dec 2003
Location: SC, USA
Posted: 20th Feb 2012 04:49
I don't feel like double-posting so I'll ask this here too.. Is there any particular reason why, when putting in my purchased darkbasic professional license key (as per the TGC account section of the website), I still intermittently see DBP start up with an ad box at the bottom of the screen?

Dark Basic Professional
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Feb 2012 02:36 Edited at: 21st Feb 2012 02:39
Dreq934

if your on vista/7 run DBpro as administrator input key again and exit and run as admin again

or restart...

theres more on this if you try searching the forums

EDIT

On the topic the Hands on Dark Basic has a nice tut at the end of book two as well if it helps...

Login to post a reply

Server time is: 2026-07-09 17:42:45
Your offset time is: 2026-07-09 17:42:45