C CreateProcess等待完全加载内存

时间:2017-06-17 05:43:53

标签: c buffer portable-executable bad-alloc readprocessmemory

CreateProcess UPX的哪种方法等待完全加载内存并为ReadProcessMemory挂起

   PROCESS_INFORMATION processInformation;
   STARTUPINFO startupInfo;

   memset(&processInformation, 0, sizeof(processInformation));
   memset(&startupInfo, 0, sizeof(startupInfo));
   startupInfo.cb = sizeof(startupInfo);
   startupInfo.wShowWindow = SW_NORMAL;

   CreateProcess(L"upx.exe", NULL, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &startupInfo, &processInformation);

    WaitForSingleObject(processInformation.hProcess, 50); //help me next wait load fully memory

    suspend(processInformation.dwProcessId);

    WriteProcessMemory................

    resume(processInformation.dwProcessId);

0 个答案:

没有答案