DavidR Contributor
Joined: 05 Aug 2003 Posts: 83 Location: Bethel Pennsylvania U.S.A.
|
Posted: Fri Apr 25, 2008 4:46 pm Post subject: Beginning DLL developer |
|
|
Greetings,
I've been playing with teaching myself dll development recently and have built a very simple (standard windows) dll. It does nothing except return a hard-coded value.
Example: In the dll the Integer variable "Result" is simply defined as Result = 100
In VDS I do this:
Code: | LOADLIB Mytest.dll
INFO @LIB(Mytest.dll, Result, INT:)
FREELIB Mytest.dll |
This returns 100 as expected.
However if I attempt to use a String variable like this: Result = "HELLO"
and use the following in VDS
Code: | LOADLIB Mytest.dll
INFO @LIB(Mytest.dll, Result, STR:)
FREELIB Mytest.dll |
Instead of returning HELLO it simply returns the first character (in this case H).
I must confess I've not been able to get my head around the @ADDR() and @BINARY() functions which I suspect I'll need to use to get this to work. The MSDN information I've been able to find indicates that strings are returned differently from Integers but I've not been able to figure out what I need to do on the VDS end in order to make it happen.
Any suggestions?
Thanks...
..............David |
|