I’ve seen in the docs for SHCreateDirectoryEx that it might be unavailable in Windows versions after Windows XP SP2 or 2003. Specifically, it says:
This function is available through Windows XP Service Pack 2 (SP2) and
Windows Server 2003. It might be altered or unavailable in subsequent
versions of Windows
But what is its status right now? Is it available in Vista/7? Is is safe to use?
It should be available unless explicitly stated, but you can always use
GetProcAddress(GetModuleHandle(_T("Shell32.dll"),_T("SHCreateDirectoryEx"))to check (or use dumpbin).According to dumpbin, its available in windows server 2008 R2 SP1, which uses a similar kernel to windows 7, so I’d say its available, but might be removed in future versions (aka MS wants you to avoid using it if possible).