quote:
Originally posted by Choli
Cookie... this thread is 5 years old...
Yup, the '90s are coming back
Nah, but joking aside, as I said, the request to have a 'BrowseForFile' dialog pops up now and then and will continue to pop up in the future no doubt. And apparently people keep on referring to this thread and/or use code from this thread (which is main reason why I posted this here and not in that other thread). I found many links pointing to Matty's post here, even in very recent posts. So, nothing wrong with (finaly) updating it a bit in that case imho.
quote:
Originally posted by Choli
quote:
Originally posted by CookieRevised
256 like in Choli's code is way too small.
Sure, but if I remember well, I think that old versions of Windows (maybe 98, or 2000) don't allow more than that, do they?. Or something like that
Not exactly; +-256 (or rather 260, which is MAX_PATH) is the absolute required minimum (eg: when you are sure you don't return multiple selections and with short file names). It's the minimum required size to hold exactly one complete path and file name (in short name notation.... because in long name notation the name itself can even be MAX_PATH characters). So, even back in the old days, the buffer could be (and better should be) much much bigger to hold both the returned path and filename.
For your Translator tool this was never a real problem. But since people copy that code without changing anything in it and using it as-is, problems do arise though.