Anyone programming Sockets?

I was wonderig if anyone has tried programming any win sock interface with Navision? Right now I am attempting to write an interface with the FedEx Powership server. But, it occurred to me that using the same socket programming it would be fairly simple to write an smtp client and ftp client to solve some of the questions that are asked so often. I have looked at mswinsck.ocx, socketwrench from http://www.catalyst.com and sockets from http://www.dart.com as possible automation / controls. I am finding it difficult to work with events and so on. If anyone has has some luck, or has any guidance, I’d appreciate it! Thanks!

Hi John I recently tried to do some similar work - use Navision Client listen and communicate using port 25 (act as some sort of Telnet server). I used dart ocx, but in the end I wrote my own OCX using mswinsock.ocx But if you have to work with events, you can not do that from Navision. All events have to be handled in the ocx itself. Michal

Michal - I’m glad you’ve shared the vision of tcp enabling Navision! I’m not an experienced ocx creator (yet) – but what gave me hope was N2.65 and up – in fact automation and custom controls now do support events! There is a new property under the automation variable called WithEvents. Setting this to ‘Yes’ will automatically add the event functions to the codeunit. Hence the idea to do everything within C/SIDE. The other nice thing is that Windows clients come pre-installed with mswinsck so there is no roll out of customer controls. If you, or anyone, has any tips on using the SingleInstance property (other than the mannual) … please join the thread (excuse the pun). Enjoy your day, John

You could do every thing in cside if you wished but that would make things harder than they are. It would be better to split the task into two. Do the message receiver processing in VB and pass the message to Navision. Look at Codeunit 6221 as an example of SingleInstance codeunits and handleing external events. Paul Baxter