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.

Geek Culture / VB programmer needed

Author
Message
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 9th Mar 2004 20:37 Edited at: 9th Mar 2004 21:29
Hi, I need a simple ActiveX/COM DLL made in VB. It should export an object with the following properties:
- IntValue (32 bit Integer)
- SingleValue (single precision float)
- StrValue (a String)

and these methods
- Method1
1 Integer Parameter that does whatever you like with an IntValue property field (eg. Add or divide)

- Method2
3 or 4 Parameters of whatever type that do something with the properties.


I need the source code also


Why do I need it?
Well we're trying to add Com DLL support to PlayBasic and (if everything works well, that is) we will release a DLL/PlugIn for DB(pro) to access Com DLLs.


Thanks a lot in advance.

Me, I'll sit and write this love song as I all too seldom do
build a little fire this midnight. It's good to be back home with you.
HZence
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 9th Mar 2004 21:21 Edited at: 9th Mar 2004 21:21
Well I am a VB programmer but this project seems extremely complicated, and I've never made a DLL in my life.

Not to mention I only have the learning edition, and you can only make DLLs with standard/professional/enterprise as far as I know.


Team EOD :: Programmer/Storyboard Assistant
Terabyte
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 9th Mar 2004 21:55
i have vb6... but i havnt got a clue how to write a dll

The following threads and their accompanying sound tracks are protected by copyright and any broadcast public diffusion, copying and edditing are etc... etc.. you may not complain about my Typo's
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 9th Mar 2004 22:32
I've never made a DLL, I didn't know you could make a DLL with VB.

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th Mar 2004 22:35
well, I could make your dll but currently I don't have the time with trying to get my business site off the ground. If the need still exists in about a week or so I will make your dll for ya.


"What the... Moooooooo!"
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 9th Mar 2004 23:31 Edited at: 9th Mar 2004 23:33
Making VB DLLs are a snap, but the spec looks a little whacked. Class names and method names would be nice. To make one, just create a class file and plug in in some functions, for example:

Public Function fExtView(ByVal sIDNumber As String, lCount As Long, ByVal sUserName As String) As Long
fExtView = 0
rem Do some stuff
End Function

Something like that works just fine for me. Making the DLL itself is the easy part, figuring out what you want it to do and how the calling conventions are set up is the tricky part.
--
TAZ


Side note: Do we really need something like that for DBP?

empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 9th Mar 2004 23:55 Edited at: 9th Mar 2004 23:55
@all
Thanks for your interest.

@CattleRustler
I might come back to you in about a week or so

@zircher
Quote: " Class names and method names would be nice"

As long as I they're documented, I don't care how they're named.


Quote: "
Making the DLL itself is the easy part, figuring out what you want it to do and how the calling conventions are set up is the tricky part.
"

As long as I can figure out what they do (or it's documented) I don't care either.
I just want to test these DLLs with our current method.


Quote: "
Side note: Do we really need something like that for DBP?
"

I don't know. Obviously there are a lot of people who wish to use VB's ActiveX DLLs in DB/DBpro. Problem is, I don't have VB so it's a bit difficult to test it. The ones I created with Delphi work, though. But you never know.

Me, I'll sit and write this love song as I all too seldom do
build a little fire this midnight. It's good to be back home with you.
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 10th Mar 2004 00:53 Edited at: 10th Mar 2004 00:55
Here you go empty:

http://www.robertknight.me.uk/files/temp/VBCOMDEMO.dll

Object: VBCOMDEMO.DEMOCLASS

Properties: intVal,floatVal,strVal

Methods:
squareInt() - Returns the square of intVal
showValues(int,float,str) - Pops up message boxes with parameters, then adds params to intVal,floatVal,strVal properties, and pops up message box with result
addFloatToInt() - Adds floatVal to intVal
addStrToInt() - Adds strVal to intVal

==========

VB code for class:



VB code to use ActiveX DLL


ActiveX from C++ ain't easy.


BlueGUI-Windows UI Plugin
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 10th Mar 2004 01:02
Cool. Thank you very much, Rob.

Me, I'll sit and write this love song as I all too seldom do
build a little fire this midnight. It's good to be back home with you.
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 10th Mar 2004 04:11
Well, everything works well, except for the showValues method which raises a type conflict exception.

Me, I'll sit and write this love song as I all too seldom do
build a little fire this midnight. It's good to be back home with you.
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 10th Mar 2004 04:30 Edited at: 10th Mar 2004 04:31
Why don't you use a data file made in vb(or DB) and make it go though all the files in a folder and check for maybe anything that has whatever you want as a name (- the file extention) or just make the names blahblahblah01.dat(that was an example) No offence but this is a DB forum not a VB one. Check out [href]www.vbcode.com[/href] for code. Hope you understood that.

It's amazing how much TV has raised us. (Bart Simpson)
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 10th Mar 2004 07:31
Quote: "I don't know. Obviously there are a lot of people who wish to use VB's ActiveX DLLs in DB/DBpro"


And they can if they bother to use my wrapper (Plug: http://www.thegamecreators.com/?m=forum_view&t=26828&b=1) Of course, the only difference here is that they must own C++ and be able to write basic DBP functions with it.


Quote: "ActiveX from C++ ain't easy."


It's extremely easy. In fact, it's so easy it's just not funny. This is all it takes to call a VB DLL from C++:



That's it. Absolutely nothing else is needed, I presume I could write a DLL to call VB DLL's like empty is doing but I'd think it would be so much easier to just do it manually. I guess not.


"Computers are useless they can only give you answers."
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 10th Mar 2004 12:31 Edited at: 10th Mar 2004 18:27
@Manticore Night
Quote: "Why don't you use a data file made in vb(or DB) and make it go though all the files in a folder and check for maybe anything that has whatever you want as a name (- the file extention) or just make the names blahblahblah01.dat(that was an example) No offence but this is a DB forum not a VB one. Check out www.vbcode.com for code. Hope you understood that."

Erm.... no.


@Exeat
Quote: "Of course, the only difference here is that they must own C++ and be able to write basic DBP functions with it."

I guess the fact they need C++ (or Delphi) holds a lot people back. Even though it is simple.


@RobK
Still showValues doesn't work. If I (early) bind it in Delphi it works perfectly. If I port it to Delphi (and create a COM DLL) I can late bind it too. Strange, strange.


------ EDIT:
Ah my bad. It seems to work now.

Me, I'll sit and write this love song as I all too seldom do
build a little fire this midnight. It's good to be back home with you.
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 11th Mar 2004 00:21
OK, RobK's COM DLL works, and so does Muschroom Head's.
If anybody has a COM DLL for me he/she would like to use in DB/DBpro please shout it out.

Me, I'll sit and write this love song as I all too seldom do
build a little fire this midnight. It's good to be back home with you.
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 11th Mar 2004 16:00
Quote: "It's extremely easy. In fact, it's so easy it's just not funny. This is all it takes to call a VB DLL from C++:"


Still think it looks complicated to me - but that's probably just me

BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games. - Plus URL download, win dialogs.
Over 140 new commands
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 12th Mar 2004 06:19
Well it would be if you don't know C++, here's a commented version:




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

Login to post a reply

Server time is: 2024-09-21 11:59:14
Your offset time is: 2024-09-21 11:59:14