Blocked inbound or outbound? Try to connect to the machine (or a remote machine if you are supposedly blocking outbound) if it succeeds then the firewall is a failure, if it fails the the firewall may still be a failure because there are many, many ways for a connection to fail.
If you want a Windows API call to find out what the Windows firewall settings are then it is best you ask Microsoft
Bookmarks