Help with VB ActiveX Control and MFC DLL 
Author Message
 Help with VB ActiveX Control and MFC DLL

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



Sat, 05 Feb 2005 21:07:04 GMT  
 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

|
|



Mon, 07 Feb 2005 07:06:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem using VB 5 activex DLL in a VC++ activex control

2. Show modeless form in VB ActiveX DLL from C++ MFC DLL

3. HELP: activex control in dialog box in mfc user dll (dialog not launching)

4. Using an MFC Extension DLL from an MFC ActiveX Control

5. MFC app calling VB ActiveX DLL

6. Calling a VB ActiveX dll from MFC

7. Howto: Pass class object from VB ActiveX DLL to MFC

8. Calling VB ActiveX DLL from MFC applications(Newbie question)

9. how to insert vb activex control into mfc application

10. Calling VB ActiveX Control from MFC

11. Question: Catching errors from a VB ActiveX control in Visual C++ using MFC

12. VB ActiveX Control on a MFC VC++ Dialog.

 

 
Powered by phpBB® Forum Software