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 / [STICKY] Visual Basic Plugins for DBP - Support Resource

Author
Message
Dave J
Moderator
14
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 11th Dec 2004 20:33 Edited at: 5th Jan 2005 20:47
This is increasingly becoming a hot topic on these forums - "How do I use my Visual Basic DLL in DarkBASIC Professional?" - There are several ways to achieve this, although, each have their pros and cons, I'll try to address as many as possible in this thread. Feel free to suggest other solutions if I've missed any out.


Manual DLL Creation
This is the messiest way to get your VB DLL running in DBP, feel free to hack up my source code and butcher it as much as you like. Incidentally, I'd love to see some significant improvements that may make this task simpler. I.e. If you find some shortcuts and optimisations, don't hesitate to email me or post a reply mentioning them.

Visual Basic 6
This is nasty. You'll require at least some C++ knowledge, VB6 DLL's make use of the COM Library and so are not very compatible with the C++ DLL's needed to create plugins. You'll need to create a C++ Wrapper DLL in addition to your regular VB DLL, although not an impossible task, it isn't a walk in the park either. In any case, I've personally created some samples and modified IanM's brilliant TPC Framework to make the creation of the C++ wrapper some-what easier than it previously was.

Advantages: Cost-Effective, allows you to create your own commands like a true TPC Plugin.
Disadvantages: Messy, requires intermediate C++ knowledge.
Sample: To be uploaded...
Framework: http://ep.designex.net/Files/VB6-Framework.zip
Documentation: To be uploaded...

Visual Basic .NET
This is much easier to do than VB6 DLL's as VB.NET Data Types are easily converted to C++ .NET Data Types. In fact, the .NET Framework was created with the idea of cross-language interoperability in mind, this makes our job a lot easier. Once again, a C++ .NET Wrapper DLL is required, however, due to the simplicity of the .NET framework, this is much easier to create and is all but a no-brainer, just copy my source code and make the required changes.

Advantages: Cost-Effective, allows you to create your own commands like a true TPC Plugin.
Disadvantages: Minimal C++ knowledge required.
Sample: http://ep.designex.net/Files/VB7-Sample.zip
Framework: http://ep.designex.net/Files/VB7-Framework.zip


Third Party DLL's
Presumably could be related to the above method, however, most of the work has been done for you. Thsese DLL's will offer additional commands that will allow you to call Visual Basic functions within DBP.

Empty's VB DLL Library
This is a TPC Plugin itself that allows you to call VB functions in a method similar to the "Call DLL" command. It's very easy to use and appears to work flawlessly, it even works for both VB6 and VB.NET - amazing!
Note: Empty's download link appears to have disappeared, if someone could track it down, please let me know. Cheers.

Advantages: Easy to use, no other knowledge required, supports both VB6 and VB.NET!
Disadvantages: Doesn't create 'True' TPC Plugins.
Forum Thread: http://www.dannywartnaby.co.uk/rgt/index.php?board=10;action=display;threadid=2664
DBP Download: http://www.dannywartnaby.co.uk/rgt/attachments/dbpro.zip
DBC Download: http://www.dannywartnaby.co.uk/rgt/attachments/dbc.zip


Third Party Applications
These are applications that assist in the creation of DLL's that will work with DBP, generally, they'll modify the VB DLL's themselves or change the VB Compiler's linker so the DLL is created differently.

ZKAT8IT's DBP VB.Net Converter
This modifies an already compiled VB.NET DLL so it can be used through the "Call DLL" function included in DBP. Although it hasn't been released at the time of writing, it currently looks like it will be easy to use and work a treat, might be worth checking out.

Advantages: Very easy to use, excellent customisability, no other knowledge required.
Disadvantages: Possibly Shareware? No VB6 support yet.
Forum Thread: http://forum.thegamecreators.com/?m=forum_view&t=42944&b=8

The Winch's DLL Tool
Very similar to the above program but with slightly less features, however, since this one appears to be freeware, one can hardly complain.

Advantages: Very easy to use, no other knowledge required, freeware!
Disadvantages: No VB6 support yet.
Forum Thread: http://forum.thegamecreators.com/?m=forum_view&t=44946&b=8

vbAdvance
This is a Visual Basic 6 plugin that modifies the Linker in the VB compiler to create standard DLL's as opposed to the regular COM-based ActiveX DLL's that VB6 produces, ironically, this was always an option in the VB compiler but it was disabled for some odd reason. This creates DLL's similar to what the C++ compiler would produce, as such, they can be used to create your own commands and an actual TPC Library. CattleRustler has kindly written a tutorial on how to effectively utilise vbAdvance, found under the 'Documentation' link below, thanks.

Advantages: Easy to use, no other knowledge required, creates true TPC Plugins.
Disadvantages: Full version costs $30. No VB.NET Support.
Website: http://www.vbadvance.com/
Documentation: http://forum.thegamecreators.com/?m=forum_view&t=42070&b=18



