public Result CreateProtectedResourceSession <T>(ProtectedResourceSessionDescription description, out T?resource) where T : ID3D12ProtectedResourceSession { Result result = CreateProtectedResourceSession(description, typeof(T).GUID, out IntPtr nativePtr); if (result.Failure) { resource = default; return(result); } resource = MarshallingHelpers.FromPointer <T>(nativePtr); return(result); }
public ID3D12ProtectedResourceSession CreateProtectedResourceSession(ProtectedResourceSessionDescription description) { return(CreateProtectedResourceSession(description, typeof(ID3D12ProtectedResourceSession).GUID)); }
public T CreateProtectedResourceSession <T>(ProtectedResourceSessionDescription description) where T : ID3D12ProtectedResourceSession { CreateProtectedResourceSession(description, typeof(T).GUID, out IntPtr nativePtr).CheckError(); return(MarshallingHelpers.FromPointer <T>(nativePtr)); }
public ProtectedResourceSession CreateProtectedResourceSession(ProtectedResourceSessionDescription desc) { return(CreateProtectedResourceSession(desc, Utilities.GetGuidFromType(typeof(ProtectedResourceSession)))); }