Making VC++ class available to VB... 
Author Message
 Making VC++ class available to VB...

I want to make an existing VC++ class accessible to
a VB application. Is an OLE Automation Server the only
way to do this?

Thanks.

Ken....



Mon, 20 Sep 1999 03:00:00 GMT  
 Making VC++ class available to VB...

Any OLE unit (automation, control, etc) would work.
--
Microsoft Money98 Software Developer
The opinions expressed in this message are my own personal views
and do not reflect the official views of Microsoft Corporation



Quote:
> I want to make an existing VC++ class accessible to
> a VB application. Is an OLE Automation Server the only
> way to do this?

> Thanks.

> Ken....



Tue, 21 Sep 1999 03:00:00 GMT  
 Making VC++ class available to VB...



Quote:
> Any OLE unit (automation, control, etc) would work.
> --
> Microsoft Money98 Software Developer
> The opinions expressed in this message are my own personal views
> and do not reflect the official views of Microsoft Corporation



> > I want to make an existing VC++ class accessible to
> > a VB application. Is an OLE Automation Server the only
> > way to do this?

Certainly it's true you need OLE to get it to look like a VB class.  If you
need more limited functionality, though, there are a couple of other routes
using plain DLLs:

(1) If all you want to do is hang on to some C++ created objects and use
them in later call to C++ routines, it's fine to just use longs to save and
pass the pointers.  You have no access to the members this way, of course.

(2) You can take advantage of the fact that C++ stores its objects pretty
much like UDTs.  For example, you could create an object in C++, pass it
back as a UDT you define in BASIC, and manipulate its data members
directly.  Presumably, you could pass a UDT to C++ as a class, also.  Of
course, with the different way strings are stored in the two languages,
variable alignment in UDTs, etc., you might find it too hairy to be of use,
but I know that it CAN be done!



Tue, 21 Sep 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. making dll for vb5 with vc++

2. Making my programs available to the world and making my fortune (grin)

3. VC++ Class properties/method access in VB program?

4. exporting VC class to VB

5. call a VB class from VC

6. VC++ Class properties/method access in VB program?

7. Exposing classes from VC to VB and Variable arguments

8. Class file deleted but class is still available

9. VB 4 Class Tool Beta Available!

10. Useful VBScript macro for VC++ available

11. 3rd party tools for VB vs VC vs VC++

12. problem: vc++ dll and vb

 

 
Powered by phpBB® Forum Software