To Be Continued...


P.S. I want to clean up my source code before I upload them, should be ready tomorrow.


"Computers are useless, they can only give you christmasy answers."
1tg46
13
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 12th Dec 2004 00:03 Edited at: 12th Dec 2004 00:21
Great job exeat, finally some resources.



@exeat
Regarding empty's missing links:

http://www.dannywartnaby.co.uk/rgt/index.php?board=10;action=display;threadid=2664 is the link to the forum where the links are and the
DBpro version: is Dbpro version
DBClassic activeX version:DBclassic version

On the link that you provided if you just looked under the DBclassic version link, then clicked the details for the DBClassic version it would bring you to that forum.


Hope I helped,
1tg46


Click the sig
Dave J
Moderator
14
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 12th Dec 2004 05:23
Ahh, I assumed it would always just link back to his website, which appears to be offline. Thanks though, I'll edit it in ASAP.


"Computers are useless - They can only give you answers."
CattleRustler
Moderator
14
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 12th Dec 2004 11:28 Edited at: 12th Dec 2004 11:30
i had a tutorial on how to setup your code for using vbAdvance in one of these threads somewhere. If I can find it I'll link it here.

'ere it is, in this thread:
http://forum.thegamecreators.com/?m=forum_view&t=42070&b=18

Dave J
Moderator
14
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 12th Dec 2004 20:43
Cheers. Editing it in now!


"Computers are useless - They can only give you answers."
Targos
12
Years of Service
User Offline
Joined: 17th Dec 2004
Location:
Posted: 17th Dec 2004 08:22
Hi,
i just want to know where can i find a C++ .NET Wrapper DLL or how i can make one..

Thanks
Spike
14
Years of Service
User Offline
Joined: 10th Oct 2002
Location:
Posted: 27th Dec 2004 16:40
First..can I say "Great post" Thanks guys...

This may be a dum question... I have Vs2003...it comes with C++ as well as c#/vb/j# I didnt install c++...will the VB.net dll framwork and stuff above ---work in that c++...


Thank you guys really

Spike

Live Large---Code Hard
Dave J
Moderator
14
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 27th Dec 2004 19:27
Quote: "i just want to know where can i find a C++ .NET Wrapper DLL or how i can make one.."


The download link is provided in the above post.


Quote: "This may be a dum question... I have Vs2003...it comes with C++ as well as c#/vb/j# I didnt install c++...will the VB.net dll framwork and stuff above ---work in that c++..."


I'm fairly sure you'l need to install C++ as well, as the wrapper DLL is written in C++. Hopefully you'll be able to modify your installation to include C++ without having to do a full reinstall.


"Computers are useless, they can only give you christmasy answers."
Spike
14
Years of Service
User Offline
Joined: 10th Oct 2002
Location:
Posted: 28th Dec 2004 11:43
Quote: "I'm fairly sure you'l need to install C++ as well, as the wrapper DLL is written in C++. Hopefully you'll be able to modify your installation to include C++ without having to do a full reinstall. "


What I meant to say....is the C++ that comes VS2003 ok to use....the project type would be -- MFC dll--An extended stored procedure project-- The first type project right ??

Spike

Live Large---Code Hard
Dave J
Moderator
14
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 28th Dec 2004 19:49
Oh, ok, yeah, you're meant to use the same version of C++, sorry, I should have made that clear. VB6 DLLs will need their wrapper created in C++ 6, whilst VB.NET DLLs will need their wrapper created in C++.NET.

Also, about the project type, you will need to create a 'Class Library (.NET)' project. I haven't tried them with ActiveX DLL's so I can't comment on whether they will work or not, sorry.


"Computers are useless, they can only give you christmasy answers."
G Man
12
Years of Service
User Offline
Joined: 17th Nov 2004
Location:
Posted: 29th Dec 2004 06:25 Edited at: 29th Dec 2004 07:35
Here's another VB compiler add on that allows compiling directly to native API DLL's:

http://www.relsoft.net/products.html.0.html

Intel Pentium 4, 3.4GHz, 1280MB RAM, NVidia Quadro FX3000/256MB, 240GB HD, XP Pro
ZKAT8IT
14
Years of Service
User Offline
Joined: 16th Apr 2003
Location:
Posted: 5th Jan 2005 17:46
Hey Exeat, what do you mean by 'True' TPC's? My program allows you to create a string table and everything neccessary for the DLL to be put into the plugin folder to be used as native commands.
Dave J
Moderator
14
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 5th Jan 2005 20:46
Oh sorry, I thought yours could only be used with the 'Load DLL' command, my mistake.


"Computers are useless, they can only give you christmasy answers."

Login to post a reply

Server time is: 2017-08-23 01:27:41
Your offset time is: 2017-08-23 01:27:41