int WINAPI wWinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow ) { PROCESS_INFORMATION pi = {0}; STARTUPINFO si = {0}; si.cb = sizeof(si); BOOL ret = DetourCreateProcessWithDllW( L"Blobs.exe", NULL, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &si, &pi, NULL, "blob.dll", NULL); if(!ret) { MessageBoxW(NULL, L"†¢„ÓBlobs.exeʧ”¡!", L"", MB_OK); } return 0; }
bool create_process_use_detour( const wchar_t* application, wchar_t* command_line, uint32_t creation_flags, const wchar_t* current_directory, LPSTARTUPINFOW startup_info, LPPROCESS_INFORMATION process_information, const char* dll_path) { return !!DetourCreateProcessWithDllW( application, command_line, NULL, NULL, FALSE, creation_flags, NULL, current_directory, startup_info, process_information, dll_path, NULL); }