I posted this in the WIP forum yesterday but just got finished with it today. Basically it allows you do the impossible (as claimed by some of the 'gurus' around here
), you can write a DLL in Visual Basic, wrap it in a C++ DLL and then call it through DBP. Unfortunately there's nothing 'showy' about it for those who don't want to do this, but here's a screenshot anyway:
You can download the ZIP file here:
http://ep.designex.net/Misc/VBinCPP.zip
This package will teach you how to write Visual Basic ActiveX DLL's
that can be compiled and imported into C++. It will tell you how to
write the source code for C++ that can call the compiled VB DLL and
run functions from it. It will also show you how it's possible to
display a modal form from VB in DBP and basic passing of integers
from DBP to C++ to VB and then returning a value back.
Finally, it also comes with a modified version of Ian Mold's DBP
Plugin Framework (http://www.matrix1.demon.co.uk) that will allow
you to call VB functions easily without any mess.
-------------------------
The zip file will come packaged with the following folders and files:
-Readme.txt
-VB DLL in DBP Documentation.doc
-DBP Visual Basic Plugin Framework
> C++ Source Code
> Visual Basic Source Code
Documentation Sample Source
> Compiled Final
> C++ Source Code
> VB Source Code
> DBP Source Code
-------------------------
The Microsoft Word file will teach you everything you need to know
about creating Visual Basic DLL's for DarkBASIC Professional. The
first subdirectory includes source code for a modified version of
Ian Mold's DBP Plugin Framework that will work for VB DLL's. The
second subdirectory includes the source code for the sample that is
created by following the tutorial in the documentation. It also
includes a "Compiled Final" directory that will have the compiled
EXE's and DLL's from the source code
The only downfall so far is that if you wish to call a function from the VB DLL then you must first register it on the client's computer. This means if you distribute a game that uses a function within a VB-DLL then they would also need to recieve the VB DLL (not the C++ one) and have someway to register it. So, if you wanted to see the sample included in the zip, you'd have to run the batch file I included first before it would work.
Wow, first thing I've contributed to the community. Now excuse me while I go and hide from IanM because I stole his framework
Edit: Eek, I just posted this in the wrong forum. Sorry, had two browsers open - one in program announcements and one in this one, accidentally posted in the wrong one. Feel free to lock/delete/whatever mods. lol.
"Computers are useless they can only give you answers."