alancc
alancc

Reputation: 799

Use ShGetFolderPath in Delphi, which unit should I include?

I try to use ShGetFolderPath in Delphi XE3. Since it is an Windows API, I search the Delphi source codes and find both Winapi.ShFolder.pas and WinApi.Shlobj.pas have its definition. I try to include ShFolder or ShlObj, both are OK. So which unit should I include for using ShGetFolderPath? Or can I just use any?

Upvotes: 0

Views: 889

Answers (1)

Rita Han
Rita Han

Reputation: 9700

SHGetFolderPath is deprecated and is supported only for backward compatibility.

For new system and new application you can use SHGetKnownFolderPath instead.

About which header to include you can refer to document of that API and check the requirements part.

enter image description here

Upvotes: 2

Related Questions