1,代码

        PBYTE pb = NULL;
	MEMORY_BASIC_INFORMATION mbi;
	while (VirtualQuery(pb,&mbi,sizeof(mbi)) == sizeof(mbi))
	{
		TCHAR szModeName[MAX_PATH] = {0};
		if (mbi.State == MEM_FREE)
		{
			mbi.AllocationBase = mbi.BaseAddress;
		}
		if (mbi.AllocationBase == AfxGetModuleState()->m_hCurrentInstanceHandle || 
			mbi.AllocationBase != mbi.BaseAddress ||
			mbi.AllocationBase == NULL)
		{
			
		}
		else
		{
			GetModuleFileName((HINSTANCE)mbi.AllocationBase,szModeName,_countof(szModeName));
			if (_tcslen(szModeName)>0)
			{
				EASY_LOG(szModeName);
			}
		}
		pb += mbi.RegionSize;
	}

 

注:其中EASY_LOG() 是一个输出日志的宏,可自行修改;

效果:

Windows10下安装OpenSSL

做毕业设计需要用到OpenSSL,但在网上没找到比较理想的安装方法,因此我综合Windows系列的安装方法完成Windows10下安装的方法 安装环境:Windows10专业...

阅读全文

如何利用WINHTTP访问不信任的HTTPS呢

所以,在调用 Send 方法之前,加上这句代码就ok了: _variant_t val = 0x3300; pHttpReq->PutOption(WinHttpRequestOption_SslErrorIgnoreFlags, va...

阅读全文

NPAPI和PPAPI开发

NPAPI和PPAPI开发 Author: kagula Revison: 1 Last modify date:2015-10-20   环境:  [1]Visual Studio 2010 SP1    ...

阅读全文

Comments are closed, but trackbacks and pingbacks are open.