⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edll3.cpp

📁 微软提供的截取Win32 API函数的开发包和例子detours-src-1.2.rar
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////
//
//	Module:		einst.exe/edll3.dll - Detours Test Program
//	File:		edll3.cpp
//	Author:		Galen C. Hunt
//
//  Copyright 1998-1999, Microsoft Corporation
//	http://www.research.microsoft.com/sn/detours
//
#include <stdio.h>
#include <windows.h>
#include <detours.h>

//////////////////////////////////////////////////////////////////// DLL Stuff
//
#define arrayof(x)		(sizeof(x)/sizeof(x[0]))

struct CPrivateStuffPart1
{
	DETOUR_SECTION_RECORD 	header;
	CHAR					szMessage[48];
};

struct CPrivateStuffPart2
{
	DETOUR_SECTION_RECORD 	header;
	CHAR					szMessage[64];
};

struct CPrivateStuff
{
	DETOUR_SECTION_HEADER	header;
	CPrivateStuffPart1		record1;
	CPrivateStuffPart2		record2;
};

#pragma data_seg(".detour")

static CPrivateStuff private_stuff = {
	DETOUR_SECTION_HEADER_DECLARE(sizeof(CPrivateStuff)),
	{
		{
			sizeof(CPrivateStuffPart1),
			0,
			{ /* d9ab8a41-f4cc-11d1-b6d7-006097b010e3 */
				0xd9ab8a41,
				0xf4cc,
				0x11d1,
				{0xb6, 0xd7, 0x00, 0x60, 0x97, 0xb0, 0x10, 0xe3}
			}
		},
		"The Third DLL Part One!"
	},
	{
		{
			sizeof(CPrivateStuffPart2),
			0,
			{ /* d9ab8a40-f4cc-11d1-b6d7-006097b010e3 */
				0xd9ab8a40,
				0xf4cc,
				0x11d1,
				{0xb6, 0xd7, 0x00, 0x60, 0x97, 0xb0, 0x10, 0xe3}
			}
		},
		"The Third DLL Part Two!"
	}
};
#pragma data_seg()

__declspec(dllexport) VOID WINAPI EDll3Function(VOID)
{
	return;
}

__declspec(dllexport) ULONG WINAPI
DllMain(HINSTANCE hInstance, DWORD dwReason, PVOID lpReserved)
{
	return TRUE;
}

///////////////////////////////////////////////////////////////// End of File.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -