| View previous topic :: View next topic |
| Author |
Message |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Tue Apr 29, 2003 5:42 pm Post subject: VDSNET.dll |
|
|
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 |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Tue Apr 29, 2003 9:12 pm Post subject: |
|
|
| 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 |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Wed Apr 30, 2003 3:13 am Post subject: |
|
|
| 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 |
|
 |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Wed Apr 30, 2003 6:49 am Post subject: |
|
|
| Oh right now I see. Thank you for yout input PGWARE. |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Apr 30, 2003 2:08 pm Post subject: |
|
|
| 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  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Thu May 01, 2003 3:54 am Post subject: |
|
|
| 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 |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu May 01, 2003 4:58 pm Post subject: |
|
|
| 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????
So someone please tell me this isn't so
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 |
|
 |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Fri May 02, 2003 4:34 pm Post subject: |
|
|
| If the buffer can be incresed using a different method, maybe that could be implemented at some stage. |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Fri May 02, 2003 11:06 pm Post subject: |
|
|
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. 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 |
|
 |
|