1
0
Fork 0

DBG: no longer use ThreaderCreateRemoteThread

This commit is contained in:
mrexodia 2017-04-08 04:43:14 +02:00
parent 3fe18e784c
commit 6cc5f4d849
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 3 additions and 1 deletions

View File

@ -24,13 +24,15 @@ bool cbDebugCreatethread(int argc, char* argv[])
return false;
}
DWORD ThreadId = 0;
if(ThreaderCreateRemoteThread(Entry, true, reinterpret_cast<LPVOID>(Argument), &ThreadId) != 0)
auto hThread = CreateRemoteThread(fdProcessInfo->hProcess, nullptr, 0, LPTHREAD_START_ROUTINE(Entry), LPVOID(Argument), 0, &ThreadId);
if(!hThread)
{
dputs(QT_TRANSLATE_NOOP("DBG", "Create thread failed!"));
return false;
}
else
{
CloseHandle(hThread);
char label[MAX_LABEL_SIZE];
if(!LabelGet(Entry, label))
label[0] = 0;