LdrRegisterDllNotification function
[This function may be changed or removed from Windows without further notice.]
Applies to: desktop apps only
Registers for notification when a DLL is first loaded. This notification occurs before dynamic linking takes place.
Syntax
NTSTATUS NTAPI LdrRegisterDllNotification( __in ULONG Flags, __in PLDR_DLL_NOTIFICATION_FUNCTION NotificationFunction, __in_opt PVOID Context, __out PVOID *Cookie );
Parameters
- Flags [in]
-
This parameter must be zero.
- NotificationFunction [in]
-
A pointer to an LdrDllNotification notification callback function to call when the DLL is loaded.
- Context [in, optional]
-
A pointer to context data for the callback function.
- Cookie [out]
-
A pointer to a variable to receive an identifier for the callback function. This identifier is used to unregister the notification callback function.
Return value
If the function succeeds, it returns STATUS_SUCCESS.
The forms and significance of NTSTATUS error codes are listed in the Ntstatus.h header file available in the WDK, and are described in the WDK documentation.
Remarks
This function has no associated header file. The associated import library, Ntdll.lib, is available in the WDK. You can also use the LoadLibrary and GetProcAddress functions to dynamically link to Ntdll.dll.
Requirements
|
Minimum supported client | Windows Vista |
|---|---|
|
Minimum supported server | Windows Server 2008 |
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 4/6/2012