CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/byakugan/detours/detoured.cpp
Views: 11780
1
//////////////////////////////////////////////////////////////////////////////
2
//
3
// Presence of this DLL (detoured.dll) marks a process as detoured.
4
//
5
// Microsoft Research Detours Package, Version 2.1.
6
//
7
// Copyright (c) Microsoft Corporation. All rights reserved.
8
//
9
10
#include <windows.h>
11
#include "detoured.h"
12
13
static HMODULE s_hDll;
14
15
HMODULE WINAPI Detoured()
16
{
17
return s_hDll;
18
}
19
20
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD dwReason, LPVOID reserved)
21
{
22
(void)reserved;
23
24
if (dwReason == DLL_PROCESS_ATTACH) {
25
s_hDll = hinst;
26
DisableThreadLibraryCalls(hinst);
27
}
28
return TRUE;
29
}
30
31
//
32
///////////////////////////////////////////////////////////////// End of File.
33
34