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
Dark Esch
22
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 5th Sep 2003 01:14
how i can return a string in a dll? i will use a dll in db pro.

there is a free dll file that create windows button , menus and ...?
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 5th Sep 2003 01:24
Quote: "how i can return a string in a dll"

See the technical documents. Its a bit of a pain, but not too bad.

Quote: "there is a free dll file that create windows button , menus"

Dont know of a free one, but have a word with RobK.


Avatar & Logo by Indi. Come to the UK DBPro Convention in Chichester
Dark Esch
22
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 5th Sep 2003 07:18 Edited at: 5th Sep 2003 07:21
do you have a better example to show me?
swdave
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United States
Posted: 5th Sep 2003 09:47
It would be nice if there was a .dba there that actually used the functions. This is just a renamed snip from the example. So follow the SDK you need this -> //Include Core (NOT optional).





IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Sep 2003 09:58
Theres quite a bit of example code on my site - full code for the Utility DLL, a basic framework (commented) to build from, and example DLLs within the Interface library download.
Dark Esch
22
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 6th Sep 2003 08:57
this
MYCOMAND MyFuction( LPSTR str )
{
return (DWORD)str;
}

the code dont return a string.
hel me))))))))
Dark Esch
22
Years of Service
User Offline
Joined: 4th Sep 2003
Location:
Posted: 6th Sep 2003 08:57
this
MYCOMAND MyFuction( LPSTR str )
{
return (DWORD)str;
}

the code dont return a string.
help me))))))))
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 6th Sep 2003 09:21
no because you have to create the string in the string buffer of the TPF SDKs GlobStruct first.

an LPSTR doesn't not = DWORD ... and well ignore the fact for the second that you need a pointed (DWORD*) but never mind that for the second.

the DWORD of the String isn't the String itself, simply the current address to the dynamic memory used to create it...

1) clear the StringBuffer
2) create the StringData
3) create a new StringBuffer

there is an example in the SDK but incase you missed it it goes like this...



thats all there is to it...

swdave
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United States
Posted: 6th Sep 2003 11:32
Thanks Raven

Obviously you have never compiled or used this code before.

Its not a good idea to use strcpy on lpStr if it doesnt exit.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 6th Sep 2003 11:39
the string exists, the problem was actually a typing error ... i can't be bothered to correct it.
and it wasn't ment as a "take this and use this" it was ment as a guide/template.

add to this all i did was actually copy and comment Lee's code, which i've tested before and works - so erm if it doens't for you then there is a problem with your compiler i think.

Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 6th Sep 2003 12:31 Edited at: 6th Sep 2003 12:32
I have a freeware DLL which will create menus, there is also a seperate GUI DLL which creates buttons, windows etc, which I sell for £7.50.

http://blue.robert-knight.net

Login to post a reply

Server time is: 2026-07-23 07:42:48
Your offset time is: 2026-07-23 07:42:48