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 / Can you make a .dll out of an .exe ?

Author
Message
Eevil Weevil
16
Years of Service
User Offline
Joined: 1st Aug 2007
Location: Wherever you are, I wil follow
Posted: 14th Oct 2007 15:41
I've always (well, since I got DBPRo) wanted to make a dll. It'd increase flexibility in a game, right? Anything to up the frame rate. Now I know I'm probably posting something that'll get flamed loads, but don't, cause I got asthma . But is it possible? I don't program C++, or Visual basic, or C# (although I do have them on the computer [excluding C#]) - DBPro is my forte (probably spelt wrong ) and I.. well, constructive critism please, no spam, etc.

Your signature has been erased by a forum-hacke - I mean, a mod.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Oct 2007 21:20
No, it's not possible right now, and probably won't ever be possible.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Eevil Weevil
16
Years of Service
User Offline
Joined: 1st Aug 2007
Location: Wherever you are, I wil follow
Posted: 15th Oct 2007 22:08
Oh, Ok.
Although theoretically, if someone made a program to convert an .exe/.dbpro/.dba file to C++ code (This is hypothetical) and then made the C++ compiler to compile the code, the made a .dll out of it, then... *pant* Then you'd have the dll

Your signature has been erased by a forum hacke - I mean, a mod

calcyman
16
Years of Service
User Offline
Joined: 31st Aug 2007
Location: The Uncertainty Principle
Posted: 19th Oct 2007 23:18
How to convert an EXE into a DLL:
This is called emulating, and it is not very nice. For starters, there are only 2 languages which can be easily translated both ways.

The first is machine code, which your processor reads (although this can be either 6502 or Z80 machine code)

The second is assembly language, which consists of commands like INC, DEC and LDA.

Those commands can be replaced by commands in C++, but not very efficiently. And when it is compiled, it would become even more inefficient, and can be likened to turning motion into sound, to then turn it into something like light. Not very efficient.

How to turn .DBA code into C++ code

This means hardwiring each and every one of the DBPro functions into C++ code. Once you've done that, you can simply alter the syntax, but keep the semantics the same. Slightly longer, but much more efficient.

Although, to be honest, I don't see a reason for making a DLL with DBPro.

I can't be bothered to invent a signature
Eevil Weevil
16
Years of Service
User Offline
Joined: 1st Aug 2007
Location: Wherever you are, I wil follow
Posted: 21st Oct 2007 21:24
Quote: "How to convert an EXE into a DLL:
This is called emulating, and it is not very nice."

WOAH. You're really a fan of opening sentences, aren't you?

Quote: "Although, to be honest, I don't see a reason for making a DLL with DBPro."

Coz I don't wanna learn C++ . There. Simple as that

Your signature has been erased by a forum hacke - I mean, a mod

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Oct 2007 23:34
@Eevil Weevil
You really should learn C++. Once you get over the initial difficulty of understanding it all, you will find that it is a REALLY powerful language. It is both the fastest (excepting assembler) and most functional language there is! (With pointers etc.) Also, making plugins for DBP is nice

Eevil Weevil
16
Years of Service
User Offline
Joined: 1st Aug 2007
Location: Wherever you are, I wil follow
Posted: 25th Oct 2007 12:10
@Diggsey:
Yeah, s'pose I should. But still, I'm sure I'm speaking for a few people who might want to make a plugin, but not learn a whole new language because of that.
Cool Avvy, BTW

It'd actually be quite a cool project:
Quote: "How to turn .DBA code into C++ code[b]
This means hardwiring each and every one of the DBPro functions into C++ code. Once you've done that, you can simply alter the syntax, but keep the semantics the same. Slightly longer, but much more efficient."


Y'know what, that [b]mightt actually work!!!

There are thousands of DBPro commands, though (wait, just creating program to calculate how many ) and someone/thing (making allowances for Hello Kit- I mean, tha_rabbi - I mean, tha_rami heh heh heh) would have to write a C++ equivalent for them. So, this'd be pretty hard, but also pretty rewarding... hmmmmm.......

Your signature has been erased by a forum hacke - I mean, a mod

RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 30th Oct 2007 18:49
DarkGDK contains almost all the DBPro commands for C++. Theoretically it would be possible to create a program to automatically change the syntax to/from DarkBASIC/GDK.
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 28th Nov 2007 02:51
you know what you could do?
You could compile it into an exe, decompile it into c++ code, and yeah!

