aboutsummaryrefslogtreecommitdiff
path: root/SpotifyKeyDumper/SpotifyKeyDumper.cpp
blob: 7d9eaa607552247f135b7a06766580fcf066120a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "pch.h"
#include "Hooks.h"

static const char* VERSION = "0.4.5";

DWORD WINAPI InitMain(LPVOID lpParam)
{
	AllocConsole();
	FILE* fDummy;
	freopen_s(&fDummy, "CONIN$", "r", stdin);
	freopen_s(&fDummy, "CONOUT$", "w", stderr);
	freopen_s(&fDummy, "CONOUT$", "w", stdout);

	std::cout << "SpotifyKeyDumper version: " << VERSION << std::endl;

	Hooks::Init();

	return 0;
}

BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved)
{
	if (dwAttached == DLL_PROCESS_ATTACH)
		CreateThread(NULL, 0, &InitMain, NULL, 0, NULL);

	return 1;
}