void nub_restore_context (NUB nub, NUBTHREAD thread, NUBHANDLE context_cookie) { LPDBGPROCESS process = (LPDBGPROCESS) nub; LPDBGTHREAD threadC = (LPDBGTHREAD) thread; THREAD_MEMORY *saved_thread = (THREAD_MEMORY*) context_cookie; // Set the context for the thread. saved_thread->ThreadContext.ContextFlags = CONTEXT_FULL; SetThreadContext (threadC->ThreadHandle, &(saved_thread->ThreadContext)); // For Windows 95 only, cache the Thread Context if (process->Platform == PLATFORM_WINDOWS_95) set_thread_context(threadC); //print_context("Restoring context to", &(saved_thread->ThreadContext)); // And also free the CONTEXT structure. free(saved_thread); }
static void grl_net_wc_init (GrlNetWc *wc) { GRL_LOG_DOMAIN_INIT (wc_log_domain, "wc"); wc->priv = GRL_NET_WC_GET_PRIVATE (wc); wc->priv->session = soup_session_async_new (); wc->priv->pending = g_queue_new (); set_thread_context (wc); init_mock_requester (wc); init_requester (wc); }