VbAsyncSocket icon indicating copy to clipboard operation
VbAsyncSocket copied to clipboard

VBA compatibility

Open afvca opened this issue 5 years ago • 4 comments

Hello,

I have been looking for a TCP socket server/client implementation in VBA, but couldn't find any up to date.

However, stumbled upon this library but not sure how to implement this in VBA.

Could you share some guidance on how to make this (can it?) work on a VBA project?

Thank you.

afvca avatar Dec 11 '20 18:12 afvca

The project is not tested in VBA at all and github erroneously marks the repo as VBA sources because it apparently does not understand VB6.

Of the three backends only mdTlsNative stands some chances to be x64/VBA compatible but on first look it seems like it will take some (significant) effort to port it to VBA too.

wqweto avatar Dec 11 '20 20:12 wqweto

@andreafonso It seems you are interested in the cAsyncSocket class, not the TLS implementation.

That would need a new x64 ASM thunk -- never done it before so the challenge is very tempting :-))

wqweto avatar Dec 12 '20 10:12 wqweto

Yes, was looking for a socket class implementation (simple connect, send, receive, close), to have some kind of two way communication in VBA. I found some examples using the ws2_32.dll but was not able to get it to work on x64 Excel 2019.

Well, here's a challenge if you want to give it a try 😉

afvca avatar Dec 12 '20 11:12 afvca

I was able to create a DLL for the stuff I need from this project without typing a single line of code, and using that for my VBA programs. It works perfectly. You may want to consider doing that.

Montclair avatar Jun 07 '22 12:06 Montclair