LdrDllNotification 回呼函式
[此函式可能會從 Windows 變更或移除,而不需進一步通知。]
使用 LdrRegisterDllNotification 函式指定的通知回呼函式。 載入器第一次載入 DLL 時會呼叫此函式。
警告
通知回呼在本身以外的任何其他模組中呼叫函式是不安全的。
VOID CALLBACK LdrDllNotification(
_In_ ULONG NotificationReason,
_In_ PCLDR_DLL_NOTIFICATION_DATA NotificationData,
_In_opt_ PVOID Context
);
-
NotificationReason [in]
-
呼叫通知回呼函式的原因。 此參數可以是下列其中一個值。
價值 意義 - LDR_DLL_NOTIFICATION_REASON_LOADED
- 1
已載入 DLL。 NotificationData 參數指向 LDR_DLL_LOADED_NOTIFICATION_DATA 結構。 - LDR_DLL_NOTIFICATION_REASON_UNLOADED
- 2
DLL 已卸除。 NotificationData 參數指向 LDR_DLL_UNLOADED_NOTIFICATION_DATA 結構。 -
NotificationData [in]
-
包含通知數據的常數 LDR_DLL_NOTIFICATION 聯集指標。 此聯集具有下列定義:
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;
LDR_DLL_LOADED_NOTIFICATION_DATA 結構具有下列定義:
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;
LDR_DLL_UNLOADED_NOTIFICATION_DATA 結構具有下列定義:
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;
-
內容 [in, 選擇性]
-
回呼函式的內容數據指標。
此回呼函式不會傳回值。
在動態連結進行之前,會呼叫通知回呼函式。
要求 | 價值 |
---|---|
最低支援的用戶端 |
Windows Vista [僅限傳統型應用程式] |
最低支援的伺服器 |
Windows Server 2008 [僅限傳統型應用程式] |