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 


my VDS DLL's not compatible with VDS 5
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Jul 01, 2003 12:03 pm    Post subject: Reply with quote

Yes, it looks like an effect of bad code taken from a very early DLL programming example. I personally haven't used that code in any of my DLLs, hence I never encountered the problem. I can't quite figure out what's going wrong, but Tommy's solution certainly seems to fix it.
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Tue Jul 01, 2003 1:49 pm    Post subject: Reply with quote

The example source code in question is still being distributed:

http://www.dialogscript.com/dl/extdoc10.zip

Most of all VDS DLLs written in Delphi are based upon this example.

However I've heard from Commercial Research Ltd. (unofficially) that this SDK is being
updated.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Wed Jul 02, 2003 2:13 am    Post subject: Reply with quote

Excellent news!

I just made the changes Tommy told me to... And VDSMEDIA is now compatible with VDS 5, and will be available real soon!

All my other extensions will be modified also. For those who paid for any of my extensions, you will receive the new version of the DLL by email... of course free of charge Wink



Also VDSXSHOW isn't freeware anymore, it will be updated with new commands and functions... but that is more for the future.... Wink

Thanks. Very Happy


Last edited by marty on Thu Apr 12, 2012 1:53 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Jul 02, 2003 11:48 am    Post subject: Reply with quote

Really excellent, great job, Marty! I'm very happy to hear this news! Very Happy

Thanks for taking the time for this! Thumbs Up

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Jul 02, 2003 2:06 pm    Post subject: Reply with quote

jules wrote:
Tommy's solution certainly seems to fix it.



What is Tommy's solution? I see all these post back and forth and I have downloaded his example that points out the problem with the MaxPar varaible being used instead of a real errorcode but I must be blind or something be cause I don't see any solution being posted.

Here is what I have found to be the problems with my DLL's. The Init function returns this for most Delphi DLL's

Result:='MYCOMMAND';

This should be a pointer to an actual character array and not to something volitile like this code. If this string that is returned has to be read by the runtime again then that memory may no longer be valid or worse garbage.
IMHO You really should put the name of your command/function in a global or static character array and return a pointer to that character array as the result of the Init function. Also for that matter you should do the same for the FuncProc function since it returns the same variable type.

As for my DLL's I did not have to do anything with the MAX_PAR variable or anything like that and the DLL's are working and returning the error codes that I have defined.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Jul 02, 2003 2:08 pm    Post subject: Reply with quote

mindpower wrote:
What is Tommy's solution? I see all these post back and forth and I have downloaded his example that points out the problem with the MaxPar varaible being used instead of a real errorcode but I must be blind or something be cause I don't see any solution being posted.


Check out http://developer.vdsworld.com/ Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Wed Jul 02, 2003 2:21 pm    Post subject: Reply with quote

marty wrote:
...VDSMEDIA is now compatible with VDS 5, and will be available real soon!

All my other extensions will be modified also. For those who paid for any of my extensions, you will receive the new version of the DLL by email... of course free of charge Wink

Woohoo! Right on Marty... thank you very much for updating your excellent extensions! Very Happy

_________________
"ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player...
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Jul 02, 2003 2:31 pm    Post subject: Reply with quote

FreezingFire wrote:
mindpower wrote:
What is Tommy's solution? I see all these post back and forth and I have downloaded his example that points out the problem with the MaxPar varaible being used instead of a real errorcode but I must be blind or something be cause I don't see any solution being posted.


Check out http://developer.vdsworld.com/ Smile


Thanks FF

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Jul 02, 2003 2:33 pm    Post subject: Reply with quote

No problem. Wink
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu Jul 03, 2003 3:08 am    Post subject: Reply with quote

mindpower wrote:
What is Tommy's solution? I see all these post back and forth and I have downloaded his example that points out the problem with the MaxPar varaible being used instead of a real errorcode but I must be blind or something be cause I don't see any solution being posted.


The problem in the Delphi based DLLs seems a bad NextParam function. This doesn't
apply to DLLs made in C/C++ as they use a whole new NextParam function anyway.

mindpower wrote:
Here is what I have found to be the problems with my DLL's. The Init function returns this for most Delphi DLL's

Result:='MYCOMMAND';

This should be a pointer to an actual character array and not to something volitile like this code. If this string that is returned has to be read by the runtime again then that memory may no longer be valid or worse garbage.
IMHO You really should put the name of your command/function in a global or static character array and return a pointer to that character array as the result of the Init function. Also for that matter you should do the same for the FuncProc function since it returns the same variable type.


This code is fine. The "MYCOMMAND" string constant will be compiled in the code.
It will never be changed during the execution of the DLL. Of course if this would be
a dynamic value, such as in FuncProc, this would be different.

mindpower wrote:
As for my DLL's I did not have to do anything with the MAX_PAR variable or anything like that and the DLL's are working and returning the error codes that I have defined.


The problem isn't really related to the maxpar value, but it's what makes the problem
confusing. VDS would never return errorcode 27 anymore if there's an exception
error in the DLL, instead it would return the maxpar based value. Errors returned
explicitely by the DLL, of course, will work just fine.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
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