ASCIIZ limits 
Author Message
 ASCIIZ limits

My app crashes when using ASCIIZ * 5000 instead of 256

Found nothing on limmitations of ASCIIZ

Why is this, i need a larger buffer when filling up buffers with API.

Is there another way to fill a string buffer used with API's

e.g.
Getmodulename (Buffer$, Len(Buffer$)) won't work!
Asciiz does!

(PBDLL20)



Mon, 11 Jun 2001 03:00:00 GMT  
 ASCIIZ limits
When passing ASCIIZ lengths to API functions, use the
SIZEOF(asciizstring) instead of LEN().

Len reports the length of the *contents* of the variable, whereas
SIZEOF() reports the maximum length of the variable.  This is very
importent when it comes to API calls that fill a buffer with data.

--Lance.


Quote:
>My app crashes when using ASCIIZ * 5000 instead of 256

>Found nothing on limmitations of ASCIIZ

>Why is this, i need a larger buffer when filling up buffers with API.

>Is there another way to fill a string buffer used with API's

>e.g.
>Getmodulename (Buffer$, Len(Buffer$)) won't work!
>Asciiz does!

>(PBDLL20)

==============================
Lance Edmonds, Email contacts:



==============================
Please remove "SPAMLESS." when
    replying by email.
==============================


Mon, 11 Jun 2001 03:00:00 GMT  
 ASCIIZ limits
You're right, but i know this difference. (My previous example was about a
string in VB)

When i open a file using API and Use an ASCIIZ string * 5000 as buffer , the
app crashes.

lread can only fill (in PBDLL20) ASCIIZ buffers.

Here goes my question, how is it that i can fill within VB30 a Buffer As
String and not in PBDLL20?
I like to know why i can't fill a string this way, sure i can use ASCIIZ but
i don't like to be limmited.

Thanks, E.B. Knoppert Netherlands.

Quote:

>When passing ASCIIZ lengths to API functions, use the
>SIZEOF(asciizstring) instead of LEN().

>Len reports the length of the *contents* of the variable, whereas
>SIZEOF() reports the maximum length of the variable.  This is very
>importent when it comes to API calls that fill a buffer with data.

>--Lance.


>>My app crashes when using ASCIIZ * 5000 instead of 256

>>Found nothing on limmitations of ASCIIZ

>>Why is this, i need a larger buffer when filling up buffers with API.

>>Is there another way to fill a string buffer used with API's

>>e.g.
>>Getmodulename (Buffer$, Len(Buffer$)) won't work!
>>Asciiz does!

>>(PBDLL20)

>==============================
>Lance Edmonds, Email contacts:



>==============================
>Please remove "SPAMLESS." when
>    replying by email.
>==============================



Fri, 15 Jun 2001 03:00:00 GMT  
 ASCIIZ limits
ByVal Strptr(Strrinngggg$) works.


Quote:
>You're right, but i know this difference. (My previous example was about a
>string in VB)

>When i open a file using API and Use an ASCIIZ string * 5000 as buffer ,
the
>app crashes.

>lread can only fill (in PBDLL20) ASCIIZ buffers.

>Here goes my question, how is it that i can fill within VB30 a Buffer As
>String and not in PBDLL20?
>I like to know why i can't fill a string this way, sure i can use ASCIIZ
but
>i don't like to be limmited.

>Thanks, E.B. Knoppert Netherlands.


>>When passing ASCIIZ lengths to API functions, use the
>>SIZEOF(asciizstring) instead of LEN().

>>Len reports the length of the *contents* of the variable, whereas
>>SIZEOF() reports the maximum length of the variable.  This is very
>>importent when it comes to API calls that fill a buffer with data.

>>--Lance.


>>>My app crashes when using ASCIIZ * 5000 instead of 256

>>>Found nothing on limmitations of ASCIIZ

>>>Why is this, i need a larger buffer when filling up buffers with API.

>>>Is there another way to fill a string buffer used with API's

>>>e.g.
>>>Getmodulename (Buffer$, Len(Buffer$)) won't work!
>>>Asciiz does!

>>>(PBDLL20)

>>==============================
>>Lance Edmonds, Email contacts:



>>==============================
>>Please remove "SPAMLESS." when
>>    replying by email.
>>==============================



Fri, 22 Jun 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ASCIIZ limmits in Function declaration

2. ASCIIZ strings in Forth

3. about floats and ASCIIZ

4. ASCIIZ string (TASM)

5. ASCIIZ

6. ASCIIZ

7. ASCIIZ number to Hex

8. Extension of non-limited type needs limited component

9. Subtype of limited type non-limited?

10. limited/non-limited in Ada95

11. Read ASCIIZ (Null-terminated) string from a file handle?

12. View extent limit?

 

 
Powered by phpBB® Forum Software