EngLoadImage

HANDLE EngLoadImage(

    LPWSTR pwszDriver

   );

EngLoadImage loads the specified executable image into kernel-mode memory.

Parameters

pwszDriver
Pointer to a null-terminated string that names the file containing the executable image to be loaded.

Return Value

If EngLoadImage succeeds, the return value is a handle to the image that was loaded. Otherwise, this function returns null.

Comments

A driver can use EngLoadImage to map an executable image into kernel-mode memory. For example, a printer driver can call EngLoadImage to load a minidriver.

EngLoadImage requires that the image file to be loaded have a .dll suffix. The driver must include this suffix in the pwszDriver string.

To execute a section of code within the loaded image, the driver should obtain the function address from EngFindImageProcAddress.

Drivers that need to load a module as data only should call EngLoadModule instead of this function.

See Also

EngUnloadImage