ParseDisplayName: my computer missing
-
Hi I am using the following code to get the desktop contents: if (SUCCEEDED(SHGetDesktopFolder(&lpDesktopFolder))) { //strpath: has the desktop folder path. MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, (LPCTSTR)((strPath != "\\MyComputer")?strPath:""), -1, olePath, MAX_PATH); hr = lpDesktopFolder->ParseDisplayName(NULL, NULL, olePath, &chEaten, &pidl, &dwAttributes); if(hr != S_OK) { lpDesktopFolder->Release(); return; } hr = lpDesktopFolder->BindToObject(pidl, 0, IID_IShellFolder, (LPVOID *)&lpShellFolder); If I use this code I can't find *My Computer* and icons. But if I use SHGetDesktopFolder(&lpShellFolder) I can see the *My computer* in the list. Could any one please tell me where I am going wrong? Regards Neha
-
Hi I am using the following code to get the desktop contents: if (SUCCEEDED(SHGetDesktopFolder(&lpDesktopFolder))) { //strpath: has the desktop folder path. MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, (LPCTSTR)((strPath != "\\MyComputer")?strPath:""), -1, olePath, MAX_PATH); hr = lpDesktopFolder->ParseDisplayName(NULL, NULL, olePath, &chEaten, &pidl, &dwAttributes); if(hr != S_OK) { lpDesktopFolder->Release(); return; } hr = lpDesktopFolder->BindToObject(pidl, 0, IID_IShellFolder, (LPVOID *)&lpShellFolder); If I use this code I can't find *My Computer* and icons. But if I use SHGetDesktopFolder(&lpShellFolder) I can see the *My computer* in the list. Could any one please tell me where I am going wrong? Regards Neha
It would help if you gave us a hint as to what types
lpDesktopFolder
andlpShellFolder
are.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
It would help if you gave us a hint as to what types
lpDesktopFolder
andlpShellFolder
are.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
-
Hi I am using the following code to get the desktop contents: if (SUCCEEDED(SHGetDesktopFolder(&lpDesktopFolder))) { //strpath: has the desktop folder path. MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, (LPCTSTR)((strPath != "\\MyComputer")?strPath:""), -1, olePath, MAX_PATH); hr = lpDesktopFolder->ParseDisplayName(NULL, NULL, olePath, &chEaten, &pidl, &dwAttributes); if(hr != S_OK) { lpDesktopFolder->Release(); return; } hr = lpDesktopFolder->BindToObject(pidl, 0, IID_IShellFolder, (LPVOID *)&lpShellFolder); If I use this code I can't find *My Computer* and icons. But if I use SHGetDesktopFolder(&lpShellFolder) I can see the *My computer* in the list. Could any one please tell me where I am going wrong? Regards Neha
Neha wrote: Could any one please tell me where I am going wrong? If you use
SHGetDesktopFolder(&lpShellFolder)
and are getting the desired results, what's the problem?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen