MCPcopy Create free account
hub / github.com/bumptop/BumpTop / GetRelativePidlFromAbsFilePath

Method GetRelativePidlFromAbsFilePath

trunk/win/Source/BT_WindowsOS.cpp:4360–4382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4358}
4359
4360LPITEMIDLIST WindowsSystem::GetRelativePidlFromAbsFilePath( QString p)
4361{
4362 LPITEMIDLIST pidl = NULL;
4363 LPITEMIDLIST pidlRelative = NULL;
4364
4365 // namespace extension root (desktop) for parsing path
4366 LPSHELLFOLDER psfDesktop = NULL;
4367 if (FAILED(SHGetDesktopFolder(&psfDesktop)))
4368 return pidl;
4369
4370 // parse path for absolute PIDL
4371 if (FAILED(psfDesktop->ParseDisplayName(NULL, NULL, (LPWSTR) p.utf16(), NULL, &pidl, NULL)))
4372 return pidl;
4373
4374 // get the relative pidl, do not need to free pidlTemp
4375 pidlRelative = ILClone(ILFindLastID(pidl));
4376
4377 // cleanup
4378 CoTaskMemFree(pidl);
4379 psfDesktop->Release();
4380
4381 return pidlRelative;
4382}
4383
4384void WindowsSystem::GetWorkArea(int &r, int &l, int &t, int &b)
4385{

Callers 6

Key_CopySelectionFunction · 0.80
Key_CutSelectionFunction · 0.80
getMenuMethod · 0.80
InitiateDragMethod · 0.80

Calls 1

ReleaseMethod · 0.45

Tested by

no test coverage detected