Enable_Touch_1st_Meg

include vmm.inc

VMMCall Enable_Touch_1st_Meg
 

Enables the first 1 megabyte of memory for the current virtual machine. The service sets the present bit for the first page directory allowing a virtual device to access addresses in the range. This is an asynchronous service.

In the debugging version of Windows, VxDs are normally not permitted to access memory below the 1MB boundary, so as to help catch null pointer errors. If you need to access memory below the 1MB boundary, you should normally access it at the high linear address instead. However, in the rare cases where you need to access to memory at its low linear address, this service temporarily grants access to the first megabyte of memory. You should then re-disable the first megabyte of memory when you are finished, as demonstrated in the following example:

    Begin_Touch_1st_Meg
    mov eax, ds:[40h]           ; get int 10h vector
    End_Touch_1st_Meg
 

(Note that this is not the recommended way of getting a VM's interrupt vector. The proper way is to use the Get_Instanced_V86_Int_Vector service.)

Do not call this service directly. Use the Begin_Touch_1st_Meg macro instead.

This service has no effect in the retail version of Windows. It is intended to be used with the debugging version.

See Also

Begin_Touch_1st_Meg, Disable_Touch_1st_Meg