plAddSection

The plAddSection function creates a new section in the file opened.
plAddSection( QWORD plName, // Name of Section
DWORD plRawSize, // Raw Size
DWORD plVirtualSize, // Virtual Size
DWORD plCharacteristics, // Characteristics );
Parameters
plName
Contains an 8 bytes long string with the name of the new section.
plRawSize
Contains the Raw Size of the new section (the size on disk).
plVirtualSize
Contains the Virtual Size of the section (the size when the file is loaded in memory).
plCharacteristics
This DWORD contains the characteristics of the new section.This specifies for what this section is used.You can use a custom value or one of the following:
Value Meaning
PL_NORMAL_SECTION Normal characteristics: Readable, Writable,
Executable as code, Contains code, Contains
initialized data.
Return Value
If the function succeeds, the return value is a pointer to the new section.
Remarks
During the creation process the section is aligned.After executing the plAddSection function, because of the refreshing there could be changes in the PE Header so may be your filled PL_PEINFO and PL_POINTERS structures may get out of date.Use the plGetPeInfo to refresh your structures.
Example
.data strSectionName ".datas" .code invoke plAddSection,addr strSectionName, 00000100h, 00001000h, PL_NORMAL_SECTION |
See Also
plDeleteSection, plGetSectionInfo, plFindSection

Pumqara <programs@mail.bg> 2004. All rights reserved.