На главную Наши проекты:
Журнал   ·   Discuz!ML   ·   Wiki   ·   DRKB   ·   Помощь проекту
ПРАВИЛА FAQ Помощь Участники Календарь Избранное RSS
msm.ru
! Правила раздела Visual C++ / MFC / WTL (далее Раздела)
1) На Раздел распространяются все Правила Форума.
2) Перед тем, как создать новый топик, убедитесь, что Вы читали Правила создания тем в Разделе.
3) Вопросы, не связанные с программированием (настройки MS Visual Studio, книги, библиотеки и т.д.),
обсуждаются в разделе C/C++: Прочее
4) Вопросы разработки .NET (Windows Form, C++/CLI и т.п.) приложений на Visual C++/C# обсуждаются в разделе .NET.
5) Нарушение Правил может повлечь наказание со стороны модераторов.

Полезные ссылки:
user posted image FAQ Раздела user posted image Обновления для FAQ Раздела user posted image Поиск по Разделу user posted image MSDN Library Online
Модераторы: ElcnU
  
> PE-формат, dll'ки и экспорт из них...
    Нет ли у кого-нибудь подробного описания структуры IMAGE_EXPORT_DIRECTORY (IMAGE_DIRECTORY_ENTRY_EXPORT)?
    Дело в том, что мне надо определить параметры принимаемые функциями, которые экспортирует ДЛЛька.

    З.Ы.: С определением самого списка экспортируемых функций проблем нет.  :)  
      PE File Exports
      The opposite of importing a function is exporting a function for use by EXEs or other DLLs. A PE file stores information about its exported functions in the .edata section. Generally, Microsoft linker-generated PE EXE files don't export anything, so they don't have an .edata section. Borland's TLINK32 always exports at least one symbol from an EXE. Most DLLs do export functions and have an .edata section. The primary components of an .edata section (aka the export table) are tables of function names, entry point addresses, and export ordinal values. In an NE file, the equivalents of an export table are the entry table, the resident names table, and the nonresident names table. These tables are stored as part of the NE header, rather than in distinct segments or resources.
      At the start of an .edata section is an IMAGE_EXPORT_DIRECTORY structure (see Table 10). This structure is immediately followed by data pointed to by fields in the structure.
      Table 10. IMAGE_EXPORT_DIRECTORY Format

      DWORD Characteristics
      This field appears to be unused and is always set to 0.

      DWORD TimeDateStamp
      The time/date stamp indicating when this file was created.

      WORD MajorVersion
      WORD MinorVersion
      These fields appear to be unused and are set to 0.

      DWORD Name
      The RVA of an ASCIIZ string with the name of this DLL.

      DWORD Base
      The starting ordinal number for exported functions. For example, if the file exports functions with ordinal values of 10, 11, and 12, this field contains 10. To obtain the exported ordinal for a function, you need to add this value to the appropriate element of the AddressOfNameOrdinals array.

      DWORD NumberOfFunctions
      The number of elements in the AddressOfFunctions array. This value is also the number of functions exported by this module. Theoretically, this value could be different than the NumberOfNames field (next), but actually they're always the same.

      DWORD NumberOfNames
      The number of elements in the AddressOfNames array. This value seems always to be identical to the NumberOfFunctions field, and so is the number of exported functions.

      PDWORD *AddressOfFunctions
      This field is an RVA and points to an array of function addresses. The function addresses are the entry points (RVAs) for each exported function in this module.

      PDWORD *AddressOfNames
      This field is an RVA and points to an array of string pointers. The strings are the names of the exported functions in this module.

      PWORD *AddressOfNameOrdinals
      This field is an RVA and points to an array of WORDs. The WORDs are the export ordinals of all the exported functions in this module. However, don't forget to add in the starting ordinal number specified in the Base field.

      The layout of the export table is somewhat odd (see Figure 4 and Table 10). As I mentioned earlier, the requirements for exporting a function are a name, an address, and an export ordinal. You'd think that the designers of the PE format would have put all three of these items into a structure, and then have an array of these structures. Instead, each component of an exported entry is an element in an array. There are three of these arrays (AddressOfFunctions, AddressOfNames, AddressOfNameOrdinals), and they are all parallel to one another. To find all the information about the fourth function, you need to look up the fourth element in each array.



      Или MSDN -> Technical Articles -> Windows Platform -> Base Services -> Peering Inside the PE: A Tour of the Win32 Portable Executable File Format
        Спасибо, что-то подобное (правда менее подробное) у меня есть. Но нужного мне в этой структуре нет. :(
        0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)
        0 пользователей:


        Рейтинг@Mail.ru
        [ Script execution time: 0,0194 ]   [ 16 queries used ]   [ Generated: 27.04.24, 23:07 GMT ]