Exemple #1
0
 public TYPEDESC CreateTypeDesc(IntPtr finalTypeHRef, MockUnmanagedMemoryHelper memoryHelper)
 {
     TYPEDESC typeDesc;
     typeDesc.vt = (short)VarEnum.VT_PTR;
     typeDesc.lpValue = memoryHelper.AllocateHandle(Marshal.SizeOf<TYPEDESC>());
     Marshal.StructureToPtr(_baseElementType.CreateTypeDesc(finalTypeHRef, memoryHelper), typeDesc.lpValue, false);
     return typeDesc;
 }
Exemple #2
0
        public TYPEDESC CreateTypeDesc(IntPtr finalTypeHRef, MockUnmanagedMemoryHelper memoryHelper)
        {
            TYPEDESC typeDesc;

            typeDesc.vt      = (short)VarEnum.VT_USERDEFINED;
            typeDesc.lpValue = finalTypeHRef;
            return(typeDesc);
        }
Exemple #3
0
        /// <summary>
        /// Public constructor
        /// </summary>
        public MockTypeLib()
        {
            _containedTypeInfos     = new List <MockTypeInfo>();
            _typeLibAttributes.guid = Guid.NewGuid();
            _exportedFromComPlus    = null;

            _memoryHelper  = new MockUnmanagedMemoryHelper();
            _faultInjector = new MockFaultInjectionHelper <MockTypeLibrariesFailurePoints>();
        }
Exemple #4
0
        public TYPEDESC CreateTypeDesc(IntPtr finalTypeHRef, MockUnmanagedMemoryHelper memoryHelper)
        {
            TYPEDESC typeDesc;

            typeDesc.vt      = (short)VarEnum.VT_PTR;
            typeDesc.lpValue = memoryHelper.AllocateHandle(Marshal.SizeOf <TYPEDESC>());
            Marshal.StructureToPtr(_baseElementType.CreateTypeDesc(finalTypeHRef, memoryHelper), typeDesc.lpValue, false);
            return(typeDesc);
        }
Exemple #5
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public MockTypeInfo()
        {
            _implementedTypes = new List <MockTypeInfo>();
            _definedVariables = new List <ICompositeTypeInfo>();
            _definedFunctions = new List <FuncInfo>();

            _memoryHelper = new MockUnmanagedMemoryHelper();

            // each type has a unique guid
            _typeAttributes.guid = Guid.NewGuid();

            // default typekind value is TKIND_ENUM so just pick something else that doesn't have a special meaning in the code
            // (we skip enum type infos)
            _typeAttributes.typekind = TYPEKIND.TKIND_INTERFACE;
        }
Exemple #6
0
        /// <summary>
        /// Public constructor
        /// </summary>
        public MockTypeLib()
        {
            _containedTypeInfos = new List<MockTypeInfo>();
            _typeLibAttributes.guid = Guid.NewGuid();
            _exportedFromComPlus = null;

            _memoryHelper = new MockUnmanagedMemoryHelper();
            _faultInjector = new MockFaultInjectionHelper<MockTypeLibrariesFailurePoints>();
        }
Exemple #7
0
 public TYPEDESC CreateTypeDesc(IntPtr finalTypeHRef, MockUnmanagedMemoryHelper memoryHelper)
 {
     TYPEDESC typeDesc;
     typeDesc.vt = (short)VarEnum.VT_USERDEFINED;
     typeDesc.lpValue = finalTypeHRef;
     return typeDesc;
 }
Exemple #8
0
        /// <summary>
        /// Default constructor
        /// </summary>
        public MockTypeInfo()
        {
            _implementedTypes = new List<MockTypeInfo>();
            _definedVariables = new List<ICompositeTypeInfo>();
            _definedFunctions = new List<FuncInfo>();

            _memoryHelper = new MockUnmanagedMemoryHelper();

            // each type has a unique guid
            _typeAttributes.guid = Guid.NewGuid();

            // default typekind value is TKIND_ENUM so just pick something else that doesn't have a special meaning in the code
            // (we skip enum type infos)
            _typeAttributes.typekind = TYPEKIND.TKIND_INTERFACE;
        }