PureGDK / Resolving Dependencies For A DBPro Plugin (Non PureGDK) |
| Author | Message | ||
|
D Ogre
User Joined: Wed Nov 19th 2003 Location: Cyberspace |
Hi. Sorry to bring this question up here since it doesn't exactly pertain to PureGDK. I figured you or someone would know since it does concern Purebasic and writing a TPC plugins for DBPro. I know how to use the Constructor/Destructor functions for init/de-init stuff to be used in the plugin with DBPro. What I need is an example in Purebasic of how to use the ?GetNumDependencies@@YAHXZ and ?GetDependencyID@@YAPBDH@Z to force the DBPro compiler to include the plugin dependencies. I'm using PB version 4.40 and DBPro version 7.4 just so you know. |
||
| Back to top |
|||
|
Mistrel
PureGDK Moderator ![]() ![]() Joined: Wed Nov 9th 2005 Location: Cyberspace |
|
||
| Back to top |
|||
|
D Ogre
User Joined: Wed Nov 19th 2003 Location: Cyberspace |
IanM posted an example a little while ago about this the C++ way. I just need the method the Purebasic way. Maybe I'm just to ignorant to do the translation. Here is a shortened snippet just dealing with two functions in question in C++: + Code Snippet If I assume correctly, these two functions are used to force a DBPro DLL or other 3rd party DLLs to be added into the executable when using a plugin you created that needs them. This way they can pass data and use functions from them. For example using memblocks like in the above code from inside your plugin. So, I would place these to Procedures as CDLL in my plugin code written in purebasic. If a command from my plugin is used, DBPro will call those two functions when present to get the dependencies upon compliation. Similar setup to the Constructor/Destructor functions usage for init/de-initing stuff. After compiling the plugin code in Purebasic, I will have to change the function names to mangled with either a hex editor or with the PPFixer utility. |
||
| Back to top |
|||
|
Mistrel
PureGDK Moderator ![]() ![]() Joined: Wed Nov 9th 2005 Location: Cyberspace |
I haven't tested it but you would need to do something like this: + Code Snippet No promises on it working without some tweaking. Also, don't forget to edit the DLL to add the the name mangling. |
||
| Back to top |
|||
|
D Ogre
User Joined: Wed Nov 19th 2003 Location: Cyberspace |
Ok, thanks for your help. I was thinking of something along those lines, but wasn't quite sure about it. I will play around with it and see what I can come up with. I may also have to inquire more about these functions and how DBPro sees and uses them. I think Freddix would know more about how to set these functions up for DBPro plugins written in Purebasic, but I don't know if he is around these days. I think he is working on some Amiga projects like AMIDark since he gave up the copyrights to Oddyssey-Creators software like PurePlugin. If I get it working, could I post my findings on your board for people who wish to write a TPC plugin in Purebasic? Possibly a sticky thread. |
||
| Back to top |
|||
|
Google Ad
AdBot Joined: Aug 26th 2002 Location: Everywhere |
|||
| Back to top |
|||
|
Mistrel
PureGDK Moderator ![]() ![]() Joined: Wed Nov 9th 2005 Location: Cyberspace |
|
||
| Back to top |
|||
|
D Ogre
User Joined: Wed Nov 19th 2003 Location: Cyberspace |
Thanks again. I will look it over and try it out this weekend. It would be nice to have some detailed and up to date documentation for the community. Some of the existing stuff is old and a lot of this sort of stuff is just left out. |
||
| Back to top |
|||
|
D Ogre
User Joined: Wed Nov 19th 2003 Location: Cyberspace |
Hi. Sorry to keep bugging you about this. I posted some questions about this in the DBPro Discussion forum along with a rough draft of my example source code in PureBasic. I'm still having trouble with it working. I have to do more testing and debug here. If you have some time away from PureGDK, could you take a look at it? I'm going to update the PPFixer utility to allow fixes to the RecieveCoreDataPtr function for the name mangling. I should be able to upload the source of this utility since it's considered a free contribution in the PurePlugin developement package. I will check on that first before posting though. Forum link: http://forum.thegamecreators.com/?m=forum_view&t=165205&b=1 Thanks again, D Ogre |
||
| Back to top |
|||
|
D Ogre
User Joined: Wed Nov 19th 2003 Location: Cyberspace |
Nevermind. I got it working! The changes were actually very minor in my original code example. I'm going to start working on some material for a sticky thread over the next day or so. I also want to do some further testing before I post anything. That is if you will still let me make a sticky thread. |
||
| Back to top |
|||
|
Mistrel
PureGDK Moderator ![]() ![]() Joined: Wed Nov 9th 2005 Location: Cyberspace |
|
||
| Back to top |
|||
|
D Ogre
User Joined: Wed Nov 19th 2003 Location: Cyberspace |
I don't have a problem with posting it in the DLL Talk board. I didn't want to post something here unless I checked with you first. Thanks again for your help from earlier. |
||
| Back to top |
|||
Sorry, but it has been so long since anyone replied to this Thread that it has been automatically locked.
You may read it but not reply.
You may read it but not reply.
Forum Search
Enter a word or phrase to search our Forum for:
|
|





