
Help with VB ActiveX Control and MFC DLL
Hi ElSeeker,
You can try creating an ATL or MFC COM component. In VB, sink the event of
the component. However, firing an event in a different thread has some
issues. Please check the article below for detailed information:
http://www.mvps.org/vcfaq/com/1.htm
Please note that the KB articles referenced in the article are helpful.
Best Regards,
Leo Chen
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Newsgroups: microsoft.public.vc.mfc
| Subject: Help with VB ActiveX Control and MFC DLL
| Organization: Software Developer
| X-Newsreader: WinVN 0.99.9 (Released Version) (x86 32bit)
| MIME-Version: 1.0
| Content-Type: Text/Plain; charset=US-ASCII
| NNTP-Posting-Host: 207.148.196.153
| Date: 20 Aug 2002 16:07:04 -0400
| X-Trace: 20 Aug 2002 16:07:04 -0400, 207.148.196.153
| Lines: 21
| Path:
cpmsftngxa10!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de!news.stealth
net!news.stealth.net!news-feed.fnsi.net!athena.netset.com!207.148.196.153
| Xref: cpmsftngxa10 microsoft.public.vc.mfc:342829
| X-Tomcat-NG: microsoft.public.vc.mfc
|
| I am trying to find a way to get the following to work - no code yet,
just trying to get some insite on how to go about
| getting started.
|
| I will have a VB6 application with a custom ActiveX control on it. This
Control will have 1 event that will contain 1
| parameter (a string of characters) that will be passed in as part of the
event.
|
| The MFC DLL will get loaded by the VB application and will create several
Threads that monitor for certain events to happen.
| When one of these events occur I need to trigger the ActiveX event in the
VB application and pass in a string of characters
| to it.
|
| I am quite new to the world of ActiveX/COM so I am not sure if the above
makes sense or not... but what I am trying to
| accomplish is to have the MFC DLL perform a Callback into the VB
application. I played around with the AddressOf command in
| VB and implemented a normal callback function.. but VB has some issues
with this so I decided to look at other alternatives.
|
| If anyone has some thoughts on how to implement this type of "Callback"
functionality between a MFC DLL and a VB application
| - even if the ActiveX control is not used; I would greatly appreciate
hearing about it.
|
| Thanks.
| ElSeeker
|
|