DllUnload routine

The system calls a kernel-mode DLL's DllUnload routine when it unloads the DLL.

Syntax


NTSTATUS DllUnload(void);

Parameters

This routine has no parameters.

Return value

The routine should return STATUS_SUCCESS on success, or the appropriate error code on failure. The system only unloads the DLL if DllUnload returns STATUS_SUCCESS.

Remarks

Export drivers must provide DllUnload routines. You can use the DllUnload routine to release any resources used by the routines in the DLL. For more information about export drivers, see Creating Export Drivers.

Requirements

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

See also

DllInitialize

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft