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 / Is it possible to create a dll in DBP6.6 ?

Author
Message
TinTin
18
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 23rd Aug 2007 00:43
I was wondering if it were possible to use DBP6.6 to create a dll that, a) can be included with a distributed application created with DBP, or b) can be stuck in the user dll folder to be compiled with the application.

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Aug 2007 01:23
No. DBPro can only create exe's

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 24th Aug 2007 17:33
Technically you could write a dll with DBP, using write byte lots of times...

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 28th Aug 2007 09:18
With OPEN TO WRITE, and CLOSE FILE as well.


Cheers,

-naota

DBP, $80. DBP's plugins, $320. Watching DBP Crash, Priceless.
NG Website Aex.Uni forums
TinTin
18
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 28th Aug 2007 11:59
Ah... I see the influx of information has made the solution much clearer... Thanks IanM , your almost a fairy godfather. hehe
Diggsy & Aaron, gues you guys don't happen to know how I'd go about compiling the output to the file now?

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Aug 2007 15:14
Yes, technically it's possible ... if you are willing to learn the DLL output format - header, code, internal relocation information, static data, external linking information - along with writing an assembler, learning how to extract DBPro compiled info and reorganise it for running in an external DLL.

Oh, just one or two months solid work there for an experienced programmer.

Alternatively, you can use my first answer, and then go and learn how to do it with PB, Delphi or C++ in a week

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 28th Aug 2007 18:40
Quote: "Alternatively, you can use my first answer, and then go and learn how to do it with PB, Delphi or C++ in a week "


or vb.net and C# as well
(and use ZK's converter on your compiled dll to automatically build string tables, and recompile the dll for use straight away in dbp as a plugin)

My DBP plugins page is now hosted [href]here[/href]
TinTin
18
Years of Service
User Offline
Joined: 16th May 2006
Location: BORG Drone Ship - Being Assimilated near Roda Beta (28)
Posted: 30th Aug 2007 11:30
Hehe @ IanM, yeah I guess I'll be following your suggestion. It was just a thought since DBP can generate screen savers although, I'm not sure if it properly detects if it's already active.?

@ CattleRustler, I use C++ didn't get into the .net os C# stuff but thanks for the info on ZK's converter, I didn't know that existed and I find it a pain writing these resource files.

Maybe Lee will consider adding the options of what you'd like to compile in the settings panel... [x].Exe [ ].Scr [ ].Dll
It'd be a great advantage...

Thanks again Guys.

Go Create...

Cyberspace was becoming overcrowded and slummy so I decided to move. These nice chaps gave me a lift.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Aug 2007 14:58
Screensavers are plain .exe files, renamed to .scr

There's a bit of extra stuff you need to do to get it to place nicely with the screensaver setup dialog, but that's pretty much all.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 3rd Sep 2007 20:36 Edited at: 3rd Sep 2007 20:39
Well, yeah, technically it IS possible... A dll is just a renamed exe with multiple entry points. exe files typically only have one entry point, but it should be theoretically possible to hack up a DLL in DBPro, if you code it right, and as Ian M said, have something restructure everything. But I wouldn't recommend it. It'd be like trying to make a marble sculpture with a chainsaw. Very painful, very arduous, and not likely to be very pretty.

DBPro might compile to native, but it's not all one contiguous file. There's a "pck" file that contains the bulk of the code you made, and that code is not a part of the exe. Although who knows, maybe that executable stuff in the pck is actually being used like a dll, with multiple entry points. Who knows? I certainly don't

Nothing I say is intended to be rude. My autism means that I do not know what is rude and what isn't rude. I apologize if I seem rude. It is not my intention.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Sep 2007 21:13
Actually the .pck file itself is easy to break out into separate files

The Winch has full details on the format published on his site, along with utilities to manipulate the file.

It's basically an archive file containing all the attached media and the plug-in DLLs used, in addition to a file called _virtual.dat - it's only this last file that contains code generated by DBPro.

When you build an .exe instead of a .pck, the compiler simply appended the .pck to the .exe stub, and the .exe takes care of unpacking everything into a temp directory for use.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code

Login to post a reply

Server time is: 2024-11-22 22:54:08
Your offset time is: 2024-11-22 22:54:08