Page 1 of 1 1
Topic Options
#119605 - 2004-05-14 08:36 PM Event Sinks
Bonji Offline
Starting to like KiXtart

Registered: 2001-09-28
Posts: 169
Loc: Virginia
Jens referred to using Event sinks in leui of not being able to use COM events in this post...
http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=79619&page=0&view=collapsed&sb=5&o=&fpart=1#Post117615
Has anyone used this before? I'm having a little trouble getting started, and am not really sure what the trick is to this process. Are the event sinks setup as functions? If so, how are they called?

Any info is appreciated.

-Ben
http://www.rgcweb.org/kix

Top
#119606 - 2004-05-14 10:03 PM Re: Event Sinks
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
what exactly are you trying to accomplish/code?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#119607 - 2004-05-14 11:07 PM Re: Event Sinks
Bonji Offline
Starting to like KiXtart

Registered: 2001-09-28
Posts: 169
Loc: Virginia
My initial goal is to be able to use SocketWrench with KiX scripts. I need to be able to intercept the events it generates to make a program as functional as I need it to be.

-Ben
http://www.rgcweb.org/kix

Top
#119608 - 2004-05-15 02:42 AM Re: Event Sinks
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Have you investigated using Perl to write your socket application?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#119609 - 2004-05-15 03:07 AM Re: Event Sinks
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Ben is working on a messenger-like KiXforms application.
Top
#119610 - 2004-05-15 03:47 AM Re: Event Sinks
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Dont think there is much by way of support for sinking COM events with native Kixtart ... maybe Jens is aware of a COM object that will front these events for scripting languages like ours. Best thing would be for Ruud to build this into the language itself but its debatable in terms of its broad appeal. But if he did embed into the language, would open up some whole new vista for things like KF and Sockets and a few other things like interfacing with IE (maybe).
Top
#119611 - 2004-05-15 05:03 AM Re: Event Sinks
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Search MSDN for event sinks or see e.g. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/swbemsink.asp or http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/receiving_asynchronous_event_notifications.asp
_________________________
There are two types of vessels, submarines and targets.

Top
#119612 - 2004-05-15 04:48 PM Re: Event Sinks
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
I see nothing in those links that applies to KiXtart scripting.

I have used semisynchronous events with WMI and KiX, but AFAIK it will only work with WMI scripts. Not to mention that script execution is halted until the next event occurs. This is OK in certain applications, but not what Ben is looking for.

Top
#119613 - 2004-05-16 11:29 PM Re: Event Sinks
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
unless he uses multiple processes.
tricky it is but that way it does not hurt for one process to wait.
_________________________
!

download KiXnet

Top
#119614 - 2004-05-17 02:59 PM Re: Event Sinks
Bonji Offline
Starting to like KiXtart

Registered: 2001-09-28
Posts: 169
Loc: Virginia
Thanks for the feedback. I'll think about breaking the network code down to work around the waiting.

I've been able to get socket functionality to work in KiX. It's just that without the events I have to use blocking on the socket which is highly annoying because I can't do anything with it until a connection is generated. And it also means I can never shut down my script except by killing the process in Task Manager because it will always be listening for a new connection.

There may have been some other issues, but it's been so long since I worked with this that I don't remember.
At least the client side can shut down gracefully.

-Ben
http://www.rgcweb.org/kix

Top
#119615 - 2004-05-17 03:17 PM Re: Event Sinks
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well... AFAIK, messenger also uses shares and files, so think you can too.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.066 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org