能力值:
( LV10,RANK:170 )
|
-
-
2 楼
去看看区段的结构吧,看过之后就不会这么问了
|
能力值:
( LV9,RANK:147 )
|
-
-
3 楼
typedef struct _IMAGE_SECTION_HEADER {
BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
union {
DWORD PhysicalAddress;
DWORD VirtualSize;
} Misc;
DWORD VirtualAddress;
DWORD SizeOfRawData;
DWORD PointerToRawData;
DWORD PointerToRelocations;
DWORD PointerToLinenumbers;
WORD NumberOfRelocations;
WORD NumberOfLinenumbers;
DWORD Characteristics;
} IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
同楼上, 看下PE格式区段结构, WinNT.h中, 这种问题就不用出50kb了
|
能力值:
( LV2,RANK:10 )
|
-
-
4 楼
#include <IOSTREAM.H>
#include <Windows.h> int main(int argc, char* argv[])
{
HMODULE phModule = GetModuleHandle(NULL);
PIMAGE_DOS_HEADER pimDH = (PIMAGE_DOS_HEADER) phModule;
PIMAGE_NT_HEADERS pHdr = (PIMAGE_NT_HEADERS) ((char*)phModule + pimDH->e_lfanew);
PIMAGE_SECTION_HEADER pFirstSec = (PIMAGE_SECTION_HEADER)(pHdr + 1);
char str_test[100];
wsprintfA(str_test,"VirtualAddress:%x\nVirtualSize:%x", (char*)phModule + pFirstSec->VirtualAddress,pFirstSec->Misc.VirtualSize);
cout<<str_test<<endl;
return 0;
} 悬赏发来吧,做人要讲诚信
|
|
|