日期:2014-05-17 浏览次数:20885 次
这将返回自身应用程序句柄
#include "stdafx.h"
#include "windows.h"
#include <iostream>
#include <WinBase.h>
using namespace std;
void DumpModule() { 
 HMODULE hModule=GetModuleHandle(NULL);
 _tprintf(TEXT("with GetModuleHandle = 0x%x\r\n"), hModule); 
}
int _tmain(int argc, _TCHAR* argv[])
{
 int i;
 DumpModule(); 
 scanf("ppp  %d",&i);
 return 0;
}