00001 /* 00002 * HT Editor 00003 * ilstruct.h 00004 * 00005 * Copyright (C) 1999-2002 Stefan Weyergraf (stefan@weyergraf.de) 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License version 2 as 00009 * published by the Free Software Foundation. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 */ 00020 00021 #ifndef __ILSTRUCT_H_ 00022 #define __ILSTRUCT_H_ 00023 00024 #include "global.h" 00025 00026 #define IL_MAGIC0_0 'B' 00027 #define IL_MAGIC0_1 'S' 00028 #define IL_MAGIC0_2 'J' 00029 #define IL_MAGIC0_3 'B' 00030 00031 #define IL_MAGIC1_0 'C' 00032 #define IL_MAGIC1_1 'O' 00033 #define IL_MAGIC1_2 'M' 00034 #define IL_MAGIC1_3 '+' 00035 00036 struct IL_METADATA_SECTION { 00037 dword magic HTPACKED; 00038 word major_version HTPACKED; 00039 word minor_version HTPACKED; 00040 // if (minor_version==1) { 00041 // dword unkown HTPACKED; 00042 // dword version_string_length HTPACKED; 00043 // char version_string[align(version_string_length, 4)]; 00044 // } 00045 // byte zero1, zero2; 00046 // word number_of_entries; 00047 }; 00048 00049 struct IL_METADATA_SECTION_ENTRY { 00050 dword offset HTPACKED; 00051 dword size HTPACKED; 00052 //char name[]; // zero_terminated 00053 // align(4) 00054 // dword ref ?; 00055 }; 00056 00057 extern byte IL_METADATA_SECTION_struct[]; 00058 extern byte IL_METADATA_SECTION_ENTRY_struct[]; 00059 #endif