Is there a way that I can determine the length of a string array? I ask because I want to have a function perform operations on each letter in a name. I cannot properly craft a loop without knowing exactly how long the string array is.
It could be 2-10 characters, how can I know for certain.
My method has been the for loop until you find the '\0' character.
The problem with that is any one could just add a \0 in there string and then what ever is between that and your final '\0' character will not be counted.
I got a lot of errors from that code. I am assuming that you are using some header files that
I am not aware of. I am also unfamiliar with the strLen function. thanks anyway though.
Anyway, there is a type called BSTR and is the standard string type for COM. Since MS invented COM, I will dare say BSTR was also their invention.
BSTR is a unicode char array that is null terminated, but it stores its size (in bytes) in the 4 bytes preceeding the pointer. This means that you can store null chars in BSTR's.