HANDLE EngLoadModuleForWrite(
LPWSTR pwsz | |
ULONG cjSizeOfModule | |
); |
EngLoadModuleForWrite loads the specified executable module into system memory for writing.
If EngLoadModuleForWrite succeeds, the return value is a handle to the module that was loaded. Otherwise, null is returned.
EngLoadModuleForWrite loads a data file into system memory with write permission. To access the loaded module, the driver should call EngMapModule with the handle returned by this function.
EndLoadModuleForWrite loads the file into memory that is the same size as the file when cjSizeOfModule is zero. If cjSizeOfModule is greater than zero, GDI extends or truncates the file to be exactly cjSizeOfModule bytes in size before loading it. No assumptions should be made about the contents of memory that extend beyond the file when cjSizeOfModule is greater than the file’s original size.
Drivers that need to load an image as executable code should call EngLoadImage instead of this function.