#include <windows.h> #include <tlhelp32.h> #include <shlwapi.h> #include <conio.h> #include <stdio.h> #define WIN32_LEAN_AND_MEAN #define CREATE_THREAD_ACCESS (PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ BOOL CreateRemoteThreadInject(DWORD ID, const char * dll); DWORD GetProcessId(IN PCHAR szExeName); int main() { char dll[10]; //ชื่อไฟล์ .dll GetFullPathName("D3D9_Logger.dll", MAX_PATH, dll, NULL); // Show the .DLL Path. //printf("DLL : "); //printf(dll); //printf("\n\n\n"); // Proecss Name DWORD ID = GetProcessId("D3D9_test.exe"); if (!CreateRemoteThreadInject(ID, dll)) { printf("Injection failed!"); Sleep(3000); exit(1); } else { printf("Injection Successful!"); Sleep(3000); exit(1); } return 0; } DWORD GetProcessId(IN PCHAR szExeName) {