Hello there!
Can someone assist me with a full winsock2 library +functions in any language I want to try and translate it into VBA because my project is in MS Access and so far I have not seen any winsock2 full code working. The only solution here is to get a working code in any language and try to translate into VBA, I know this is not a simple thing it will require huge number of hours to accomplish that, but it is better to do it once and for all. For example, for C++ below is my translation sample:
VBA standard
If I can have a full library + Functions I can try translating it into VBA , I have tried to check on the net but it appears nothing is coming through.
The major purpose here is to learn more on programing and see what happens after
Can someone assist me with a full winsock2 library +functions in any language I want to try and translate it into VBA because my project is in MS Access and so far I have not seen any winsock2 full code working. The only solution here is to get a working code in any language and try to translate into VBA, I know this is not a simple thing it will require huge number of hours to accomplish that, but it is better to do it once and for all. For example, for C++ below is my translation sample:
C++:
#ifndef UNICODE
#define UNICODE 1
#endif
// link with Ws2_32.lib
#pragma comment(lib,"Ws2_32.lib")
#include <winsock2.h>
#include <ws2tcpip.h>
#include <stdio.h>
#include <stdlib.h> // Needed for _wtoi
VBA standard
Code:
#If Not UNICODE Then
UNICODE = 1
#End If
Private Declare Function Ws2_32 Lib "Ws2_32.dll" Alias "WSAStartup" (ByVal wVersionRequested As Long, lpWSAData As WSAData) As Long
Private Declare Function Ws2_32 Lib "Ws2_32.dll" Alias "WSACleanup" () As Long
Private Declare Function Ws2_32 Lib "Ws2_32.dll" Alias "getaddrinfo" (ByVal pNodeName As String, ByVal pServiceName As String, lpHints As addrinfo, lpResult As Long) As Long
Private Declare Function Ws2_32 Lib "Ws2_32.dll" Alias "freeaddrinfo" (lpAddrInfo As addrinfo) As Long
Private Declare Function Ws2_32 Lib "Ws2_32.dll" Alias "getnameinfo" (ByVal sa As SOCKADDR, ByVal salen As Long, ByVal host As String, ByVal hostlen As Long, ByVal serv As String, ByVal servlen As Long, ByVal flags As Long) As Long
If I can have a full library + Functions I can try translating it into VBA , I have tried to check on the net but it appears nothing is coming through.
The major purpose here is to learn more on programing and see what happens after