Results 1 to 1 of 1

Thread: IsValidPE

  1. #1
    MikyGonzalez
    MikyGonzalez is offline
    Guest
    Join Date
    2013 Feb
    Posts
    1
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0

    IsValidPE

    Why this not is functional? ...
    Code:
    int isValidPE(LPVOID pMapping)
    {
    	PIMAGE_DOS_HEADER DosHeader = (PIMAGE_DOS_HEADER) pMapping;
    
    	if (DosHeader->e_magic == IMAGE_DOS_SIGNATURE)
    	{
    		PIMAGE_NT_HEADERS NtHeaders = (PIMAGE_NT_HEADERS) ((char*) DosHeader + DosHeader->e_lfanew);
    
    		if (NtHeaders->Signature == IMAGE_NT_SIGNATURE)
    			return 1;
    		else
    			return 0;
    	}
    	else
    		return 0;
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •