The information in this article applies to:
SYMPTOMSThe AddMonitor() function installs a local port monitor and links the configuration, data, and monitor files. Users may sporadically experience error code 87, "ERROR_INVALID_PARAMETER," on some computers and not on others. This article explains the problem and presents the solution. MORE INFORMATIONThe code below would normally successfully install the Microsoft Windows 95 or Windows 98 language monitor into the system.
If AddMonitor() instead returns error code 87, "ERROR_INVALID_PARAMETER," the problem might not be due to an invalid parameter but instead due to the DLL that is to be loaded, Localmon.dll in this case.
AddMonitor() attempts to load the DLL via LoadLibrary(). If the DLL does not contain a relocation table, LoadLibrary() will fail and the DLL will not be successfully loaded. 32-bit Windows operating systems, especially those that coexist with MS-DOS, must frequently relocate a program. Therefore, the program must be linked so that a relocation table is built. The /FIXED Linker option prevents the linker from creating a relocation section in the program, and therefore the operating system attempts to load the program only at its preferred base address. If the preferred base address is unavailable at run-time, the operating system returns an error and does not load the program. This results in AddMonitor returning Error 87: ERROR_INVALID_PARAMETER. Therefore, add the option /FIXED:NO on the link line to force the linker to build a relocation section and ensure the program gets loaded. Additional query words:
Keywords : kbDDK kbWinOS95 kbWinOS98 |
Last Reviewed: September 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |