IPsecKeyManagerAddAndRegister0 function (fwpmu.h)
The IPsecKeyManagerAddAndRegister0 function registers a Trusted Intermediary Agent (TIA) with IPsec.
Syntax
DWORD IPsecKeyManagerAddAndRegister0(
[in] HANDLE engineHandle,
[in] const IPSEC_KEY_MANAGER0 *keyManager,
[in] const IPSEC_KEY_MANAGER_CALLBACKS0 *keyManagerCallbacks,
[out] HANDLE *keyMgmtHandle
);
Parameters
[in] engineHandle
Type: HANDLE
A handle for an open session to the filter engine. Call FwpmEngineOpen0 to open a session to the filter engine.
[in] keyManager
Type: const IPSEC_KEY_MANAGER0*
The set of key management callbacks which IPsec will invoke.
[in] keyManagerCallbacks
Type: const IPSEC_KEY_MANAGER_CALLBACKS0*
The set of callbacks which should be invoked by IPsec at various stages of SA negotiation.
[out] keyMgmtHandle
Type: HANDLE*
Address of the newly created registration.
Return value
Type: DWORD
Return code/value | Description |
---|---|
|
The TIA was successfully registered. |
|
A Windows Filtering Platform (WFP) specific error. See WFP Error Codes for details. |
|
Failure to communicate with the remote or local firewall engine. |
|
The TIA was not registered successfully because another TIA has already been registered to dictate keys. |
|
The TIA was not registered successfully because keyDictationTimeoutHint exceeded the maximum allowed value of 10 seconds. |
|
The TIA was not registered successfully because the binary image has not set the IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY property. |
Remarks
If the IPSEC_KEY_MANAGER_FLAG_DICTATE_KEY flag is set for keyManager, all three callback members of keyManagerCallbacks must be specified; otherwise, only the keyNotify callback should be specified
This function cannot be called from within a transaction. It will fail with FWP_E_TXN_IN_PROGRESS. See Object Management for more information about transactions.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | fwpmu.h |
Library | Fwpuclnt.lib |
DLL | Fwpuclnt.dll |