All pastes #161056 Raw Edit

Untitled

public text v1 · immutable
·published 2006-09-04 23:41 UTC
rendered paste body
bool CSocketHandler::HandleSocket(unsigned int SocketListID, bool AllowUserInput)
{
	....

	if (AllowUserInput)
	{
		SocketHandlerStruct socketstruct;
		socketstruct.SocketListID = socketinfo->ListID;
		memcpy(&socketstruct.SocketHandler, this, sizeof(CSocketHandler));
		socketinfo->hInputThread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)UserInputHandler, (void*)&socketstruct, 0, 0);
		if (!socketinfo->hInputThread)
			LOG("[-] CreateThread() failed (%d).", GetLastError());
		else
			WaitForSingleObject(socketinfo->hInputThread, 2000);
		LOG("test");
	}
	LOG("test3");

	...
}