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 / Pros DLL?

Author
Message
bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 19th Mar 2008 22:33
Hi all!

I am starting to get the grip on DBP now and i feel that i cant stretch so far only with dark basic pro.
I know what a dll is (dynamic link library).

-But what can i do with it?
-And how do i write dll's?

---:GAME MAKING IS BEST:---
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Mar 2008 00:12
You can do almost anything with it

First of all, you need to decide what language you will use to write one

You have 2 main choices:

1) Learn C++
C++ is quite hard to learn compared to other languages, but dlls you create with it will be very fast and portable.

2) Learn a .net language (such as vb.net)
.net languages are generally very easy to learn, but you will need a special converter to get them to work with DBP, they will be slower than C++, and they will also require the end user to have the .net runtime installed.

Once you have chosen, and have got familiar with the language, do a search on the forums for more specific information on how to make one. If you are using C++ look in the technical documents section of the help, under third party commands. It will tell you everything you need to get started.

bergice
17
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 20th Mar 2008 01:44
Thanks for helpful reply!
I will look at it and see if i can make some simple dll's!


---:GAME MAKING IS BEST:---
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 27th Mar 2008 21:36
Or You could write one in FreePascal - which is FREE - is Faster than C++ - Easier to learn:

Free Pascal (aka FPK Pascal) is a 32 and 64 bit professional Pascal compiler. It is available for different processors: Intel x86, Amd64/x86_64, PowerPC, PowerPC64, Sparc, ARM. The discontinued 1.0 version also supports the Motorola 680x0. The following operating systems are supported: Linux, FreeBSD, Mac OS X/Darwin, Mac OS classic, DOS, Win32, Win64, WinCE, OS/2, Netware (libc and classic) and MorphOS.

Did I mention its the only language I know with smart linking that actually works? You can have a source file with 10000 functions and if you only use ONE function - that's all it brings in - and it warns you of abandoned variables - like C# does... but did years before .net

david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 27th Mar 2008 22:36
@Jason WoW,,,,do I smell FAnBoY???
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 27th Mar 2008 22:57 Edited at: 27th Mar 2008 23:02
You could also use Turbo Delphi Explorer. It's got a slightly more optimised compiler and a far better IDE. Nothing wrong with FreePascal, though. Long live (object) pascal. .

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th Mar 2008 00:09
@David - Why.... YES! Yes, I suppose you do!

@Empty - HERE HERE! OOP Pascal is cool! Curious why you think the compiler from Turbo Delphi is more optimized? As for IDE - Lazarus is cool also... especially for platform independant GUI stuff....

Though I learned today of a cool C++ thing - Crazy EDDIES GUI or something - supposedly open source and platform indepentant - but I digress LOL



empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 28th Mar 2008 00:23 Edited at: 28th Mar 2008 00:29
Quote: "Curious why you think the compiler from Turbo Delphi is more optimized?"

I did some studies earlier this year and most of the time the Delphi compiler optimised the output slightly better than FP. Although the margin is much, much smaller now than it was with FP v1.x.

Quote: "As for IDE - Lazarus is cool also... especially for platform independant GUI stuff...."

Yes it's coming along now, but still far from Delphi, even though speedwise it's really close now... although that's also because all versions after D7 have slowed down remarkably . But Live Templates, refactoring and stuff like that is really nice to have. Then again Lazarus appears much smoother on Linux. However, cross-platform doesn't count for DBPro TPCs .


EDIT
I should add, though, that the free Explorer Edition of Delphi is very useful for this particular purpose (writing DLLs for TPCs) and similar stuff. However, since you can't install one of the myriad of components with this version its use for GUI development is limited. And I'd also like to add that the product and pricing policy of CodeGear/Borland is rather odd these days...

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th Mar 2008 01:27
YAY!!! another Fan BOY for PASCAL! LOL

Yeah - and Freepascal would also do for the dll - and Lazarus GUI COULD be made to work gui ONLY if you have interprocess stuff going.. I THINK it needs to be the winmain owner. DELPHI might not be that way though, and might be better for leveraging DBPRO as is and adding GUI. Dunno.

FreePascal is a Little cheaper than Delphi though... only by a little

Glad to have run into you empty! Nice to meet ya.

empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 28th Mar 2008 02:15
Quote: "YAY!!! another Fan BOY for PASCAL! LOL"

You bet!

Quote: "Yeah - and Freepascal would also do for the dll - and Lazarus GUI COULD be made to work gui ONLY if you have interprocess stuff going.. I THINK it needs to be the winmain owner. DELPHI might not be that way though, and might be better for leveraging DBPRO as is and adding GUI. Dunno."

You can place GUI elements on windows of your choice with both. Setting this up is not that straight forward as with pure API but since all gadgets are nicely encapsulated in classes it'll certainly safe you time in the long run. I wrote a windows gui library for PlayBasic using the windows API and regretted having chosen this way very soon due to all those Windows oddities. The theming thing in XP is a pain. On the brighter side, the file size stayed well below 100kB which is about a fifth of what it would have been if I had used components .

Quote: "FreePascal is a Little cheaper than Delphi though... only by a little"

Codegear's explorer editions are free. Just hardly anybody knows they exist . The only limitation is that you cannot install any additional components.

Quote: "Glad to have run into you empty! Nice to meet ya."

Yes, always nice to meet fellow Pascal coders

Login to post a reply

Server time is: 2024-09-08 03:33:55
Your offset time is: 2024-09-08 03:33:55