| Read Responses | Return to Index | Read Prev Msg | Read Next Msg |

Slink-e / CDJ Discussion Archive #4

Re: Slinkx recursion

Posted By: Colby Boles <cboles@n...>
Date: 5/17/1999 10:38a.m.

In Response To: Slinkx recursion (Greg Kusnick)

I'm not a big VB programmer, but I had spent some talking to a friend at MS who helped write VB when I was designing this ActiveX Control. Here is my (hopefully correct) understanding of how VB works:

1) It's not multithreaded. It's not free-threaded. The idea of processing another event while in an event handler just doesn't work. I think you have to leave the event handler before the message pump is running again and can fire new events.

2) The part of the SlinkX control which fires events is on the same thread as your application. When it fires an event, its code is not running again until your event handler completes. Messages received from Slinkeserv are handled on a seperate thread which cannot be interrupted by your program execution and are queued for event firing in the other thread.

3) You can certainly issue the Send() command from within the event handler.

4) I think VB timers might be a special case where regular processing is interrupted, but other A/X events won't interrupt processing until a procedure has returned.

5) Can you give me an example on another A/X control which allows the re-entrancy you describe? (e.g. you pop a modal dlg inside the event handler and you are able to get another event)

6) The way programs like CDJ work is through multithreading. One thread owns the A/X control and processes / dispatches all of the messages it receives. Other threads are responsible for the user interface and playback control and respond to changes in state variables updated by the A/X thread. This works nicely, but may be hard to emulate in VB.

Responses To This Message

| Read Responses | Return to Index | Read Prev Msg | Read Next Msg |

Password:

Slink-e / CDJ Discussion Archive #4 is maintained by slinke-bbs-owner@nirvis.com with WebBBS 3.21.