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.

Author
Message
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 3rd Jun 2003 15:20 Edited at: 3rd Jun 2003 15:21
oki 2 very small and short C++ files...




now the string table looks a little like this
FunctionA[%D%?FunctionA@@YAHXZ
FunctionB[%D%FunctionB

FunctionA works... FunctionB doesn't... but if it is just FunctionB in the string table then it does
i'm guessing that this is a bug no?

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Jun 2003 15:23
I found that functions names (when put into the string table) have to be in the mangled format (ie no extern "C") - which FunctionB isn't.

However, some people have reported that the straight name works - I haven't tried this; I keep to mangled names (as per the documentation).

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
n3t3r453r
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Russia
Posted: 3rd Jun 2003 15:32
@MrTAToad
Yes, "straight name works" for me.

@Raven
try this:
FunctionB[%0%FunctionB
or
FunctionB[%0L%FunctionB

I'd like to change the world, but God doesn't want to give me sources!
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Jun 2003 15:54
Your string tables wont work - Function B returns a DWORD...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 3rd Jun 2003 15:58
thats the odd thing Toad... because if you make everything an extern "C" and set the string table then they all work - but if you don't then they won't.

just move where the FunctionA name is too see what i mean, just seems weird to me - if i can't figure this out all my external name functions

Set AntiAlias Mode 2

will have to be seperate from my standard functions

Set AntiAlias Mode(2)

isn't really much but is a bloody annoyance if you know what i mean

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 3rd Jun 2003 16:06
oki i have it
an extern "C" must have a value passed to it...





FunctionA[%D%?FunctionA@@YAHXZ
FunctionB[%DL%FunctionB

that'll now work ... gonna see why a void value doesn't

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
n3t3r453r
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Russia
Posted: 3rd Jun 2003 17:25
???? WHAT ????

This works. I've just tested it.



string table:

test for raven[%0%testForRaven
!!! NOTICE: here is zero, not "O"

I'd like to change the world, but God doesn't want to give me sources!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 3rd Jun 2003 18:12
LOL - C makes life so difficult.

If you were to use Pascal

function name(param: int): cdecl;

export name;

NAME[%D%name

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 3rd Jun 2003 18:53
if i felt like it i could just code this in Pascal terms instead, but to be honest i don't like Pascal even slightly so i'm not going to.

also i know that the perameters are 0 not O ... but it doesn't work for me, perhaps its the versions of C++ your using or something.
annoyingly everytime i feel like i've figured something within DLLs and think "finally i have a rule for this", the bloody thing changes the rules on me i swear just to be pissy.

now both versions demand a return type - or atleast the editor does, i have a feeling all of them are against me

any ideas on howto create functions where all the fields aren't nessisary?
the only idea i've come up with it 3 different functions all using the same passer name in DBP ... but i'm not entirely sure that'll work - and i'm sure there is a better way to do it.

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Jun 2003 18:53
Cant say I've had those problems - I know I cant get it to accept functions that have no parameters and return no parameters.

n3t3r453r - your string table is different from your function by the way - your telling DBPro not to return anything, even though the C function can. The two should always match.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 3rd Jun 2003 20:08
"I know I cant get it to accept functions that have no parameters and return no parameters."

Surely it is just a case of NAME%0%dllfunction? - Works for me.

Raven - have you looked at the example code? Also, why do you pass stuff as dwords? Why not use L as the type - as integers are represented by dwords in DBP IIRC.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Jun 2003 20:47 Edited at: 3rd Jun 2003 20:50
Yes, it does work (although for some reason instead of calling the function moo(), you have to call it using moo).

Another inconsistency...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Jun 2003 20:51
That's because you are trying to call a function and you've defined a command.

You should just use 'moo' instead of 'moo()'.
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Jun 2003 20:53
Then empty functions should be defined the same - but they have to be called moo()

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Jun 2003 21:23
This is an empty command:

MOO%0%?xxxxxxxx%

This is an empty function:
MOO[%L%?xxxxxxxx%

Functions *must* return a value, so that's as close to 'empty' as you can get.
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Jun 2003 21:26
you dont have to with the function command though.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 3rd Jun 2003 22:03
for some reason extern "C" commands must also return a value ... i'm a little unsure to why too.
not like its a big problem, just annoying

i'm uploading a test right now for everyone, its not a hugely complex function and surprisingly for such a simple function something i just can't seem to do correctly without the MFC Classes - but that aside its a test for other plugins i'll be releasing soon, so let me know if you like the style ... i might change my help to something more MSDN-ish as i've been getting pretty good at Java using internet stuff over the past few days

but for now i've just gone with a DBP style - Alexis has gone away and left my connection set to 4.0kbps so this'll take a few mins, i'll post again once i'm done.

the function itself you can have either 3 or 4 variables going in, not efficient but does what it should (kinda)
and before anyone says "there's a bug with the help button!" i know its there its something i can't figure out howto get around because the instance stops everything even within the DLL function, i tried a SUCCEEDED( ) function to get around it but no joy.
i'm sure given a lil while i'll get it and just release an update DLL, probably once i've written up the help for all the other dialog windows.

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 3rd Jun 2003 22:22
oki here it is http://members.lycos.co.uk/timesaga/forum/viewtopic.php?t=49

i'm not sure about the hotlinking for files on Lycos so i've added a thing in my forums about it .. as i said the emphasis here isn't on the actual function but the layout of the help and general setup.

want to know if you guys like it or not, probably best to know on Lycos forums too.

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Jun 2003 22:31
The direct link doesn't work for me - I'm just downloading now.

Login to post a reply

Server time is: 2026-07-11 14:56:09
Your offset time is: 2026-07-11 14:56:09