forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Beginning DLL developer

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up
View previous topic :: View next topic  
Author Message
DavidR
Contributor
Contributor


Joined: 05 Aug 2003
Posts: 81
Location: Hershey Pennsylvania U.S.A.

PostPosted: Fri Apr 25, 2008 4:46 pm    Post subject: Beginning DLL developer Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group