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.

Work in Progress / C++ Wrapper for Visual Basic DLL's

Author
Message
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 27th Feb 2004 11:53 Edited at: 27th Feb 2004 12:08
Well, I know some people would like to see this (CattleRustler ) and I think I may have got it working. I need to test it on some other machines though to make sure, here's the download:

http://ep.designex.net/Misc/VBDLL.zip

Please run that DBP application and tell me the messages that popup, you should get:
"Hello World" (From C++) and "VB ActiveX DLL" (From VB)

However, if the second message says "Creation Failed", then something went horribly, horribly wrong and I have to fix it.

So how's it work? Basically it allows you to write an ActiveX DLL in Visual Basic and then wrap it in C++. Of course, it's not as simple as just recompiling the C++ DLL with the new VB DLL name in it. You must rewrite the function names in C++ and the string tables so you must have at least some C++ knowledge (although very minimal) to get it to work correctly.

Of course, I'll put out a tutorial on how to do all this as soon as I get some feedback on wether the above application works. Otherwise I'm not going to waste my time explaining how to do something that doesn't work. Anyway, I'd love for a couple people to test it out. Cheers.

Edit: I think I fixed any problems it may or may not have had. Anyway, the zip will come packaged with: VBDLL.exe, prjdll.dll and reg.bat - Please test the exe, if it comes up with "Creation Failed" then please run "Reg.bat" and retry the exe. This time it should work.

This is sort of a downfall though because it means the VB DLL must be registered to work, I suspected this would be the case but it means you'll have to register it manually with your DBP app/game or with a setup file that does it (I know some free setup generators have the option to do this).


"Computers are useless they can only give you answers."
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 27th Feb 2004 12:05
I get 'Hello World', and then 'Creation Failed'


The place for all great plug-ins.
XP3000+,1Gb RAM,FX5600,1Mb ADSL,Router,.Net 2003 Pro & me
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 27th Feb 2004 12:09
I just edited my message while you were posting lol, could you kindly redownload and try what I suggested. Thanks.


"Computers are useless they can only give you answers."
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 27th Feb 2004 13:05
Yes, thats find - had to register the DLL, but after that was done, it worked okay.


The place for all great plug-ins.
XP3000+,1Gb RAM,FX5600,1Mb ADSL,Router,.Net 2003 Pro & me
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 27th Feb 2004 13:26
Excellent!

For those interested, I just did some testing and got Passing and Returning Variables working. I've also succesfully made a Visual Basic form appear from within a DarkBASIC application. The only problem with showing a form though is that it MUST be modally shown, that is to say it's like a diag box and you can't reclick on the DBP app without first closing the form. I'm looking for ways around this, though.

Glad to hear it's working on other machines though, time to start working on documentation on how to do it.


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

Login to post a reply

Server time is: 2024-11-21 23:45:17
Your offset time is: 2024-11-21 23:45:17