◄Up► ◄Next► ◄Previous► ──────────────────────────────────────────────────────────────────────────── include vkd.inc VxDcall VKD_Start_Paste The VKD_Start_Paste service puts a virtual machine into paste mode by simulating keyboard activity with keystrokes taken from the specified paste buffer. Depending on the mode set with the VKD_Define_Paste_Mode service (default is to try Interrupt 16h pasting), VKD waits for the virtual machine to poll the keyboard BIOS through its Interrupt 16h interface. If the virtual machine does keyboard input through the BIOS, then VKD simulates the keyboard input at this high level (plugging in ASCII codes.) If the virtual machine fails to perform any Interrupt 16h within in a time-out period, or the mode has been set to avoid Interrupt 16h pasting, the VKD simulates the necessary hardware interrupts to perform the pasting. Hot keys are still processed while pasting is in progress. Parameter Description ──────────────────────────────────────────────────────────────────────────── EAX Points to the paste buffer containing an array of key structures having the following form: OEM_ASCII_value db ? scan_code db ? shift_state dw ? The shift_state field is 02h if a shift key is down and 04h is a ctrl key is down. The scan_code is 0FFh and the shift_state 0FFFFh, if the VKD should convert the key to a ALT+numpad sequence. This information is identical to what is given by the Window's keyboard routine OEMKeyScan. EBX Specifies the virtual machine handle. ECX Specifies the number of paste entries in the paste buffer. ESI Points to callback procedure. This parameter can be 0. See the Comments section for more information about the procedure. EDX Points to reference data to pass to the callback procedure. Return Value The carry flag is clear if the paste is started. Otherwise, the carry flag is set to indicate an error such as insufficient memory to copy the buffer. Comments The callback procedure is called when the paste is complete or canceled. The callback receives the following input parameters: EAX ; Completion flags ; Paste_Complete - paste completed successfully ; Paste_Aborted - paste canceled by user ; Paste_VM_Term - paste aborted because virtual machine terminated EBX ; handle of virtual machine receiving the paste EDX ; reference data The procedure can modify EAX, EBX, ECX, EDX, ESI, EDI, and Flags. Uses Flags ♦