alus.portbb.com go there.
Quote: A book. I hate books. book is stupid. I know that I need codes but I dont know the codes -zenicanin14 the stupidest user in the world
hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 28th Nov 2007 04:19
Quote: "You could compile it into an exe, decompile it into c++ code, and yeah!"

Please tell me you're joking. Machine code doesn't just "decompile" into anything very readable.

@Eevil Weevil:
While it's a good thing to learn C++, it's not necessary to use it to create plugins for DBP. You could also use Delphi or PureBasic. There are lots of other alternatives as well.

CodeSurge
Version 1.0 finally released! Code your DBP projects in style. (And save the kittens!)
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 28th Nov 2007 12:16
@Eevil Weevil -
If you don't want to make plugins with C++ then get PurePlugin which allows you to create DBP plugins with Purebasic. Purebasic is around $99, and is WELL worth the price. It is an extremely powerful language that creates small EXEs and DLLs and has Basic syntax.

Making a DBP EXE into a DLL is really pointless, because it will be even slower than the native DBP code. You're adding layers of abstraction to the original EXE, each one making it slower and slower. The purpose of a plugin is to encapsulate commands and to speed them up. It would be an awful lot of trouble for no reason, because nobody would use plugins made like that.

Quote: "Y'know what, that mightt actually work!!!"

If you wanted to make a DBP>C++ converter you would have to do it yourself, and that would mean you'd have to learn C++ anyway.


Come see the WIP!
Eevil Weevil
16
Years of Service
User Offline
Joined: 1st Aug 2007
Location: Wherever you are, I wil follow
Posted: 28th Nov 2007 19:44
@Cash Curtis II & hyrichter:

Ty for the info on Delphi, and PurePlugin.
Quote: "Making a DBP EXE into a DLL is really pointless, because it will be even slower than the native DBP code. You're adding layers of abstraction to the original EXE, each one making it slower and slower. The purpose of a plugin is to encapsulate commands and to speed them up. It would be an awful lot of trouble for no reason, because nobody would use plugins made like that.
"
. Good point, although there could be a way around it of converting DBPro code first in C++ then into C++
Quote: "If you wanted to make a DBP>C++ converter you would have to do it yourself, and that would mean you'd have to learn C++ anyway.
"
Yeah, the 'idea' was just a hypothesis

Impossible? Anything is impossible. 48'6F'77'20'64'61'72'65'20'79'6F'75'20'77'6F'72'6B'20'6F'75'74'20'6D'79'20'73'69'67'21

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 30th Nov 2007 19:55
Quote: "Can you make a .dll out of an .exe ?"


Open it in notepad, then "save as..." and then type your filename + ".dll"
And then you have a DLL :-p

I don't guarantee it'll work though...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 1st Dec 2007 01:44
its not possible

Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 7th Dec 2007 13:10
Quote: "Open it in notepad, then "save as..." and then type your filename + ".dll"
And then you have a DLL :-p"


Just because a puppy is brown and bounces in the grass doesn't mean you should go kick it over a field goal...

When the power of love overcomes the love of power, the world will know peace.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 10th Dec 2007 15:05
Quote: "Just because a puppy is brown and bounces in the grass doesn't mean you should go kick it over a field goal..."


Lol, THAT's a funny idea...

But as everyone is saying, I also think it's impossible. But I once did see a program that could extract DLL's from an executable (I think).

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
tha_rami
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location: Netherlands
Posted: 11th Dec 2007 07:10
Quote: "(making allowances for Hello Kit- I mean, tha_rabbi - I mean, tha_rami heh heh heh)"

Crap, even on boards I don't frequent.


A mod has been erased by your signature because it was larger than 600x120
Eevil Weevil
16
Years of Service
User Offline
Joined: 1st Aug 2007
Location: Wherever you are, I wil follow
Posted: 23rd Dec 2007 22:04 Edited at: 18th May 2008 10:56
Quote: "Crap, even on boards I don't frequent."

Yup, no escape from the eil.

Anyone got anything else to say?

Impossible? Anything is impossible. 48'6F'77'20'64'61'72'65'20'79'6F'75'20'77'6F'72'6B'20'6F'75'74'20'6D'79'20'73'69'67'21

Login to post a reply

Server time is: 2024-05-03 18:42:56
Your offset time is: 2024-05-03 18:42:56