P
Paul K
I've run into a problem using this method that I have
been able to work around, but I think that there is a
more elegant way.
I create an array of 256 bytes and use the
SHBrowseForFolders API to retrieve a folder path into the
array. When I use the GetString method, the length of
the returned string is always 256, even if the actual
path length is only 10.
Right now, I step through the byte array and count the
number of 0's that occur, and then use the string's
Remove method to remove that equal number of characters
from the end of the string.
My question is: Does anyone know what the Unicode
value '0' tranlates into in ASCII? When looking at the
returned string value from GetString, whatever value the
Unicode 0 is translated into is still there, but not
visible.
been able to work around, but I think that there is a
more elegant way.
I create an array of 256 bytes and use the
SHBrowseForFolders API to retrieve a folder path into the
array. When I use the GetString method, the length of
the returned string is always 256, even if the actual
path length is only 10.
Right now, I step through the byte array and count the
number of 0's that occur, and then use the string's
Remove method to remove that equal number of characters
from the end of the string.
My question is: Does anyone know what the Unicode
value '0' tranlates into in ASCII? When looking at the
returned string value from GetString, whatever value the
Unicode 0 is translated into is still there, but not
visible.