Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to write a VBA code to check whether TCP port (e.g.3306) isblocked or not?
Hi,
Can anyone please help me to find out a way to check whether a local TCP Outbound/Inbound blocked or not? Many thanks in advance! Best regards Ratheesh |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to write a VBA code to check whether TCP port (e.g.3306) is blocked or not?
Hi,
Can anyone please help me to find out a way to check whether a local TCP Outbound/Inbound blocked or not? Many thanks in advance! Best regards Ratheesh Perhaps... http://www.example-code.com/vb/tcp-socket-connect.asp -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to write a VBA code to check whether TCP port (e.g.3306) isblocked or not?
Hi Garry,
Thanks for your help! goes a very long way. Finally I found a way to get the TCP port status, I hope this would help someone. Set objFirewall = CreateObject("HNetCfg.FwMgr") Set objPolicy = objFirewall.LocalPolicy.CurrentProfile Set objPort = CreateObject("HNetCfg.FwOpenPort") objPort.Port = YourPortNumber Then check whether it is enabled or not - objPort.Enabled Hope this will help Best regards Ratheesh |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to write a VBA code to check whether TCP port (e.g.3306) is blocked or not?
Or simply...
Function IsTcpEnabled(Optional PortNum&) As Boolean If PortNum = 0 Then PortNum = 119 '//edit to actual With CreateObject("HNetCfg.FwOpenPort") .Port = PortNum: IsTcpEnabled = .Enabled End With End Function -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to write a VBA code to check whether TCP port (e.g.3306) is blocked or not?
Note that this only 'assigns' a port#, and returns whether or not that
port# is enabled. It does not tell you if an existing port# on 'localhost' is enabled! -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to write a VBA code to check whether TCP port (e.g.3306) isblocked or not?
Ok.
Actually I need to check the Incoming Port 3306(MySQL) to get a key. If that disabled, I need to open the port for a limited time and get the information. Many thanks! Ratheesh |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
using code to communicate with com1 serial port | Excel Programming | |||
How do I write formula to check a range of cells? | Excel Worksheet Functions | |||
Clean up code and port to Mac | Excel Programming | |||
Capturing Data from a Com Port or Printer Port | Excel Programming | |||
Read/write a Serial Port | Excel Programming |