33static bool SHGetSpecialFolderW32(
int nFolderID, WCHAR* pszFolder,
int nSize )
36 HRESULT hHdl = SHGetSpecialFolderLocation(
nullptr, nFolderID, &pidl );
40 WCHAR *lpFolder =
static_cast< WCHAR*
>( HeapAlloc( GetProcessHeap(), 0, 16000 ));
42 SHGetPathFromIDListW( pidl, lpFolder );
43 wcsncpy( pszFolder, lpFolder, nSize );
45 HeapFree( GetProcessHeap(), 0, lpFolder );
47 if( NOERROR == SHGetMalloc(&pMalloc) )
49 pMalloc->Free( pidl );
61 return SHGetSpecialFolderW32( CSIDL_TEMPLATES, o3tl::toW(pFolder), nSize );
bool GetUserTemplateLocation(sal_Unicode *pFolder, int nSize)