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.

DarkBASIC Professional Discussion / Putting functions made with DBPro or include files into a DLL file?

Author
Message
Bluespark
15
Years of Service
User Offline
Joined: 18th Mar 2011
Location:
Posted: 17th Aug 2011 01:45
See topic title.
Is this possible? And how would I get started into doing so?

Thanks in advance.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 17th Aug 2011 15:09
No, it's not possible - you need to pick another language to write your DLLs in, such as C++, or PureBASIC

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 17th Aug 2011 18:18
IanM, can DBpro dll itself using purebasic and dark GDK
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 17th Aug 2011 21:10
I' not sure what you are asking, so I'll summarise:
1. Create a plug-in using DBPro - no
2. Create a plug-in using GDK - no
3. Create a plug-in using C++ without GDK - yes
4. Create a plug-in using PureBASIC - yes

If any of those doesn't cover your question, then try asking again in a different way.

Kiaurutis
15
Years of Service
User Offline
Joined: 19th Jan 2011
Location: Lithuania
Posted: 19th Aug 2011 15:04
So if I write my DBPro functions in pureBasic, and then make a dll, I can #include dll into my program, and it will compile faster? This sounds cool 3000 lines ain't much but it will increase, and it already started to annoy me

Join The dark Side! We have cookies
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Aug 2011 15:12
It doesn't work quite like that, but basically, yes - we call them plug-ins.

You create your function that accepts the parameters you require, and returns the result - some returned results are straight-forward (integer), some are not (float, string).

Then you add a resource string that describes your command/function parameters to DBPro, along with how to call it, then you pop the entire DLL into the plugin-users directory, and now you have the equivalent of built-in functions/commands - just using a command from that plug-in will ensure that it is included when you build you EXE.

Bluespark
15
Years of Service
User Offline
Joined: 18th Mar 2011
Location:
Posted: 19th Aug 2011 22:52
Is it possible to write a DLL function that does the equivalent of this?:
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Aug 2011 23:09
Yes. In fact, I'd guess that it's as trivial in PB as it is for me in C++.

Bluespark
15
Years of Service
User Offline
Joined: 18th Mar 2011
Location:
Posted: 19th Aug 2011 23:42
Interesting. If you know about Evolved's Advanced Lighting, I assume that it's possible to convert all that to a DLL file, right? And it would be a lot of work as well right?
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Aug 2011 01:51
Anything you can do in DBPro (except read/modify DBPro variables) can be done in a DLL.

I have no idea what Evolved's code looks like, so I have no idea how much work it would take to convert, but even if there's a lot, it wouldn't think it'd be too difficult - a straight conversion of DBPro->C++ usually isn't.

Login to post a reply

Server time is: 2026-07-10 10:20:45
Your offset time is: 2026-07-10 10:20:45