What is WaitForMultipleObjects?
The WaitForMultipleObjects function determines whether the wait criteria have been met. If the criteria have not been met, the calling thread enters the wait state until the conditions of the wait criteria have been met or the time-out interval elapses.
How WaitForMultipleObjects works?
The WaitForSingleObject function checks the current state of the specified object. If the object’s state is nonsignaled, the calling thread enters the wait state until the object is signaled or the time-out interval elapses. Modification occurs only for the object whose signaled state caused the function to return.
What is CreateEvent?
The CreateEvent function creates a named or unnamed event object.
When to use WaitForSingleObject?
Before starting a read operation, each reader thread uses WaitForSingleObject to wait for the manual-reset event object to be signaled. When WaitForSingleObject returns, this indicates that the main thread is ready for it to begin its read operation.
What is Lpthread_start_routine?
An application-defined function that serves as the starting address for a thread. Specify this address when calling the CreateThread , CreateRemoteThread , or CreateRemoteThreadEx function. The LPTHREAD_START_ROUTINE type defines a pointer to this callback function.
What is a dword C++?
A DWORD is a 32-bit unsigned integer (range: 0 through 4294967295 decimal). Because a DWORD is unsigned, its first bit (Most Significant Bit (MSB)) is not reserved for signing.
What is WAIT_OBJECT_0?
With MsgWaitForMultipleObjects and similar calls, a return value of WAIT_OBJECT_0 means that the first object signaled the event. WAIT_OBJECT_1 means it was the 2nd object, etc.
What is CreateRemoteThread?
The CreateRemoteThread function causes a new thread of execution to begin in the address space of the specified process. The new thread handle is created with full access to the new thread. If a security descriptor is not provided, the handle may be used in any function that requires a thread object handle.
What is a Windows event handle?
1. As other people have mentioned, CreateEvent / CreateEventEx are used to create “Event” handles. These represent synchronization objects that are frequently used to gate access, provide signals (potentially) to other threads, and may also be used as the basis for locks.
What is the purpose of DWORD?
DWORD defines ‘size’ of the memory location used for move operation. In you example, you’d be moving 0000000Ah (4 bytes) into memory location ESP+18h. As 0Ah is immediate value its size cannot be determined without using DWORD , WORD , BYTE or other similar qualifier.