-
December 21st, 2009, 04:56 AM
#1
Environment.SpecialFolder.Personal (C#) & CSIDL_PERSONAL (C++) Problem, Win 7
So I redirected My Documents folder in Win 7. To D:\.
Now I want to get the My Documents folder in a C# app and in a C++ game, I want to get the same file in the same My Documents folder. So I'm doing this:
C++:
CODE
SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_DEFAULT, path);
And I get: path = "C:\Users\DAaaMan64\Documents"
C#:
CODE
string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
And I get: path = "D:\\"
^^ that is the redirected My Documents folder.
As far as I'm concerned this is a bug.
I'm about ready to just pipe it to the child process. What am I doing wrong?
Thanks.
-
December 21st, 2009, 05:24 AM
#2
Re: Environment.SpecialFolder.Personal (C#) & CSIDL_PERSONAL (C++) Problem, Win 7
Problem solved, should be using SHGFP_TYPE_CURRENT instead of SHGFP_TYPE_DEFAULT
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|