/* static */ HRESULT WinUtils::SHCreateItemFromParsingName(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv) { if (!VistaCreateItemFromParsingNameInit()) return E_FAIL; return sCreateItemFromParsingName(pszPath, pbc, riid, ppv); }
/* static */ HRESULT WinUtils::SHCreateItemFromParsingName(PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void **ppv) { if (sCreateItemFromParsingName) { return sCreateItemFromParsingName(pszPath, pbc, riid, ppv); } if (!sShellDll) { sShellDll = ::LoadLibraryW(kShellLibraryName); if (!sShellDll) { return false; } } sCreateItemFromParsingName = (SHCreateItemFromParsingNamePtr) GetProcAddress(sShellDll, "SHCreateItemFromParsingName"); if (!sCreateItemFromParsingName) return E_FAIL; return sCreateItemFromParsingName(pszPath, pbc, riid, ppv); }