Exemplo n.º 1
0
    public Result CreateProtectedResourceSession1 <T>(ProtectedResourceSessionDescription1 description, out T?session) where T : ID3D12ProtectedResourceSession1
    {
        Result result = CreateProtectedResourceSession1(ref description, typeof(T).GUID, out IntPtr nativePtr);

        if (result.Failure)
        {
            session = default;
            return(result);
        }

        session = MarshallingHelpers.FromPointer <T>(nativePtr);
        return(result);
    }
Exemplo n.º 2
0
 public T CreateProtectedResourceSession1 <T>(ProtectedResourceSessionDescription1 description) where T : ID3D12ProtectedResourceSession1
 {
     CreateProtectedResourceSession1(ref description, typeof(T).GUID, out IntPtr nativePtr).CheckError();
     return(MarshallingHelpers.FromPointer <T>(nativePtr));
 }
Exemplo n.º 3
0
 public ID3D12ProtectedResourceSession1 CreateProtectedResourceSession1(ProtectedResourceSessionDescription1 description)
 {
     return(CreateProtectedResourceSession1(ref description, typeof(ID3D12ProtectedResourceSession1).GUID));
 }