Page tree
Skip to end of metadata
Go to start of metadata

Registers a new network based service provider

Syntax

Parameters

pInterface
 The interface the framework will use to interface with your provider
typeInfo
Type: LocString
The LocString of the provider you are registering.
nSockType
Type: int
The WinSock 2 socket type that this service requires. e.g. SOCK_STREAM, SOCK_DGRAM
nDefaultPort
Type: int
The default port that services of this provider use
dwFlags
Type: DWORD

A bitmask of flags for services of this provider

FlagDescription
NETSERVICE_FLAG_SINGLETONOnly one instance of this service can exist
NETSERVICE_FLAG_INSTANCEREQUIREDThere must be at least one instance of this service
NETSERVICE_FLAG_TLSThe service can support immediate TLS on the connection. Setting this flag enables the "Immediately negotiate secure channel" option in the binding user interface.
NETSERVICE_FLAG_NEGOTIATED_TLSThe protocol that the service implements supports negotiated TLS. Setting this flag enables the "Allow optional security" option in the binding user interface.
NETSERVICE_FLAG_INTERCEPTThe service can deal with intercepted connections. See Remarks
NETSERVICE_FLAG_CONNECTThe service makes outbound connections using WinGate services
NETSERVICE_FLAG_USAGELOGSThe service does usage logging
NETSERVICE_FLAG_FIXEDPORTThe service has a fixed port for bindings
NETSERVICE_FLAG_CLIENTCERTSThe service supports client side certificates

Return Value

Type: void
None

Remarks

Intercepted connections are NAT connections that go through the WinGate driver and are redirected by the driver to a proxy. The client believes they are making a direct connection.  Connections can also be intercepted from the SOCKS server or the Winsock Redirector service.

Setting NETSERVICE_FLAG_TLS will set the bUseTLS option in the NetBindingInfo passed to the NetServiceNewConnection callback.

Setting NETSERVICE_FLAG_NEGOTIATED_TLS will set the bUseNegotiatedTLS option in the NetBindingInfo passed to the NetServiceNewConnection callback.

Examples

None

See Also

NetServiceBindingNotify