Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CSIDL_COMMON_DOCUMENTS returns E_INVALIDARG on XP?

30 views
Skip to first unread message

Gernot Frisch

unread,
Oct 11, 2006, 5:48:45 AM10/11/06
to
LPITEMIDLIST pidl;
HRESULT hr = SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_DOCUMENTS,
&pidl);
// hr == E_INVALIDARG on my XP-SP2 system


What could this be and how can I get the location of:
C:\Documents and Settings\All Users\Documents
on a XP/Vista system?

--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}

David Lowndes

unread,
Oct 11, 2006, 7:43:35 AM10/11/06
to
>LPITEMIDLIST pidl;
> HRESULT hr = SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_DOCUMENTS,
>&pidl);
> // hr == E_INVALIDARG on my XP-SP2 system

I don't now if this applies to this function, but some functions were
superceded with updated ones in shfolder.dll. If you called the old
version in shell32.dll you may get old behaviour?

Have you tried using SHGetFolderPath instead?

Dave

Gernot Frisch

unread,
Oct 11, 2006, 10:30:26 AM10/11/06
to

"David Lowndes" <Dav...@example.invalid> schrieb im Newsbeitrag
news:vjlpi2pfoe3otprbs...@4ax.com...

You're right. That works.


0 new messages