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 


VDSNET.dll

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Tue Apr 29, 2003 5:42 pm    Post subject: VDSNET.dll Reply with quote

Hey Tommy,
Is there a limit to how much the network send function can send?
I was just playing with it, and found that if i pass lots of text through it, it causes a exception 27.
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Apr 29, 2003 5:46 pm    Post subject: Reply with quote

If I remember right, it was about 256 characters... But again, I'm not sure about that....
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Tue Apr 29, 2003 9:12 pm    Post subject: Reply with quote

256, seems a bit of an odd number. I could have understood if is was something like 255. Any idea why such a limit?
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Wed Apr 30, 2003 3:13 am    Post subject: Reply with quote

That's a vds buffer size limit. You will notice now in the new vdsipp that this is also the limit. It previously was around 9 hundred million characters but once you guys try VDS 5 out you will see the old vdsipp will crash and burn because of that buffer I had in there. I had to fix the vdsipp to use 256 characters at the limit otherwise vds/the compiled script would crash.
Back to top
View user's profile Send private message
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Wed Apr 30, 2003 6:49 am    Post subject: Reply with quote

Oh right now I see. Thank you for yout input PGWARE.
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


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

PostPosted: Wed Apr 30, 2003 2:08 pm    Post subject: Reply with quote

PGWARE wrote:
That's a vds buffer size limit. You will notice now in the new vdsipp that this is also the limit. It previously was around 9 hundred million characters but once you guys try VDS 5 out you will see the old vdsipp will crash and burn because of that buffer I had in there. I had to fix the vdsipp to use 256 characters at the limit otherwise vds/the compiled script would crash.


PK, you can safely make the buffer size 4096. I have been using this value with Gadget and tested it with the old beta of VDS 5. It works for my DLL's.
Remember in most lanugages a character string can only be 4096 characters in size and all VDS functions return a string. This is the reason that my callback functions die on Windows 2k and above because the callback functions concatenate all the parameters into one string and that string gets to large to fit in the buffer. So you should be able to set the buffer to 4096 characters safely unless there has been recent changes to VDS 5 that limits this and if so that needs to be changed back right away Wink

_________________
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
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Thu May 01, 2003 3:54 am    Post subject: Reply with quote

Mindpower I don't know if that is correct. I tried many variations below 4096 characters and it would work occasionally, but then it would crash for no reason at all. Changing the buffer to 256 fixed it completly.
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


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

PostPosted: Thu May 01, 2003 4:58 pm    Post subject: Reply with quote

PGWARE wrote:
Mindpower I don't know if that is correct. I tried many variations below 4096 characters and it would work occasionally, but then it would crash for no reason at all. Changing the buffer to 256 fixed it completly.


Hmmmm That is not good... I have not really had this problem. Also note that my Procedure to read the parameters and arguments also reconize this limit as well. It will not try to read beyond that. Maybe it is a limitation in Delphi for strings. You could try and substitue the character array for a byte array? C/C++ actually treats a character array as a byte array anyway. The limit in LccWin32 of 4096 is artificial. It's internal stack cannot handle character arrays beyond the 4096 byte... I actually use this in my DLL'S.

Code:

const int BUF_LEN = 4096;  // length of transfer buffer


And the actuall buffer that I copy the parameters and arguments to is defined like so..

Code:

  char Cparambuf[BUF_LEN-1];


Note the BUF_LEN-1 is because I don't want to ever read beyond the buffer. I want it to always be 2 characters below.... Also I have conditions that check to make sure the parameter list does not go beyond this value and just truncate the parameter list....

I need to know for sure if the buffer length is set to what you pass in the Init function? If it is not then this is very bad and will hender and limit Gadget and all VDS DLL's that need to go beyond the 256 bytes buffer length. I always was under the impression that the 256 byte limit was for the 16bit versions of VDS and this option was so you could make a single DLL for both 16bit and 32bit???? Question

So someone please tell me this isn't so Wink

Quoted from the VDS ExtDoc.doc file

Quote:
Bufsize tells VDS the size of the buffer used to pass the parameters or arguments from VDS to the DLL. (In the 16-bit version the maximum buffer size is 255 bytes.) Within the buffer, the parameters or arguments are passed as a series of null-terminated strings. The non-exported function NextParam in the example can be used to read each parameter or argument from the buffer, one at a time.

_________________
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
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Fri May 02, 2003 4:34 pm    Post subject: Reply with quote

If the buffer can be incresed using a different method, maybe that could be implemented at some stage.
Back to top
View user's profile Send private message
Tommy
Admin Team


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

PostPosted: Fri May 02, 2003 11:06 pm    Post subject: Reply with quote

I guess the only way to allow for an unlimited text transfer is to use temporary intermediate
text files. It's possible that VDS 5 will change that though. Wink Also I think it is already possible
for functions in DLLs using a certain technique to return an unlimited amount of data.
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 -> General Help 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