[fpc-pascal]divining windows system paths

Matt Emson memsom at interalpha.co.uk
Thu Nov 1 07:24:05 CET 2001

Wasn't me, some other guy. I just told how it usually get's done in Delphi.


> > You may be able to get away with dropping the IMalloc calls. I really 
> > know. You may end up crashing/screwing up Explorer though, as Explorer 
> > shell') has to explicitly release all memory it allocates.
>There are two ways, SHGetSpecialFolderLocation and SHGetSpecialFolderPath.
>With the second, you have to use IMalloc because the system allocates the
>memory and expects you to free it. Therefore, Using SHGetSpecialFolderPath
>seems to be much simpler (it is a single call, not the complex structures
>you quoted, returning the path directly instead of a PIDL which you have to
>convert to a path and deallocate yourself) but the problem is that it is
>only available starting from version of 4.71 of Shell32.dll (this means
>2000, ME or Internet Explorer 4.0 or later installed on previous systems).
>However, there is a redistributable ShFolder.dll which you are free to
>include with your program and then you'll be able to use this simpler
>function on any system and version.
>    Gábor
>Gabor DEAK JAHN -- Budapest, Hungary.
>E-mail: djg at tramontana.co.hu
>fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
Don't have BeOS? Get it! - http://free.be.com/
Wanna keep BeOS alive? Save BeOS - 

Version: 3.12
GCS d? s+++:+ a- C++ UL+ P L++ E---- W- N+ o+ K- w 
O- M V PS PE-- Y PGP- t- 5-- X- R- tv+ b+ DI++ D+ 
G e++ h--- r+++ y+++ 

More information about the fpc-pascal mailing list