LDRSRV_Copy_Extended_Memory


VOID LDRSRV_Copy_Extended_Memory()

Allocates a block of extended memory in the specified data group (init, locked, or pageable) to the size requested and initializes the block with the given data.

AX

0006h, the function number for this service.

CX

Number of bytes to allocate.

DX

Type of data being allocated. It can be one of the following values:

Value

Meaning

LDRSRV_COPY_INIT

INIT data

LDRSRV_COPY_LOCKED

LOCKED data

LDRSRV_COPY_PAGEABLE

PAGEABLE data


DS:SI

Address of data to be copied.

This service is provided by the real-mode VxD loader. It provides a convenient way for a VxD to pass more than a single DWORD of data to their protected-mode portions. The VxD can simply create a block of extended memory and pass its linear address through the VxD reference DWORD (that is, the value of EDX on exit from real-mode initialization).

Actual sizes of blocks are always rounded up to the nearest DWORD. Multiple blocks allocated by a single VxD are guaranteed to be contiguous in linear address space, but not necessarily in physical address space.

PAGEABLE data may actually be allocated as LOCKED data, at the loader's discretion. Initialization (INIT) data is always locked, and is discarded after all VxD initialization phases are completed.