?? memserv.c
字號:
///////////////////////////////////////////////////////////////////////////////
//
// FileName : MemServ.c
// Version : 1.0
// Author : Luo Cong
// Date : 2004-09-02 9:59:07
// Comment :
//
///////////////////////////////////////////////////////////////////////////////
#include <windows.h>
#include "MemServ.h"
#include "Misc.h"
#include "PEServ.h"
/**
* Must call IsPEFile() & Initialize() first!
*/
int ReadCommand(
/* [in] */ const unsigned long ip,
/* [in] */ const size_t cmdsize,
/* [out] */ char *cmd
)
{
int nRetResult = 0;
unsigned long ulFileOffset;
ulFileOffset = RVAToFileOffset(ip - g_ulImageBase);
if (g_lFileSize < (long)(ulFileOffset + cmdsize))
goto Exit0;
if (NULL != cmd)
memcpy(cmd, &g_FileContents[ulFileOffset], cmdsize);
nRetResult = 1;
Exit0:
return nRetResult;
}
/**
* Must call IsPEFile() & Initialize() first!
*/
int GetDisassemblerRange(
/* [out] */ unsigned long *pBase,
/* [out] */ unsigned long *pSize
)
{
int nRetResult = 0;
int nRetCode;
IMAGE_NT_HEADERS nt_header;
MY_PROCESS_ERROR(pBase);
MY_PROCESS_ERROR(pSize);
nRetCode = GetNTHeader(&nt_header);
MY_PROCESS_ERROR(nRetCode);
*pBase = nt_header.OptionalHeader.ImageBase +
nt_header.OptionalHeader.BaseOfCode;
*pSize = nt_header.OptionalHeader.SizeOfCode;
nRetResult = 1;
Exit0:
return nRetResult;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -