// dllmain.cpp : Defines the entry point for the DLL application.
#include <Windows.h>
#include <string>

using namespace std;

#pragma comment(lib,"wsock32.lib")


BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
		{
		char SR[255];
		GetEnvironmentVariable("SystemRoot",SR,255);
		string path=SR;
		path+="\\System32\\notepad.exe";
		PROCESS_INFORMATION pi={};
		STARTUPINFOA si={};
		
		CreateProcess(path.c_str(),NULL,NULL,NULL,TRUE,0,NULL,NULL,&si,&pi);

		}
		break;
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	return TRUE;
}

