?? nestruct.h
字號:
/* * HT Editor * nestruct.h * * Copyright (C) 1999-2002 Stefan Weyergraf * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */#ifndef __NESTRUCT_H_#define __NESTRUCT_H_#define NE_MAGIC0 'N'#define NE_MAGIC1 'E'#define NE_OS_UNKNOWN 0x0000#define NE_OS_OS2 0x0001#define NE_OS_WINDOWS 0x0002#define NE_OS_DOS4 0x0003#define NE_FLAGS_NOTAPROCESS 0x8000 /* Not a process */#define NE_FLAGS_ERRORS 0x2000 /* Errors in image */#define NE_FLAGS_SELFLOAD 0x0800#define NE_FLAGS_NOTWINCOMPAT 0x0100 /* Not compatible with P.M. Windowing */#define NE_FLAGS_WINCOMPAT 0x0200 /* Compatible with P.M. Windowing */#define NE_FLAGS_WINAPI 0x0300 /* Uses P.M. Windowing API */#define NE_FLAGS_FLOAT 0x0080 /* Floating-point instructions */#define NE_FLAGS_I80386 0x0040 /* 80386 instructions */#define NE_FLAGS_I80286 0x0020 /* 80286 instructions */#define NE_FLAGS_I8086 0x0010 /* 8086 instructions */#define NE_FLAGS_PROT_ONLY 0x0008 /* Runs in protected mode only */#define NE_FLAGS_PPLI 0x0004 /* Per-Process Library Initialization */#define NE_FLAGS_INST 0x0002 /* Instance data */#define NE_FLAGS_SOLO 0x0001 /* Solo data */struct NE_HEADER { uint16 magic; // Magic number byte ver; // Version number byte rev; // Revision number uint16 enttab; // Offset of Entry Table uint16 cbenttab; // Number of bytes in Entry Table uint32 crc; // Checksum of whole file uint16 flags; // Flag uint16 uint16 autodata; // Automatic data segment number uint16 heap; // Initial heap allocation uint16 stack; // Initial stack allocation uint32 csip; // Initial CS:IP setting uint32 sssp; // Initial SS:SP setting uint16 cseg; // Count of file segments uint16 cmod; // Entries in Module Reference Table uint16 cbnrestab; // Size of non-resident name table uint16 segtab; // Offset of Segment Table uint16 rsrctab; // Offset of Resource Table uint16 restab; // Offset of resident name table uint16 modtab; // Offset of Module Reference Table uint16 imptab; // Offset of Imported Names Table uint32 nrestab; // Offset of Non-resident Names Table uint16 cmovent; // Count of movable entries uint16 align; // Segment alignment shift count uint16 cres; // Count of resource segments byte os; // Target Operating system byte flagsothers; // Other .EXE flags uint16 pretthunks; // offset to return thunks uint16 psegrefbytes; // offset to segment ref. bytes uint16 swaparea; // Minimum code swap area size uint16 expver; // Expected Windows version number} PACKED;/* * segment */struct NE_SEGMENT { uint16 offset; uint16 size; uint16 flags; uint16 minalloc;} PACKED;#define NE_DATA 0x0001#define NE_ITERATED 0x0008#define NE_MOVABLE 0x0010#define NE_SHARABLE 0x0020#define NE_PRELOAD 0x0040#define NE_READONLY 0x0080#define NE_HASRELOC 0x0100#define NE_CONFORMING 0x0200/* 2 bits priv-level */#define NE_DISCARDABLE 0x1000#define NE_32BIT 0x2000#define NE_HUGE 0x4000/* * entrypoint table */struct NE_ENTRYPOINT_HEADER { byte entry_count; byte seg_index;} PACKED;/* 00H 1 Entry point flags Bit(s) Significance 0 0 = entry point not exported 1 = entry point exported 1 0 = entry point uses instance data 1 = entry point uses single data 2 Reserved 3
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -