problem with strings greater then 32ks
-
hello there .. there is a slight problem that i am facing with strings greater then 32k i have a variant bstr containing a string which is greater then 32ks.. 1. how do i store this thing? into a buffer?, but then how do i get the size of the bstr string so that i can create a buf of that size? 2. how do i truncate this bstr string into strings of sizes 32ks? thanks for the time regards
-
hello there .. there is a slight problem that i am facing with strings greater then 32k i have a variant bstr containing a string which is greater then 32ks.. 1. how do i store this thing? into a buffer?, but then how do i get the size of the bstr string so that i can create a buf of that size? 2. how do i truncate this bstr string into strings of sizes 32ks? thanks for the time regards
safeeullah wrote: 1. how do i store this thing? into a buffer?, but then how do i get the size of the bstr string so that i can create a buf of that size? Why are you wanting to store something that is already stored? If the
bstr
variable already holds the data, why are you wanting to create another variable to hold that same data?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
safeeullah wrote: 1. how do i store this thing? into a buffer?, but then how do i get the size of the bstr string so that i can create a buf of that size? Why are you wanting to store something that is already stored? If the
bstr
variable already holds the data, why are you wanting to create another variable to hold that same data?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
yes i have it in a bstr...now i need to break that string into 32k segments..for further manipulations.. how to do it? regards safee
-
yes i have it in a bstr...now i need to break that string into 32k segments..for further manipulations.. how to do it? regards safee
Something like this, maybe:
BSTR b = SysAllocString(\_T("This is a 32k string")); TCHAR left\[11\], right\[11\]; \_tcsncpy(left, b, 10); left\[10\] = '\\0'; \_tcsncpy(right, b + 10, 10); right\[10\] = '\\0';
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
hello there .. there is a slight problem that i am facing with strings greater then 32k i have a variant bstr containing a string which is greater then 32ks.. 1. how do i store this thing? into a buffer?, but then how do i get the size of the bstr string so that i can create a buf of that size? 2. how do i truncate this bstr string into strings of sizes 32ks? thanks for the time regards
beter to store that much in file..... read from a file.