I have this bit of code in my dll:
MYCOMMAND int PrintText( LPSTR pString )
{
if(pString)
{
myvar=*pString;
return sizeof(myvar);
}
if(!pString)
{
return 0;
}
and here is the code in dbp
a=print text("how many chars?")
print a
wait key
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.