Sorry people for asking probably a silly question but it matters most.
How do we get the socketID from an Ip address & Port number using VBA
Example
IP address = "127.0.0.1"
Port number = 7070
Just in case some may not understand the properties above when added together must give us the socketID, but how do we do it so that it ties up with the long datatype
How do we get the socketID from an Ip address & Port number using VBA
Example
IP address = "127.0.0.1"
Port number = 7070
Just in case some may not understand the properties above when added together must give us the socketID, but how do we do it so that it ties up with the long datatype
Code:
Public Declare PtrSafe Function closesocket Lib "wsock32.dll" (ByVal s As LongPtr) As Long
Code:
'Close the socket and transport
Function ClosingNetwork(ByVal Socket As LongPtr) As Long
Call closesocket(Socket)
Call WSACleanup
MsgBox "Port has now closed", vbCritical, "Please Move On"
End Function