Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function maps the specified executable module into the address space of the calling process. This function also prevents the code and data from being paged out.
Syntax
HINSTANCE LoadDriver( LPCWSTR lpszFileName ); |
Parameters
- lpszFileName
-
[out] Pointer to a null-terminated string that names the executable module.
Return Value
A handle to the module indicates success. NULL indicates failure. To get extended error information, call GetLastError.
Remarks
This function is different from the LoadLibraryfunction because the entire executable module is locked into memory and never pages out. Because the LoadDriverfunction has the same specification as LoadLibrary, it calls LoadLibraryto fulfill the request. To free the executable module and release the memory back to the system, use the FreeLibraryfunction.
Any code that needs to guarantee real-time performance should load the code with LoadDriver. All drivers loaded by the system load using LoadLibrary.
Requirements
Header | pkfuncs.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 2.10 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |