public static HRESULT SHCreateItemFromParsingName <T>(string pszPath, System.Com.IBindCtx pbc, out T ppv) { var hr = SHCreateItemFromParsingName(pszPath, pbc, typeof(T).GUID, out var o); ppv = (T)o; return(hr); }
public static unsafe HRESULT SHGetPropertyStoreFromParsingName <T>(string pszPath, System.Com.IBindCtx pbc, GETPROPERTYSTOREFLAGS flags, out T ppv) { var hr = SHGetPropertyStoreFromParsingName(pszPath, pbc, flags, typeof(T).GUID, out var o); ppv = (T)Marshal.GetUniqueObjectForIUnknown(new IntPtr(o)); return(hr); }