Share via


LoadIntChainHandler

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/27/2008

This function is called by a driver to install an ISR to handle a particular interrupt. This function is callable from kernel-mode drivers and user-mode drivers.

Syntax

HANDLE LoadIntChainHandler(
  LPCWSTR lpFilename,
  LPCWSTR lpszFunctionName,
  BYTE bIRQ
);

Parameters

  • lpFilename
    [in] Pointer to a null-terminated string that names the DLL executable module.

    If the string specifies a path but the file does not exist in the specified directory, the function fails.

    When specifying a path, use backward slashes (\), not forward slashes (/).

    If the string does not specify a path, the function uses a standard search strategy to find the file. For more information, see the LoadLibrary function.

  • lpszFunctionName
    [in] Name of the interrupt handler entry point. The entry point is defined as shown in the following code example.

    DWORD ISRHandler(DWORD InstanceIndex);
    
  • bIRQ
    [in] IRQ value that is used to identify which interrupt the installed ISR will service.

Return Value

If the function succeeds, a valid handle to the installed handler is returned; otherwise, NULL is returned.

Remarks

To unload an existing interrupt handler, call the FreeIntChainHandler function.

The ISR handler is contained in a DLL. This DLL is handled differently and is loaded into the kernel process space. The DLL can contain more than one ISR handler and can be used in several calls to LoadIntChainHandler. All ISR handlers have a full stack, based on the CPU, and can use code written in C to perform the work.

The DLL loaded by LoadIntChainHandler

  • Cannot have dependent DLLs
  • Cannot link implicitly to any other DLL, and all code must be contained in the DLL
  • Must be compiled to eliminate the C Run-Time Library from being included by default

Note

When building a kernel driver for R4111 or Thumb microprocessor, the environment variable NOMIPS16CODE must be set to one.

Requirements

Header pkfuncs.h
Library coredll.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

CreateInstance
FreeIntChainHandler
GIISR_INFO
IOCTL_HAL_DISABLE_WAKE
IOCTL_HAL_ENABLE_WAKE

Other Resources

Kernel Mode APIs
Developing a Device Driver
User Mode Driver Framework
ISRHandler
KernelLibIoControl
LoadLibrary
NOMIPS16CODE
Installable ISRs and the Kernel
Installable ISRs and Device Drivers
Privileged APIs