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 / Making A DLL That Involves Using DBPro Objects?

Author
Message
The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 16th Jan 2006 19:08
Ok,
I have made DLL's before so I am not asking how to make a DLL.

In all the DLL's that I have made, I have never gone further than String and Integer Manipulation.

My question is how do I make a DLL that involves the usage of DBP items and stuff.

For Example:
Say I wanted to make a DLL that scaled an object in DBPro. How would I get this DLL to recognize the 3D object and then how would I get it to change it?

I don't know how to recognize anything more than strings and integers.


If anyone could give me examples for objects, or more specifically give me a coded example in like psuedocode to my example question.

If you are stumped on what I am talking about let me know.


Thanks,
The Lone Programmer

"Is The Juice Worth The Squeeze"
-The Girl Next Door
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 16th Jan 2006 19:40
Something like this...

Declare this



The somewhere create an instance of it



And then somewhere assign this prototype a pointer to the actual DBPro core function.



It can then be called like a standard function.

The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 16th Jan 2006 20:01
Since my knowledge on C/C++ is very low, I do not know what most of what you just gave me means.

In fact I don't know what any of it means. Can you define your terms and tell me what the parameters of the commands you gave are?

I use Delphi which isn't too different, but like I said I haven't ever done anything more than Strings and Integers.


Thanks,
The Lone Programmer

"Is The Juice Worth The Squeeze"
-The Girl Next Door
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 16th Jan 2006 22:14
I don't know too much really too - I'm just going by what Mike J gave me

Anyway, you know in a C program where you type all you #includes, definitions etc? Usually at the top of the program? Well put this



That creates a new typedef laying out what params your function will take and what it'll send back and then creates an instance of it called dPositionObject.

Then, somewhere, perhaps in an initialisation function grab the pointer to the function you want to call and give it to dPositionObject.



Then it's just used like a simple function. If you want to change the function you're using just change the name in GetProcAddress from ?Position(etc) to the garbled name of the function you want to call.

And if the function is in basic3d.dll then you'd use g_Basic3D etc. - there's a list of namespaces in globstruct.h so you can have a look.

Habatar
20
Years of Service
User Offline
Joined: 9th Aug 2004
Location: Madrid (Spain)
Posted: 17th Jan 2006 07:22
Is in this way.
First: Include DirectX to your proyects. I assumme that you alredy have.
Second: Include globstruct.h to your program.
Third: Add this functiĆ³n after DLL Main Class

Four: Create a .DEF file for your DLL exported function and add your functions to the file. The .DEF file will start:

Five: Do the same as David T

Login to post a reply

Server time is: 2024-11-24 20:14:37
Your offset time is: 2024-11-24 20:14:37