Esempio n. 1
0
            public TElWind(NativeData nativeData)
            {
                // TElWind object pointer
                InstancePtr = new IntPtr(nativeData.Pointers[NativePointer.ElWdw_InstancePtr]);

                // Object pointers
                ElementIdPtr        = new ObjPtr(InstancePtr, nativeData.Pointers[NativePointer.ElWdw_ElementIdPtr]);
                ObjectsPtr          = new ObjPtr(InstancePtr, nativeData.Pointers[NativePointer.ElWdw_ObjectsPtr]);
                ComponentsDataPtr   = new ObjPtr(InstancePtr, nativeData.Pointers[NativePointer.ElWdw_ComponentsDataPtr]);
                RecentGradePtr      = new ObjPtr(InstancePtr, nativeData.Pointers[NativePointer.ElWdw_RecentGradePtr]);
                FocusedComponentPtr = new ObjPtr(InstancePtr, nativeData.Pointers[NativePointer.ElWdw_FocusedComponentPtr]);
                LearningModePtr     = new ObjPtr(InstancePtr, nativeData.Pointers[NativePointer.ElWdw_LearningModePtr]);

                // Memory patterns
                EnterUpdateLockCallSig = nativeData.GetMemoryPattern(NativeMethod.ElWdw_EnterUpdateLock);
                QuitUpdateLockCallSig  = nativeData.GetMemoryPattern(NativeMethod.ElWdw_QuitUpdateLock);

                // Procedures
                EnterUpdateLock = new Procedure <Action <IntPtr, bool, DelphiUTF16String> >(
                    "EnterUpdateLock",
                    CallingConventions.Register,
                    EnterUpdateLockCallSig
                    );
                QuitUpdateLock = new Procedure <Action <IntPtr, bool> >(
                    "QuitUpdateLock",
                    CallingConventions.Register,
                    QuitUpdateLockCallSig
                    );

                // Substructure
                Components = new TComponentData(ComponentsDataPtr, nativeData);
            }
Esempio n. 2
0
            public TQueue(NativeData nativeData)
            {
                SizeOffset = nativeData.Pointers[NativePointer.Queue_SizeOffset];

                LastCallSig    = nativeData.GetMemoryPattern(NativeMethod.Queue_Last);
                GetItemCallSig = nativeData.GetMemoryPattern(NativeMethod.Queue_GetItem);

                Last = new Procedure <Func <IntPtr, int> >(
                    "Last",
                    CallingConventions.Register,
                    LastCallSig
                    );

                GetItem = new Procedure <Func <IntPtr, int, int> >(
                    "GetItem",
                    CallingConventions.Register,
                    GetItemCallSig
                    );
            }
Esempio n. 3
0
            public TFileSpace(TDatabase db, NativeData nativeData)
            {
                InstancePtr = new ObjPtr(db.InstancePtr, nativeData.Pointers[NativePointer.Registry_FileSpaceInstance]);

                EmptySlotsPtr     = new ObjPtr(InstancePtr, nativeData.Pointers[NativePointer.FileSpace_EmptySlotsOffset]);
                AllocatedSlotsPtr = new ObjPtr(InstancePtr, nativeData.Pointers[NativePointer.FileSpace_AllocatedSlotsOffset]);

                GetTopSlotCallSig     = nativeData.GetMemoryPattern(NativeMethod.FileSpace_GetTopSlot);
                IsSlotOccupiedCallSig = nativeData.GetMemoryPattern(NativeMethod.FileSpace_IsSlotOccupied);

                GetTopSlot = new Procedure <Func <IntPtr, bool, int> >(
                    "GetTopSlot",
                    CallingConventions.Register,
                    GetTopSlotCallSig
                    );
                IsSlotOccupied = new Procedure <Func <IntPtr, int, bool> >(
                    "IsSlotOccupied",
                    CallingConventions.Register,
                    IsSlotOccupiedCallSig
                    );
            }
            public TRegistry(TDatabase db, NativeData nativeData)
            {
                TextRegistryInstance     = new ObjPtr(db.InstancePtr, nativeData.Pointers[NativePointers.Registry_TextRegistryInstance]);
                ImageRegistryInstance    = new ObjPtr(db.InstancePtr, nativeData.Pointers[NativePointers.Registry_ImageRegistryInstance]);
                SoundRegistryInstance    = new ObjPtr(db.InstancePtr, nativeData.Pointers[NativePointers.Registry_SoundRegistryInstance]);
                VideoRegistryInstance    = new ObjPtr(db.InstancePtr, nativeData.Pointers[NativePointers.Registry_VideoRegistryInstance]);
                BinaryRegistryInstance   = new ObjPtr(db.InstancePtr, nativeData.Pointers[NativePointers.Registry_BinaryRegistryInstance]);
                TemplateRegistryInstance = new ObjPtr(db.InstancePtr, nativeData.Pointers[NativePointers.Registry_TemplateRegistryInstance]);
                ConceptRegistryInstance  = new ObjPtr(db.InstancePtr, nativeData.Pointers[NativePointers.Registry_ConceptRegistryInstance]);

                AddMemberCallSig  = nativeData.GetMemoryPattern(NativeMethod.TRegistry_AddMember);
                ImportFileCallSig = nativeData.GetMemoryPattern(NativeMethod.TRegistry_ImportFile);

                AddMember = new Procedure <Func <IntPtr, DelphiUTF16String, int> >(
                    "AddMember",
                    CallingConventions.Register,
                    AddMemberCallSig
                    );
                ImportFile = new Procedure <Func <IntPtr, DelphiUTF16String, DelphiUTF16String, int> >(
                    "ImportFile",
                    CallingConventions.Register,
                    ImportFileCallSig
                    );
            }