How can i call vb subroutine inside a c++ COM 
Author Message
 How can i call vb subroutine inside a c++ COM

I have a c++ Addins COM, this COM adds a tool to another tool Addin manager, it
also creats a menu item and a button. Now the rest of the code is visual baisc
code and its in an activex dll what i want to do .. is that in the onclick()
method in my c++ COM i want to call the Visual Basic subroutine that goes and add
the other menu items to the back ground and do all the other required

what i did is that in the c++ Addins file i imported my dll
#import "C:\Main.dll" raw_interfaces_only raw_native_types no_namespace

then refrenced the subroutine name inside the onClick method:

STDMETHODIMP Menu::OnClicked( IDispatch* pIDispatch )
 ATLASSERT( pIDispatch );

 CComQIPtr< IGDEventCell > cpEventCell( pIDispatch );
 if( cpEventCell )

  _Main *x;


  hr = S_OK;

 return hr;


in my visual basic all launch do testing is that it displays a message box:

Public Sub Launch()

    MsgBox "Selected Launch "

End Sub

what happens now is that the c++ COM add the tool .. creat the menu and the
button .. but when i click it nothing happens at all .. which means that the{*filter*}
between the COM and the VB code doesn't happen .. my code doesn't give any
compiling erorrs..

If you have any feed back ..please let me know

Sun, 06 Jul 2003 23:48:51 GMT  
 [ 1 post ] 

 Relevant Pages 

1. call a VB COM dll thru a C++ COM dll from a C program

2. call a VB COM dll thru a C++ COM dll from a C program

3. Call Com objects inside c++ object

4. Problem with scripting context when using VB com object inside VC com object

5. Enable COM clients call methods inside COM events

6. how can i call vb sub in a c++ COM

7. Calling VB COM Object from C++

8. Problem calling VB COM dll from VC++ multithreaded COM EXE client

9. How to call FORTRAN subroutine in C++?

10. Detect WM_KEYDOWN or WM_LBUTTONDOWN inside a regular MFC DLL that is called from VB.

11. Please Help - How to get the Client ID inside a COM server function call

12. Embed VB code inside of C++ code?


Powered by phpBB® Forum Software