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 / Can you access DB commands from a plugin?

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Oct 2004 01:48
Just wondered if you can do this? For example, if your DLL dealt with object movement, can the DLL move the objects, or would you have to return the values, and then use the commands from the main DB program?

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
IanG
19
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 18th Oct 2004 02:02
look at IanM's interface lib

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2ghz, 512mb, geforce fx5200 128mb, 200gb, xp pro sp2
Torrey
19
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 18th Oct 2004 07:07
Yes you can do that. Using two api's, GetModuleHandle first, then you use GetProcAddress. Once you get the proc address you can use that to call whatever function you need.
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 18th Oct 2004 08:26 Edited at: 18th Oct 2004 08:27
but, is there somewhere, the list of all available functions ?

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Oct 2004 16:01
You can do this the easy way, by using my interface library, or the hard way, by getting function pointers yourself as Torrey suggested.

The list of commands available is pretty much what is in the manual, with the exception of arrays, and the CALL DLL interface.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Torrey
19
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 18th Oct 2004 16:58
Using those two API's is the hard way? It's the same thing your interface library does.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Oct 2004 17:00
Sounds interesting. Looks like I may be tryingto port my skills to Pure Basic, or C++.

I guess Pure basic will be the easiest, unless someone knows otherwise? I'm a mainframe/VB/Java/asp programmer if anyone has any advice.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 18th Oct 2004 18:06
Java?
Java's based off of C, so the syntax isn't quite the same, but the layout, program structure, and basics of code ( ie, the ';' at the end of the lines etc ) is all the same

Other than that, I can't suggest anything to do with PureBASIC, as I've never used it

Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Oct 2004 19:02 Edited at: 18th Oct 2004 19:04
Cheers Jess. I would be simply manipulating arrays and values, and interacting with DB. So it would be all mathematics, strings and arrays.

Would I get away with using C++ under these circumstances, without a huge learning curve, based on my experience of Java?

To be honest, I've never had an issue with learning new syntax. My concern would be the development environment, and successful compiling, testing and debugging.

The other issue for me, I suppose, is keeping the run-time instance alive, and returning values. Patrallel processes are not something you have to worry about in my world.

I'm not looking for a "how-to" as an answer, just advice on whether I could acheive this level of knowledge in a relatively small amount of time. I've programmed for a living for 14 years, the question is about C++, not whether I can actually program!

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Oct 2004 22:33
It's the hard way, because as well as using the API, you have to correctly set up your function pointer variable and its type as well.

The easy way:




The hard way:




That was one command that is now hopefully set up correctly ... now what about the other 1224 commands that are already in existance within the interface library?

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2024-04-20 14:18:05
Your offset time is: 2024-04-20 14:18:05