mydll.cpp

来自「微软提供的截取Win32 API函数的开发包和例子detours-src-1.2」· C++ 代码 · 共 36 行

CPP
36
字号
//////////////////////////////////////////////////////////////////////////////
//
//	Module:		mydll.dll
//	File:		mydll.cpp
//	Author:		Galen C. Hunt
//
//  Copyright 1998-1999, Microsoft Corporation
//	http://www.research.microsoft.com/sn/detours
//
#include <stdio.h>
#include <windows.h>

//////////////////////////////////////////////////////////////////// DLL Stuff
//

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

__declspec(dllexport) ULONG WINAPI
DllMain(HINSTANCE hInstance, DWORD dwReason, PVOID lpReserved)
{
	switch (dwReason) {
	  case DLL_PROCESS_ATTACH:
		OutputDebugString("+++ Entering MyDll!\n");
		break;
	  case DLL_PROCESS_DETACH:
		OutputDebugString("+++ Leaving MyDll!\n");
		break;
	}
	return TRUE;
}

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

⌨️ 快捷键说明

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