NS_CONTEXT_COMMIT_FN callback function (netsh.h)

The NS_CONTEXT_COMMIT_FN command is the commit function for helpers. The commit function commits commands used for committing offline commands, and is registered in the RegisterContext function. The following is an example of a commit function. Be aware that SampleCommit is a placeholder for the application-defined function name.

Syntax

NS_CONTEXT_COMMIT_FN NsContextCommitFn;

DWORD NsContextCommitFn(
  [in] DWORD dwAction
)
{...}

Parameters

[in] dwAction

A value that specifies the commit action. Must be one of the following.

Value Meaning
NETSH_COMMIT
Changes to commit mode.
NETSH_UNCOMMIT
Changes to uncommit mode.
NETSH_SAVE
Saves all uncommitted changes.
NETSH_FLUSH
Flushes all uncommitted changes.

Return value

Returns NO_ERROR upon success. Any other return value indicates an error.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header netsh.h

See also

NS_HELPER_ATTRIBUTES

RegisterContext