Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 8th, 2004, 01:45 PM
Registered User
 
Join Date: Jun 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pass active X control from c++ to VB DLL

Hi all

I have a C++ application using a formula one control which stores data. I have written a VB DLL to accept that formula one as an object and then manipulate the data in VB. When i do this, I am getting an error during execution of my c++ app. Note that I am not a professional C++ developer. I get this error message :

The object invoked has been disconnected from its clients

any body can help me how to go about doing this..

Thanks
Ramesh

 
Old June 8th, 2004, 01:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try these web sites:

MSDN Online KB Article - 194873

http://www.codeproject.com/com/vb_from_vc.asp

http://www.codeproject.com/dll/vbactivexwithvc.asp

Don't have much time lately, hope this helps.


Larry Asher
 
Old June 8th, 2004, 02:28 PM
Registered User
 
Join Date: Jun 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the links. But my problem here though is unable to use the function in the dLL. I am able to talk to the VB DLL and use any simple function like adding numbers. But in VB i have a function of the following code ;

Public Function getFbook(Fbook As F1Book) As Variant
Dim i As Integer
For i = 1 To Fbook.NumSheets
     MsgBox Fbook.SheetName(i)
Next
End Function

c++ code
             HRESULT hr;
           hr=CoInitialize(0);

           //IF1Book *m_pIF1Book;
           _Class1Ptr ptr;

           ptr.CreateInstance(__uuidof(Class1));

          ptr->getFbook((IF1Book**)&m_hSS);

This piece of code compiles but while running it fails and gives an error like "The object invoked is disconnected from clienst"

Any help appreiciated






Similar Threads
Thread Thread Starter Forum Replies Last Post
Active Directory - Pass Credentials kjak Classic ASP Basics 1 November 18th, 2008 02:03 AM
How to fire events of a Active X dll in ASP.NET Brijendra Pandey ASP.NET 3.5 Professionals 1 October 4th, 2008 05:44 PM
Creating Active X DLL CoolEJ VB Databases Basics 7 November 30th, 2007 02:29 PM
DTSHelper Active X dll ErinG SQL Server DTS 0 March 15th, 2007 09:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.