NS_CONTEXT_DUMP_FN callback function (netsh.h)

The NS_CONTEXT_DUMP_FN command is the dump function for helpers. The dump function is used to print comments, and is registered in the RegisterContext function. The following is an example of a dump function. Be aware that SampleDump is a placeholder for the application-defined function name.

Syntax

NS_CONTEXT_DUMP_FN NsContextDumpFn;

DWORD NsContextDumpFn(
  [in] LPCWSTR pwszRouter,
  [in] LPWSTR *ppwcArguments,
  [in] DWORD dwArgCount,
  [in] LPCVOID pvData
)
{...}

Parameters

[in] pwszRouter

The computer on which to perform the command, or null if the command applies to the local computer. The default value is null.

[in] ppwcArguments

An array of command arguments. ppwcArguments[0] equates to "dump".

[in] dwArgCount

The number of elements in ppwcArguments.

[in] pvData

A pointer to an arbitrary buffer of data specified by the parent context.

Return value

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

Remarks

When the dump function is called, helpers should print any comments, localized, followed by a pushd … command to enter the helper context, followed by any context-specific commands, and ending with a popd command. More localized comments can be added thereafter, if desired.

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