public T GetOutput <T>(int index, out IDxcBlobUtf16 outputType, out IDxcBlobUtf16 outputName) where T : IDxcBlob
        {
            Result result = GetOutput(index, typeof(T).GUID, out IntPtr nativePtr, out outputType, out outputName);

            if (result.Failure)
            {
                return(default);
Ejemplo n.º 2
0
 public Span <byte> GetObjectBytecode(out IDxcBlobUtf16 outputName)
 {
     using (IDxcBlob blob = GetOutput <IDxcBlob>(DxcOutKind.Object, out outputName))
     {
         return(blob.AsByte());
     }
 }
Ejemplo n.º 3
0
        public unsafe T GetOutput <T>(DxcOutKind kind, out IDxcBlobUtf16?outputName) where T : ComObject
        {
            IntPtr outputNamePtr = IntPtr.Zero;

            GetOutput(kind, typeof(T).GUID, out IntPtr nativePtr, new IntPtr(&outputNamePtr)).CheckError();

            outputName = new IDxcBlobUtf16(outputNamePtr);
            return(MarshallingHelpers.FromPointer <T>(nativePtr));
        }
Ejemplo n.º 4
0
        public Result GetOutput <T>(int index, out T? @object, out IDxcBlobUtf16 outputType, out IDxcBlobUtf16 outputName) where T : IDxcBlob
        {
            Result result = GetOutput(index, typeof(T).GUID, out IntPtr nativePtr, out outputType, out outputName);

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

            @object = MarshallingHelpers.FromPointer <T>(nativePtr);
            return(result);
        }
Ejemplo n.º 5
0
        public unsafe Result GetOutput <T>(DxcOutKind kind, out T? @object, out IDxcBlobUtf16?outputName) where T : ComObject
        {
            IntPtr outputNamePtr = IntPtr.Zero;
            Result result        = GetOutput(kind, typeof(T).GUID, out IntPtr nativePtr, new IntPtr(&outputNamePtr));

            if (result.Failure)
            {
                @object    = default;
                outputName = default;
                return(result);
            }

            @object    = MarshallingHelpers.FromPointer <T>(nativePtr);
            outputName = new IDxcBlobUtf16(outputNamePtr);
            return(result);
        }
Ejemplo n.º 6
0
 public T GetOutput <T>(int index, out IDxcBlobUtf16 outputType, out IDxcBlobUtf16 outputName) where T : IDxcBlob
 {
     GetOutput(index, typeof(T).GUID, out IntPtr nativePtr, out outputType, out outputName).CheckError();
     return(MarshallingHelpers.FromPointer <T>(nativePtr));
 }