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 / does VC++ Change my dll function names?

Author
Message
Caleb1994
10
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 31st Mar 2009 18:38
I was looking through the documentation of dbc and found the dll example and i tried to make one. well i'm not sure how to compile to a dll but i just went into the Project\debug\ and got the dll and tried to use it and it didn't work


i saw in the dbc documents that there names are

?FunctionReturnFloat@@YAKM@Z

but the function name in vc++ is

FunctionReturnFloat

if so how do i get those new names?

New Site! Check it out \/
IanM
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Mar 2009 19:52
You just did - you looked in the DLL and get the name.

The point of the name change is that when you overload a function, you can differentiate between the two.


If you don't overload (I don't for my exported functions) then you can instruct VC++ to output the function name unchanged:


Caleb1994
10
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 31st Mar 2009 20:43
oh ok sweet thanks! now i just need to find how to compile to a dll! lol (see other post if you know how i'm geussing you do lol)

New Site! Check it out \/
skully
12
Years of Service
User Offline
Joined: 21st Jul 2006
Location: y+width*x
Posted: 1st Apr 2009 20:51
ok,say you have VC, no? best...

This is a example, no use DB DLL !!!

Firts, create a DLL project (win32), in the project you create two files, one, the source and other for the stringtable, where indicate in the DLL, the functions to export !!!

The source:


...and the stringtable



push F7 in the VC, and go... copy the file.dll from directory debug of the you project, to the directory plugins-user of the DBpro and finish... now in the DB




Caleb1994
10
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 2nd Apr 2009 06:03 Edited at: 2nd Apr 2009 06:12
you are amazing skully hahaha thanx!


Edit:

Will this same method work with dbc too(not sure if you know dbc or not)

Edit2:


aaaahhhh i can't find how to add a string table. i go to add>New Item> and there isn't a string table option in there. any ideas?

New Site! Check it out \/
skully
12
Years of Service
User Offline
Joined: 21st Jul 2006
Location: y+width*x
Posted: 2nd Apr 2009 08:50
Do not panic!!! click right in the folder (in you project) Resource filesand select Add files to folder... write a name, example mydll.rc o anyso, and then again on click right in mydll.rc and select insert...string table(no in file view)...

and moreover, as the picture above, good luck!
Caleb1994
10
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 2nd Apr 2009 21:44 Edited at: 3rd Apr 2009 02:53
hahaha thanks!


it's working now i got to calling it in db. it was just a messagebox call and it worked but how do i pass strings into the function. well i got it to pass. but what i did was create 2 new variables in the function as LPCWSTR and set them equal to the inputed character like this

LPCWSTR title = LPCWSTR(InputedString)

but in the message box it just comes up as abunch of boxes like it doesn't understand the characters. i also tried using MessageBoxW and MessageBoxA neither work they display the same boxes.


Edit:

i also tried not using other variables and just putting the char variables that were input into the function using _T() function but that returns a error from the _T() function something about LTitle identifier does not exist. i was using the _T() function just like this _T("My Message Title") but that doesn't let someone get make there own titles lol

Edit2:

I added a a resource file (using your example name) and i right clikced on it but i can't find any add string table button. sorry if this is dumb noob questions hahaha. heres a sceeny of the screen i'm seeing



New Site! Check it out \/
Quirkyjim
10
Years of Service
User Offline
Joined: 18th Oct 2008
Location: At my computer
Posted: 6th Apr 2009 01:10
I think that Skully was using VC++ Pro. In Express, you'll have to create it yourself. I know I have a few tutorials in my bookmarks...

Try this thread, specifically this;



That's what they WANT you to think...
Caleb1994
10
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 6th Apr 2009 03:01
What is the resource id definition? how do i get it? everything else makes sense exept that

New Site! Check it out \/
skully
12
Years of Service
User Offline
Joined: 21st Jul 2006
Location: y+width*x
Posted: 6th Apr 2009 21:31
I use Visual C++ 6.0 standard edition, is a old version of Visual C... is a enviroment style win95

Hey caleb, put something on your side... are you a child or anyso !!

a ID, is a abbreviation, IDentification... in the window of the file, you must define the commands to export, must be listed, following the example above, you must be well ...



taste and reply...
Caleb1994
10
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 6th Apr 2009 22:23 Edited at: 6th Apr 2009 22:25
i know what id is lol

i was saying what is RESOURCE id i thought it was specified by the program i didn't know that i was supposed tospecify them. lol sorry


What do you mean put something at my side (that probly makes me sound even morestupid but idc lol)

New Site! Check it out \/
skully
12
Years of Service
User Offline
Joined: 21st Jul 2006
Location: y+width*x
Posted: 7th Apr 2009 21:02 Edited at: 7th Apr 2009 22:48
hahaha i so sorry (say so?), apology my english... in spanish is as "Pon algo de tu parte", but in english, i dont know... mean, put somthing of you "part"?¿ (work work)!!! hahahah I think the Visual C 2008, does not support files "rc", while, investigate. You can use the DEV C(is free), is a alternative...

good luck

p.d. it's a bit up to you --> "Pon algo de tu parte"
Caleb1994
10
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 7th Apr 2009 21:20
i actually didn't notice that english wasn't your first language till this post

But ya if i understand correctly. VC++ doesn't support resource editing (I tried that thats what it said) i think i can edit it in notepad though

New Site! Check it out \/
Diggsey
13
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Apr 2009 01:50
The express versions don't support resource editing, but Dev-C++ is certainly NOT the way to go!

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
Caleb1994
10
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 8th Apr 2009 03:14
Why?

And What Do you prefer?

New Site! Check it out \/
AndrewT
12
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 12th Apr 2009 04:17
You don't need a resource editor to make a string table, just edit it as a text file with VC++, just tell VC++ Express to edit it with the text editor.

i like orange
Caleb1994
10
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 12th Apr 2009 04:32
Oh Ok thanks lol

New Site! Check it out \/

Login to post a reply

Server time is: 2019-06-17 02:53:03
Your offset time is: 2019-06-17 02:53:03