Navigating the namespace
-
Hi all, I'm having trouble getting information on how to enumerate a folder that I created. My folder is under the "System" directory, and I want to display the contents in a menu (much like the "Send To" menu). I found the "Navigating the Namespace" article on MSDN, but but that just finds the "first" folder to enumerate. I have a an IShellFolder interface pointed to the system folder:
hr = SHGetMalloc(&pMalloc); hr = SHGetFolderLocation(NULL, CSIDL_SYSTEM, NULL, NULL, &pidlSystem); hr = SHGetDesktopFolder(&psfDesktop); hr = psfDesktop->BindToObject(pidlSystem, NULL, IID_IShellFolder, (LPVOID *) &psfSystem); if (SUCCEEDED(hr)) { hr = psfDesktop->QueryInterface(IID_IShellFolder, (LPVOID *) &psfSystem); psfDesktop->Release(); } hr = psfSystem->EnumObjects(NULL, SHCONTF_FOLDERS, &ppenum);
Now how can I get an this pointed to my folder? I'm familiar withIShellFolder::ParseDisplayName
, but I just don't know how to implement this (if this is in fact what I need). Could someone point me in the right direction? Thanks, Matt