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 / return strings in a dll as simple as: return dbpstring("hello world");

Author
Message
Three Score
19
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 13th Jun 2005 04:07 Edited at: 21st Dec 2005 19:53
Hi there everyone
I have made a very useful function for people who need help returning strings(such as me) this was made in devc++ but it should work in msvc++6
Returning strings is easy now though
in msvc++ u wont need to do anything really all u do is use this code


and u do not need to put dbpstring or receivecoredatapointer in your stringtables but u need to get the function name and make stringtables for your functions as u normally would

it is pretty easy for msvc++ right?
well it is just a tad bit harder in devc++
first of all u need a .def file so make file and rename it whatever.def and then goto project options then to the paremeters tab and in the linker box add this: --def whatever.def

then add this code to whatever.def

.def files completely override __declspec() sou can attach it or u can decide not to
name=mangledname is whatever u want the name of the function to be(this should be used as: fname%0%NAME_YOU_PUT_THERE) and the mangled name can be found by opening the binary dll up in notepad and searching for your function name

and u also need to include globstruct and if u havent installed and configed directx 9.0 SDK then u need to(add the include path to the devc++ includes, add path to the directx libs in both c and c++)

i hope everyone can understand the devc++ part

also to return a string u need to return a dword in your function
EDIT:
example


example def file


and example string table


and thats it

tutorials,programs,useful but simple php scripts, a place for code snipplets and more at
http://hackr83.0z0.co.uk
(still under construction)
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 13th Jun 2005 04:11
he he , Thanks m8. You just got me in the mood for coding a dll

DirectX in the learning
Three Score
19
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 13th Jun 2005 04:33
well your welcome
it also got me in the mood for completing assorted dll.dll with open/save dialogs and returning common directories(such as system32,windows,temp ect)
actually i did this for myself then i just remebered how many people have problems with strings so i posted it(i bet it will decrease the "how do u return strings" posts)

formerly shadows of emptiness
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 13th Jun 2005 04:38
hey again,

I am working on my own GUI for open and save dialogs and other things such as buttons etc.

DirectX in the learning
Three Score
19
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 13th Jun 2005 12:49
awesome
I would like to see it when u are done
or is it going to cost money(i might buy it if it is what i need)

formerly shadows of emptiness
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 13th Jun 2005 15:41
No, It is going to be free , It will not be as good as BlueGUI but it will have the main stuff.

DirectX in the learning
Three Score
19
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 13th Jun 2005 16:15
thats all that most people need

formerly shadows of emptiness
Three Score
19
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 14th Jun 2005 07:18
65 veiws and only 7 posts
a comment or so would be nice

formerly shadows of emptiness
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 17th Jun 2005 21:52
Nice Will be useful as I'm doing a lot of returning strings wrapping Lua for DBPro...

"A book. If u know something why cant u make a kool game or prog.
come on now. A book. I hate books. book is stupid. I know that I need codes but I dont know the codes"
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 18th Jun 2005 04:42
Thanks I am wokring with TCP dll's at the moment... This help

Login to post a reply

Server time is: 2024-04-25 15:25:30
Your offset time is: 2024-04-25 15:25:30