MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / NetworkerThread

Method NetworkerThread

src/windows/NetworkerThread.cpp:404–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404NetworkerThread::NetworkerThread()
405{
406 m_ThreadHandle = CreateThread(
407 NULL,
408 0,
409 Init,
410 this,
411 0,
412 &m_ThreadID
413 );
414
415 if (!m_ThreadHandle)
416 {
417 HRESULT hr = GetLastError();
418 std::string str = "Could not start NetworkerThread. Discord Messenger will now close.\n\n(" + std::to_string(hr) + ") " + GetStringFromHResult(hr);
419 LPCTSTR ctstr = ConvertCppStringToTString(str);
420 MessageBox(g_Hwnd, ctstr, TEXT("Discord Messenger - Fatal Error"), MB_ICONERROR | MB_OK);
421 free((void*)ctstr);
422 exit(1);
423 }
424}
425
426NetworkerThread::~NetworkerThread()
427{

Callers

nothing calls this directly

Calls 3

GetStringFromHResultFunction · 0.85
to_stringFunction · 0.50

Tested by

no test coverage detected