Compartir a través de


Función de devolución de llamada LdrDllNotification

[Esta función se puede cambiar o quitar de Windows sin previo aviso].

Función de devolución de llamada de notificación especificada con la función LdrRegisterDllNotification. El cargador llama a esta función cuando se carga por primera vez un archivo DLL.

Advertencia

No es seguro que la devolución de llamada de notificación llame a funciones en cualquier otro módulo distinto de sí mismo.

Sintaxis

VOID CALLBACK LdrDllNotification(
  _In_     ULONG                       NotificationReason,
  _In_     PCLDR_DLL_NOTIFICATION_DATA NotificationData,
  _In_opt_ PVOID                       Context
);

Parámetros

NotificationReason [in]

Motivo por el que se llamó a la función de devolución de llamada de notificación. Este parámetro puede ser uno de los siguientes valores.

Valor Significado
LDR_DLL_NOTIFICATION_REASON_LOADED
1
El archivo DLL se cargó. El parámetro NotificationData apunta a una estructura de LDR_DLL_LOADED_NOTIFICATION_DATA.
LDR_DLL_NOTIFICATION_REASON_UNLOADED
2
El archivo DLL se descargó. El parámetro NotificationData apunta a una estructura de LDR_DLL_UNLOADED_NOTIFICATION_DATA.

 

NotificationData [in]

Puntero a una unión de LDR_DLL_NOTIFICATION constante que contiene datos de notificación. Esta unión tiene la siguiente definición:

typedef union _LDR_DLL_NOTIFICATION_DATA {
    LDR_DLL_LOADED_NOTIFICATION_DATA Loaded;
    LDR_DLL_UNLOADED_NOTIFICATION_DATA Unloaded;
} LDR_DLL_NOTIFICATION_DATA, *PLDR_DLL_NOTIFICATION_DATA;

La estructura LDR_DLL_LOADED_NOTIFICATION_DATA tiene la siguiente definición:

typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA {
    ULONG Flags;                    //Reserved.
    PCUNICODE_STRING FullDllName;   //The full path name of the DLL module.
    PCUNICODE_STRING BaseDllName;   //The base file name of the DLL module.
    PVOID DllBase;                  //A pointer to the base address for the DLL in memory.
    ULONG SizeOfImage;              //The size of the DLL image, in bytes.
} LDR_DLL_LOADED_NOTIFICATION_DATA, *PLDR_DLL_LOADED_NOTIFICATION_DATA;

La estructura LDR_DLL_UNLOADED_NOTIFICATION_DATA tiene la siguiente definición:

typedef struct _LDR_DLL_UNLOADED_NOTIFICATION_DATA {
    ULONG Flags;                    //Reserved.
    PCUNICODE_STRING FullDllName;   //The full path name of the DLL module.
    PCUNICODE_STRING BaseDllName;   //The base file name of the DLL module.
    PVOID DllBase;                  //A pointer to the base address for the DLL in memory.
    ULONG SizeOfImage;              //The size of the DLL image, in bytes.
} LDR_DLL_UNLOADED_NOTIFICATION_DATA, *PLDR_DLL_UNLOADED_NOTIFICATION_DATA;

de contexto [in, opcional]

Puntero a los datos de contexto de la función de devolución de llamada.

Valor devuelto

Esta función de devolución de llamada no devuelve un valor.

Observaciones

Se llama a la función de devolución de llamada de notificación antes de que se produzca la vinculación dinámica.

Requisitos

Requisito Valor
Cliente mínimo admitido
Windows Vista [solo aplicaciones de escritorio]
Servidor mínimo admitido
Windows Server 2008 [solo aplicaciones de escritorio]

Consulte también

LdrRegisterDllNotification

ldrUnregisterDllNotification