MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Samples / CreateNewThread

Function CreateNewThread

SampleApps/WebView2APISample/App.cpp:176–184  ·  view source on GitHub ↗

Make a new thread.

Source from the content-addressed store, hash-verified

174
175// Make a new thread.
176void CreateNewThread(AppWindow* app)
177{
178 DWORD threadId;
179 app->AddRef();
180 HANDLE thread = CreateThread(
181 nullptr, 0, ThreadProc, reinterpret_cast<LPVOID>(app),
182 STACK_SIZE_PARAM_IS_A_RESERVATION, &threadId);
183 s_threads.insert(std::pair<DWORD, HANDLE>(threadId, thread));
184}
185
186// This function is the starting point for new threads. It will open a new app window.
187static DWORD WINAPI ThreadProc(void* pvParam)

Callers 2

ExecuteAppCommandsMethod · 0.85

Calls 1

AddRefMethod · 0.80

Tested by

no test coverage detected