Re: Sending Events to VB6 Using Implements Keyword - debugging
- From: "Brian Muth" <bmuth@xxxxxxxx>
- Date: Thu, 18 Aug 2005 13:49:47 -0700
<info_Seeker77@xxxxxxxxx> wrote in message
news:1124394644.778901.95610@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Brian,
>
> I waited over two hours for a response, so naturally I read with
> anticipation.....
>
> Only to find that your tone is insulting and patronising. I'm not
> impressed!
>
> The question is simple:
>
> There are basically two ways of getting events from an ATL dll to vb:
>
> 1) use connection points ("WithEvents"
>
> 2) Use an interface ("Implements")
>
> Now it isnt really that difficult to undertstand, is it, Brian?
>
Ah, so you mean the VB6 client is supplying a callback interface. This
wasn't clear to me in the OP.
> yes but ATL is a very good way of using multithreading techniques to
> get the job done in vb. Whilst vb has just one thread, the dll can have
> many. I only emphasised the point so as not to get a million replies
> about "you can only call back to vb on the vb thread itself, not from
> another". I dont want to go down this route. Its not a problem, and i
> was merely making this clear. There are about 5000+ posts about this
> problem because people dont understand vbs threading model. (e.g "my vb
> / atl app crashes when complied and not in the IDE", etc etc).
>
Your OP made no mention of the fact you are spawning a worker thread in the
ATL code, so I didn't twig to your mention of: "I make sure I am on the
correct thread through the use of a hidden window and the PostMessage
method, and it works well in compliled and IDE". Your second post (laiden
with vitriol) was very helpful in clarifying what you meant.
> So, again, my question is this:
>
> If I use connection points, the VB IDE behaves itself in debug break
> mode. The "events" are prevented from reaching the VB IDE in debug
> mode, and the code can be worked upon with ease.
>
> If I use the IDispatch interface, however, the DLL still calls the
> Implements methods in the VB IDE - often, as it turns out (they are
> from a timer, as I explained) BUT the vb ide is no longer workable; it
> stops responding.
>
> Its as if my ATL Dll needs to "know" when vb is in debug break mode, so
> it can AVOID calling the interface methods just while the op is
> debugging.
>
> I think, Brian, you have plenty of experience with ATL, but not with
> the VB IDE - so perhaps someone could reply without the snobby
> attitiude?
>
For debugging purposes, I tend to use the C++ debugger, which works quite
nicely with VB6 code. Have you given that a try? I've used it successfully
when the VB6 debugger hangs on me.
Respectfully,
Brian
.
- Follow-Ups:
- Re: Sending Events to VB6 Using Implements Keyword - debugging
- From: info_Seeker77
- Re: Sending Events to VB6 Using Implements Keyword - debugging
- References:
- Sending Events to VB6 Using Implements Keyword - debugging
- From: info_Seeker77
- Re: Sending Events to VB6 Using Implements Keyword - debugging
- From: Brian Muth
- Re: Sending Events to VB6 Using Implements Keyword - debugging
- From: info_Seeker77
- Sending Events to VB6 Using Implements Keyword - debugging
- Prev by Date: Re: Sending Events to VB6 Using Implements Keyword - debugging
- Next by Date: Re: Additional Interfaces deriving from previous interfaces - Wizard?
- Previous by thread: Re: Sending Events to VB6 Using Implements Keyword - debugging
- Next by thread: Re: Sending Events to VB6 Using Implements Keyword - debugging
- Index(es):
Relevant Pages
|