tag:blogger.com,1999:blog-1881358427466534365.post5674949633085222922..comments2023-06-09T03:24:13.901-07:00Comments on Delphi Tips,Delphi News,Delphi Notes: Retrieve Shell Folders Using SHFolderhidelphihttp://www.blogger.com/profile/15186454371633228380noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-1881358427466534365.post-83175869149503761222010-11-08T14:31:38.011-08:002010-11-08T14:31:38.011-08:00Uh oh, it emits an uncontrollable array filled wit...Uh oh, it emits an uncontrollable array filled with the special folder path and then #0s, so I can't concatenate the file name. Trim() does not help me.<br /><br />changing <br />var sDir: string -> var sDir: array[0..MAX_PATH] of WideChar;<br />and PAnsiChar(sDir) of the original code to simply sDir in the SHGetFolderPath function not only compiles, but emits a concatenateable path :) Could you clean this up for me? Am I missing a project-wide setting?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1881358427466534365.post-88706320230222591772010-11-08T14:10:29.173-08:002010-11-08T14:10:29.173-08:00It did not work for me, PWideChar(sDir) instead of...It did not work for me, PWideChar(sDir) instead of PAnsiChar(sDir) compiled.<br /><br />I feel myself in the stone age in Delphi 2009 after Delphi 7, I have went from D4 to D6 to D7 but never ever seen so much break in every simple supporting library.Anonymousnoreply@blogger.com