peaps
(Fresh Scripter)
2006-01-18 01:04 PM
COM Event problem

I am attempting to get KIX to run a mini telnet server using the COM control oswinsck.dll which is a freeware winsock wrapper control. However, I am not sure how I get Kix to respond to events such as OnConnect etc. I noticed in a previous post that Shawn said events are definately not supported. If this is true, how does Kixforms respond to things like button presses etc?

Many thanks,

Andy Peaple.


ShawnAdministrator
(KiX Supporter)
2006-01-18 02:22 PM
Re: COM Event problem

Hi Andy. Your right - Kixforms responds to Kixforms events. Kixforms does not respond to COM events. And Kixtart (the scripting language) does not respond to any events at all.

The COM object your dealing has to provide some "mechanism" that allows Kixtart to work with it - despite the fact that Kixtart doesn't support events. That is how Kixforms works (it serializes events through the DoEvents loop). I wrote Kixforms for Kixtart, and worked around its limitations.

What you have to do is study the documentation for the COM object your working with (winsock or whatever) and find an alternate way of working with it.


Richard H.Administrator
(KiX Supporter)
2006-01-18 02:30 PM
Re: COM Event problem

I did some work on a socket COM object a long time ago - search the board for the KiXtart "socket" library if you are interested.

Basically, as you cannot handle events you need to poll the status' of the objects you are interested in. Alternatively, the object may present an event queue that you can query instead - if I've got the terminology correct the event queue might also be called a "sink".

Some objects unfortunately seem to require that events are handled. If this is the case with your object then you will not be able to script it with KiXtart.


Richard H.Administrator
(KiX Supporter)
2006-01-18 02:41 PM
Re: COM Event problem

Found the old posts here

The KiXtart scripts are no longer available at the URLs in the post, so if you want them drop me a line and I'll email them to you.

They use the Catalyst winsock wrapper, so you'll need that or recode for your new object.

Finally, it's worth pointing out that KiXtart cannot handle all object types that your object supports. It has a *lot* of problems with binary data (byte arrays) so if this is how your object presents input and output you may have a hard time of it. Chr(0) is the character which has caused most problems when I've attempted network stuff.


peaps
(Fresh Scripter)
2006-01-18 02:54 PM
Re: COM Event problem

Thanks richard. I think I will look at this Catalyst winsock wrapper. All I am trying to do is make a basic text message application, so byte arrays won't be an issue for me. I understand that Kix has got its limitations, but its still pretty amazing how versatile it is for a logon script processor. I'll email you about those scripts too. Cheers.

LonkeroAdministrator
(KiX Master Guru)
2006-01-18 03:09 PM
Re: COM Event problem

I think you should check the KiXforms too.
both KiXforms 2.3 and KF 3.1 .Net alpha have networking support.