NdfCreateInboundIncident function

The NdfCreateInboundIncident function creates a session to diagnose inbound connectivity for a specific application or service.

Syntax


HRESULT STDAPI NdfCreateInboundIncident(
  _In_opt_       LPCWSTR          applicationID,
  _In_opt_       LPCWSTR          serviceID,
  _In_opt_       SID              *userID,
  _In_opt_ const SOCKADDR_STORAGE localTarget,
                 IPPROTO          protocol,
                 DWORD            dwFlags,
  _Out_          NDFHANDLE        *handle
);

Parameters

applicationID [in, optional]

Type: LPCWSTR

The fully qualified path to the application receiving the inbound traffic.

serviceID [in, optional]

Type: LPCWSTR

The Windows service receiving the inbound traffic.

@FirewallAPI.dll,-28502 (File/Print Sharing)
@FirewallAPI.dll,-28752 (Remote Desktop)
@FirewallAPI.dll,-32752 (Network Discovery)
userID [in, optional]

Type: SID*

The SID for the application receiving the traffic. If NULL, the caller's SID is automatically used.

localTarget [in, optional]

Type: const SOCKADDR_STORAGE

A SOCKADDR_STORAGE structure which limits the diagnosis to traffic to a specific IP address. If NULL, all traffic will be included in the diagnosis.

protocol

Type: IPPROTO

The protocol which should be diagnosed. For example, IPPROTO_TCP would be used to indicate the TCP/IP protocol.

dwFlags

Type: DWORD

Possible values:

NDF_INBOUND_FLAG_EDGETRAVERSAL (Indicates that a configuration should be considered unhealthy if both gateways on the local network are within the private access range, rather than only considering the configuration to be healthy if both gateways are Internet Gateway Devices (IGDs).)
NDF_INBOUND_FLAG_HEALTHCHECK (Ends the session immediately if no inbound traffic problems are diagnosed, instead of turning on detailed tracing and allowing the user to reproduce their problem for a second diagnosis.)
handle [out]

Type: NDFHANDLE*

Pointer to a handle to the Network Diagnostics Framework incident.

Return value

Type: HRESULT

Possible return values include, but are not limited to, the following.

Return codeDescription
S_OK

The operation succeeded.

E_INVALIDARG

One or more parameters has not been provided correctly.

 

Remarks

Either applicationID or serviceID must be specified, but not both.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Ndfapi.h

Library

Ndfapi.lib

DLL

Ndfapi.dll

 

 

Community Additions

ADD
Show: