?
Hallo,
ich hab da mal ein Problem bei meinem DLL Injector....
fatal error C1010: unexpected end of file while looking for precompiled header directive
das steht immer am ende bei }
ich weiß nicht, was ich falsch mache...habe stdafx.h nicht includiert ! (wenn ich es mache, kommen dann vieel mehrere Fehler)
naja ich bitte um Hilfe.
hier ist mein kompletter Source :
#define _EXE_NAME_ "WarRock.exe"
void main()
{
DWORD dwPID[100] = {NULL};
DWORD dwRunningProcs = NULL;
PWTS_PROCESS_INFO pProc = NULL;
char szDLLFile[MAX_PATH];
GetModuleFileName(0, szDLLFile, MAX_PATH);
szDLLFile[strlen(szDLLFile)-3] = 0;
strcat(szDLLFile, "dll");
there:
WTSEnumerateProcesses(WTS_CURRENT_SERVER_HANDLE, 0, 1, &pProc, &dwRunningProcs);
for(int i = 0; i < dwRunningProcs; i++)
{
if(!lstrcmp(pProc[i].pProcessName, _EXE_NAME_))
{
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, pProc[i].ProcessId);
HANDLE hAlloc = VirtualAllocEx(hProcess, 0, sizeof(szDLLFile), MEM_COMMIT, PAGE_EXECUTE_READWRITE);
WriteProcessMemory(hProcess, hAlloc, &szDLLFile, sizeof(szDLLFile), 0);
DWORD dwLoadLibrary = (DWORD)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA");
CreateRemoteThread(hProcess, 0, 0, (LPTHREAD_START_ROUTINE)dwLoadLibrary, hAlloc, 0, 0);
Sleep(100);
VirtualFreeEx(hProcess, hAlloc, sizeof(szDLLFile), MEM_DECOMMIT);
return;
}
}
Sleep(100);
goto there;
}