Space at end of folder name

  • Thread starter Thread starter Billy B
  • Start date Start date
B

Billy B

Using the generic BrowseForFolder function, the returned string value has a
square at the end of the path's folder name. I never realized it before, but
after single clicking a folder in Windows Explorer there appears to be an
extra non printing character. What is the character and how do you remove it
from the string.

When I place my cursor over the string this is what I see:
"C:\Testing[square]"

Thank you
 
Billy B said:
Using the generic BrowseForFolder function, the returned string value has a
square at the end of the path's folder name. I never realized it before, but
after single clicking a folder in Windows Explorer there appears to be an
extra non printing character. What is the character and how do you remove it
from the string.

That's probably a null or binary 00. Many API calls use that
character to terminate the string. All the code that I can recall
seeing strips off that string.

What URL did you get that code from?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
Thank you Tony. I can't remember where I got it. I found it a while back and
saved it for keeps sake. Just now using it.
 
Tony Toews said:
That's probably a null or binary 00. Many API calls use that
character to terminate the string. All the code that I can recall
seeing strips off that string.

Actually I was just using some API code yesterday and it refreshed my
memory. Sometimes the string is returned along with a length. You
then use only what's mentioned in the length. What gets stripped is
frequently the null character.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top