Maybe I'm missing something, but when I download the last version of the VI above, it still doesn't preallocate the buffer for the return string. I've modified it to do this, and added a connector pane and icon.
However, as described in a recent Info-LabVIEW post, I wanted to get the path to the All Users application data folder which isn't available as an environment variable. With a little digging I found that the approved way to do this is to call the SHGetFolderPath function in shfolder.dll and I've created a pair of VI's to do this.
I've only tested them on my system (LV 7.1.1 on Windows XP SP1) so any feedback on how they work on other configurations is welcome...
Tom
Download File:post-1157-1149604122.vi
Download File:post-1157-1149604138.llb