wqweto / VbAsyncSocket

Sockets with pure VB6 impl of TLS encryption
MIT License
164 stars 31 forks source link

VBA compatibility #11

Open afvca opened 3 years ago

afvca commented 3 years ago

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.

wqweto commented 3 years ago

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 commented 3 years ago

@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 :-))

afvca commented 3 years ago

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 😉

Montclair commented 2 years ago

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.