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.

DLL Talk / putting gdk commands into a dll code for a dbpro command... is it possible?

Author
Message
sovr
9
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 18th Dec 2011 20:10
ok I did post this question on the gdk thread and they didn't really know what I was saying. So does anyone know if you could use gdk as a tool to make dbpro commands easier to do:

an example:

I do my usual code for a dll file and create one function... is it possible to include darkGDK.h and put the gdk commands into my dll function? so I could make a command for dbpro that could build an array of objects for me (using dbMakeObject()) with just with one command! Is that possible? thanks in advance!

if any questions on what I am saying please post

sov the game creator!
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Dec 2011 20:44 Edited at: 18th Dec 2011 20:50
Good and interesting question... and I was wondering this too... I totally understand your question but you might not be portraying it clearly enough... probably why the other thread got confused... might also have something to do with the thread subject area...

Basically you are saying... you want to use a function which is not available in DBPro but can be made in DGDK as it incorporates I pressume C++ code and you want to know if you somehow (I say somehow because this is a battlefog area for me) export it into a DLL and use a DLL callback function inside DBPro to make use of that function

EDIT
PLACING MY EDIT INFO HERE AS THE EDITOR IS SOOO DIFFICULT TO USE ON WEBKIT
ADDED A LINE AT THE TOP REGARDING THREAD TOPIC AND CORRECTED A TYPO IN CLEARLY
ENDEDIT

hope I hit the nail on the head there

As you can see I too genuinely seek an answer to this question too

I hope someone can answer it soon... btw as I am on a mobile device... did you try a forum search for this yet?

Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 18th Dec 2011 22:06
If I get your question right (in which case MrValentine didn't ) you want access to the DBP core functions when writing a plugin - as you would from DGDK?
If so, look up DarkSDK (which I think DGDK is really just a wrapper for) which does exactly that.
The limitations are that you can only use functions declared in dll's that you know is included with the compiled program that uses your library. Also you must get the pointer to the globstruct yourself from withing your plugin (there most likely are snippets for how to go about that floating around).


"Why do programmers get Halloween and Christmas mixed up?"
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Dec 2011 22:10
Whats DSDK?

Also thinking about it that way... why not just a function running on intervals?

sovr
9
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 18th Dec 2011 22:20
Ok mrValentine did get the question well, I do not want to edit the core functions of the gdk. I want to use gdk to make dbpro commands. If you follow the dbpro 3rd party command tutorial (in dbpro help folder) and use gdk with the tutorial. I will try it out myself and post the code.

sov the game creator!
Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 18th Dec 2011 22:35
@MrValentine: maybe it's old by now, was a few years ago.
Anyway, if you open the main DGDK include file (DarkGDK.h) you'll see that all it really does is include another header, namely DarkSDK.h


"Why do programmers get Halloween and Christmas mixed up?"
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Dec 2011 22:56
Cheers Rudolpho

WLGfx
11
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 22nd Dec 2011 11:16 Edited at: 22nd Dec 2011 11:16
You do not need Dark GDK to write plugins for Dark Basic Pro. There's a brilliant pdf and some code to download on the DLL forums by IanM to get you started. Basically it sets you up with all the internal DBPro commands without GDK and a few more.

EDIT: The only thing you might need from the Dark GDK is the Globstruct include and the DBOFile includes and that is just it.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
IanM
Retired Moderator
17
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Dec 2011 12:12
It really depends on what you want to do in your DLL - there are a lot more restrictions on what is accessible and what is allowed via your own plug-ins compared to what is accessible via the GDK.

The PDF I've produced covers getting the globstruct the easy way, but doesn't yet cover what you can do with it, or anything about accessing other plug-ins - something that will be in the next update. However, if you search around, you can find posts where accessing functions from other DLLs has been covered.

Matty H
11
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 13th Jan 2012 20:45
Every GDK command has a DBPro equivalent, so your dbMakeObject() command is imported from the DBPro Basic3D dll and then you can do what you say you want to do.

When I import commands from a DBPro dll I use the GDK function names and so dbMakeObject() works exactly the same as it would in GDK. You can then easily make your DBPro plugin compile to make a library to use with GDK by just changing a few things. I'm sure this is common when people write plugins for DBPro and GDK together.

Login to post a reply

Server time is: 2019-10-18 22:51:07
Your offset time is: 2019-10-18 22:51:07