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 / Has anyone created a dll using PureBASIC and PurePlugin - and used it with DBPro?

Author
Message
BillR
21
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 20th May 2007 09:14
I scanned the posts, saying it could be done,
but I was wondering if anyone has had success
creating a dll that way, and used it in DBPro?

I just ordered both, wanting to make a dll myself.
If anyone wanted to share even a very simple source code
using PureBASIC that makes a simple dll, that might just return an integer value, I would really appreciate it.
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 23rd May 2007 10:53 Edited at: 23rd May 2007 10:55
Hi,

Actually, no PurePLUGIN user's project are available for public.
PurePLUGIN is a really recent product ... You must wait a bit to see some projects emerge from the dark

If you take a look at the sample, there is one that return integer values.
But to be more clear.

In your DLL, you must create a command such this one:

This ProcedureCDLL return an integer. It's defined in 2 places:
- ProcedureCDLL.L
- ProcedureReturn VA (with VA.l defined before)

In the .RC file, simply add this line in one of the string table available :
XX, "My Return Integer%L%MyReturnInteger%"
Replace the XX with a number that is not used by any other commands.

Compile your DLL containing this ProcedureCDLL with the .RC file added in the PureBASIC Compiler Options

Use the PPFixer tool or XVI to modify the Constructor procedure.

Copy your fresh new DLL in the CompilerPlugins-user directory from DarkBASIC Professional install.
Also copy the PurePLUGIN.DLL in the CompilerPlugins-user directory.

Start your DarkBASIC Professional's favourite IDE.
Enter this :

Null = PP Initialized()
MyValue = My Return Integer()
Print MyValue
Wait Key

It should display 5.

Regards,
Fred

Gandalf said: "All we have to decide is what to do with the time that is given to us"
Odyssey-Creators - X-Quad Editor - 3DMapEditor
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 23rd May 2007 13:38
purebasic output a standard C library, fully compatible with DBP.
So as Fred says, just adding a string table manually will do the trick; there's actually a newletter from a while ago that documented exactly how to do this when it was popular.

BillR
21
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 24th May 2007 11:12
Thanks very much, can't wait to try it out.
Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 24th May 2007 11:51
@BillR: I've just seen your e-mail here and, regarding to that, I've sent an e-mail to you about your PurePLUGIN Purchase...

Gandalf said: "All we have to decide is what to do with the time that is given to us"
Odyssey-Creators - X-Quad Editor - 3DMapEditor

Login to post a reply

Server time is: 2024-11-22 21:10:31
Your offset time is: 2024-11-22 21:10:31