int inject(DWORD dwProcessId) { HANDLE hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, dwProcessId); (&data, sizeof (MyData)); strcat(data.sz, “sylar“);HINSTANCE hUser = LoadLibrary(“user32.dll“); if (! hUser) { printf(“Can not load library.\n“); return 1; } data.dwMessageBox = (DWORD)GetProcAddress(hUser, “MessageBoxA“); FreeLibrary(hUser); if (! data.dwMessageBox) return 0;
这个是后半部分。