Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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);
    }