VMMCreateThread


VMMcall VMMCreateThread, <initial_ss, intial_esp, initial_cs,
    initial_eip, initial_ds, initial_es, ThreadType, InitCallback,
    RefData>
or      eax, eax
jz      thread_not_created

Creates a protected mode thread in the system virtual machine and starts it executing in ring 3 at the instruction specified by CS:EIP. Uses all registers and Flags.

initial_ss, initial_esp, initial_cs, initial_eip, initial_ds, initial_es

Ring 3 protected mode registers used to start the thread.

ThreadType

Programmer-defined DWORD value a VxD can use to uniquely identify the threads that it creates. Typically, this value is a pointer to the VxD's DDB because the pointer is unique among VxDs. This value is stored in the TCB_ThreadType field of the thread's control block.

InitCallback

Ring 0 initialization function that is called after the Thread_Init message is sent.

RefData

Programmer-defined DWORD value that is passed, in EDX, to the InitCallback function.

This service is intended for use only by Windows internal system components. A virtual device should not use this service because it can cause the system to become unstable.

The client registers are initialized to the values specified by the procedure parameters. The values must be valid values for ring 3; do not use ring 0 selectors.

The Create_Thread and Thread_Init messages are sent to all virtual devices, and the timeslice scheduler is notified to start scheduling the thread.

See also Create_Thread, Thread_Init, VMMTerminateThread