0xC0000022 = STATUS_ACCESS_DENIED
A process has requested access to an object, but has not been granted those access rights.
1. An outbound rule for TCP remote port 3333
2. An inbound rule for TCP local port 3333
This is accomplished by running a program in privileged mode that adds these two rules using the INetFwRule interface (API) by setting the properties using the put_ methods, and then by calling "hr = pFwRules->Add(pFwRule); " .
The loopback address should not be specified in put_localaddresses or put_remoteaddresses -- this is not recommended or supported. Instead, to block incoming TCP connectivity to local port 3333, configure a rule using Windows Firewall with Advanced Security, netsh or the Firewall Control Panel to block incoming connection requests. Unlike WSH, rules created using these tools have no effect on loopback communication.
Article ID: 2771908 - Last Review: Oct 22, 2012 - Revision: 1