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 / dbp not recognizing my returned value

Author
Message
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 5th Nov 2005 08:54 Edited at: 5th Nov 2005 08:57
I have this bit of code in my dll:

and here is the code in dbp

when I try to compile dbp app, i get the error:
"User function 'print text' must return a value if used in an expression at line 1"
I checked the string in the dll using notepad and used the new decorated string in the .rc file.
If I call the other example function GET VALUE, it returns value just fine without error.
What am I missing here?

p.s. this is just a practice dll to get the hang of interacting with dbp.

Torrey
20
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 5th Nov 2005 10:43
What does your string table look like?


Check out my site!
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 5th Nov 2005 11:13
STRINGTABLE
BEGIN
IDS_STRING102 "PRINT TEXT%S%?PrintText@@YAHPAD@Z%String"
IDS_STRING103 "GET VALUE[%L%?GetValue@@YAHXZ"
END

Scilynt
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 5th Nov 2005 15:42
String tables wrong, for your print text command it should be:

IDS_STRING102 "PRINT TEXT[%LS%?PrintText@@YAHPAD@Z%String"

If you're returning a value then you need a [ before the first % and the first letter in the parameter type list should be the return value type.
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 5th Nov 2005 22:14
Thanks SilentS, that did the trick.

Login to post a reply

Server time is: 2024-11-24 10:09:21
Your offset time is: 2024-11-24 10:09:21