extern "C" const ÎÊÌâ
³õѧWINDOWS API
extern "C" const IMAGE_DOS_HEADER __ImageBase;
void DumpModule(){
HMODULE hModule = GetModuleHandle(Null);
_tprintf(TEXT("with GetModuleHandle(NULL)= 0x%x\r\n"),hModule);
_tprintf(TEXT("with __ImageBase= 0x%x\r\n"),(HINSTANCE)&__ImageBase);
}
int main(int argc, char* argv[])
{
DumpModule();
return 0;
}
Àý×Ó±àÒë³ö´í£¬µÚÒ»¾ä¾ÍÓÐÎÊÌ⣬²»Ã÷°×Ϊʲô£¿£¿
C/C++ code:
#include<windows.h>
#include<tchar.h>
#include<stdio.h>
extern "C" const IMAGE_DOS_HEADER __ImageBase;
void DumpModule()
{
HMODULE hModule = GetModuleHandle( NULL );
_tprintf( TEXT( "with GetModuleHandle(NULL)= 0x%x\r\n" ),hModule );
_tprintf( TEXT( "with __ImageBase= 0x%x\r\n" ),( HINSTANCE )&__ImageBase );
}
int main( int argc, char* argv[] )
{
DumpModule();
return 0;
}
If this parameter is NULL, GetModuleHandle returns a handle to the file used to create the calling process (.exe file).
¸øGetModuleHandle£¨£©´«µÝnull »ñÈ¡calling processµÄ¾ä±úÊÇÄãµÄ±¾ÒâÂð Äã˵µÄ³ö´íÊÇÕâ¾äÂð£¿
__ImageBaseÔÚÄ͍ÒåµÄ
C/C++ code
Code
Ïà¹ØÎÊ´ð£º
QQȺ 29152388
ÓÑÇéUP
°ï¶¥
up
°ïup
up Ö§³Ö£¡
up jf
...ÄѵÀÓзÖ..?
up up up
Ï£ÍûÓеüӷ֣¬¹þ¹þ¡£
Ö§³Ö£¬ÎÒ¼ÓÁË£¬Ï£ÍûÂ¥Ö÷ÄܼÓÎÒ£¬¹²Í¬Ñ§Ï°¹þ
¼ÓÁË¡£
¶¥ÉÏ£¬Ã¿ÌìÊÕ»ñÒ»µã£¬Ö§³Ö ......
µØµãÔÚÉîÛÚÄÏɽ
¡¡¡¡×öCÈí¼þ¡£ÊÔÓÃ2K£¬²»ÖªµÀתÕý¸ø¹«Ë¾Ì¸¶àÉÙºÏÊʰ¡£¿
¡¡¡¡ÁíÍ⣬±¾ÈËС±¾£¬Ó¢ÓïÁù¼¶£¬ÊÔÓÃÈý¸öÔ±íÏÖµÃÒ²ËãÖÐÉÏˮƽ¡£µ«ÊÇÏÖÔÚ»¹²»ÄÜ×öÏîÄ¿¡£ÁíÍâ±ÏҵѧУûÓÐÃûÆø¡£
¡¡¡¡×ªÕý¸ø¹«Ë¾Ì¸¶àÉ ......
±àд³ÌÐòdetab, ½«ÊäÈëÖеÄÖÆ±í·ûÌæ»»³ÉÊʵ±ÊýÄ¿µÄ¿Õ¸ñ£¬Ê¹¿Õ¸ñ³äÂúµ½ÏÂÒ»¸öÖÆ±í·ûÖÕÖ¹µÄµØ·½¡£¼ÙÉèÖÆ±í·ûÖÕֹλµÄλÖÃÊǹ̶¨µÄ£¬±ÈÈçÿ¸ônÁоͻá³öÏÖÒ»¸öÖÆ±í·ûÖÕֹλ¡£
£££££££££££££££££££ ......
ÎÊһϣº
#include <stdio.h>
int main()
{
char x, y, z;
int i;
int a[16];
for(i=0; i<=16; i++)
{
a[i] = 0;
......
ÓÃÕâ±¾ÊéÈëÃÅÔõôÑùÄØ ¸úÌ·ºÆÇ¿µÄÏà±ÈÈçºÎ£¿ лл
ÎÒ°ÑÕâ±¾¿´Á˼¸Æª£¬È·ÊµºÜºÃµÄÊé¡£¾Í²»ÒªÄÃËü¸ú Ì· µÄÊé±ÈÁË£¬ Ì· µÄÊéÒªÕÕ¹ËÈ«¹ú¶ÁÕß¡£
²»¿ÉͬÈÕ¶øÓï
Ò»¸öÊǹúÍâµÄ£¬Ò»¸öÊǹúÄÚµÄ
ѧÍêc primer ......