コード例 #1
0
ファイル: Value.cs プロジェクト: DeanYQ/donet-debugger
        public CorHandleValue CreateHandle(CorDebugHandleType type)
        {
            ICorDebugHandleValue handle;

            (m_heapVal as ICorDebugHeapValue2).CreateHandle(type, out handle);
            return(handle == null ? null : new CorHandleValue(handle));
        }
コード例 #2
0
        public HandleValue CreateHandle(CorDebugHandleType type)
        {
            HandleValue handle;

            QueryInterface <HeapValue2>().CreateHandle(type, out handle);
            return(handle);
        }
コード例 #3
0
 /// <summary>
 /// Gets a value that indicates the kind of handle referenced by this
 /// <c>ICorDebugHandleValue</c> object.
 /// </summary>
 /// <param name="type">
 /// A pointer to a value of the <c>CorDebugHandleType</c> enumeration
 /// that indicates the type of this handle.
 /// </param>
 public int GetHandleType(out CorDebugHandleType type)
 {
     fixed(void *pType = &type)
     {
         return(Calli(_this, This[0]->GetHandleType, pType));
     }
 }
コード例 #4
0
        /// <summary>
        /// Creates a handle of the specified type for the heap value represented
        /// by this <c>ICorDebugHeapValue2</c> object.
        /// </summary>
        /// <param name="type">
        /// A value of the <c>CorDebugHandleType</c> enumeration that specifies the
        /// type of handle to be created.
        /// </param>
        /// <param name="handle">
        /// A pointer to the address of an <c>ICorDebugHandleValue</c> object that
        /// represents the new handle for this heap value.
        /// </param>
        /// <remarks>
        /// The handle will be created in the application domain that is associated
        /// with the heap value, and will become invalid if the application domain
        /// gets unloaded.
        ///
        /// Multiple calls to this function for the same heap value will create
        /// multiple handles. Because handles affect the performance of the garbage
        /// collector, the debugger should limit itself to a relatively small number
        /// of handles (about 256) that are active at a time.
        /// </remarks>
        public int CreateHandle(CorDebugHandleType type, out CorDebugHandleValue handle)
        {
            void **pHandle = default;
            int    hResult = Calli(_this, This[0]->CreateHandle, (int)type, &pHandle);

            ComFactory.Create(pHandle, hResult, out handle);
            return(hResult);
        }
コード例 #5
0
        public ICorDebugHandleValue CreateHandle(CorDebugHandleType type)
        {
            ICorDebugHandleValue ppHandle;

            Debugger.Interop.CorDebug.ICorDebugHandleValue out_ppHandle;
            this.WrappedObject.CreateHandle(((Debugger.Interop.CorDebug.CorDebugHandleType)(type)), out out_ppHandle);
            ppHandle = ICorDebugHandleValue.Wrap(out_ppHandle);
            return(ppHandle);
        }
コード例 #6
0
ファイル: CorValue.cs プロジェクト: ohyeah521/dnSpy-1
        public CorValue?CreateHandle(CorDebugHandleType type)
        {
            var h2 = obj as ICorDebugHeapValue2;

            if (h2 is null)
            {
                return(null);
            }
            int hr = h2.CreateHandle(type, out var value);

            return(hr < 0 || value is null ? null : new CorValue(value));
        }
コード例 #7
0
        int ICorDebugHandleValue.GetHandleType(out CorDebugHandleType pType)
        {
            pType = CorDebugHandleType.HANDLE_STRONG;

            return(COM_HResults.S_OK);
        }
コード例 #8
0
ファイル: Value.cs プロジェクト: Gravecorp/ipydbg
 public CorHandleValue CreateHandle(CorDebugHandleType type)
 {
     ICorDebugHandleValue handle;
     (m_heapVal as ICorDebugHeapValue2).CreateHandle(type,out handle);
     return handle==null?null:new CorHandleValue(handle);
 }
コード例 #9
0
 public static ICorDebugHandleValue CreateHandle(this ICorDebugHeapValue2 instance, CorDebugHandleType type)
 {
     ICorDebugHandleValue ppHandle;
     instance.__CreateHandle(type, out ppHandle);
     return ppHandle;
 }
コード例 #10
0
        int ICorDebugHandleValue.GetHandleType( out CorDebugHandleType pType )
        {
            pType = CorDebugHandleType.HANDLE_STRONG;

            return Utility.COM_HResults.S_OK;            
        }