Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / July 2007



Tip: Looking for answers? Try searching our database.

ATL question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Grey Alien - 27 Jul 2007 07:45 GMT
I have a C++ class that I need to wrap up in a COM (ATL) object. After a
little initial reading/investigation, this seems to be not too much of
an issue - however, my class has no default ctor - i.e. all its ctors
require one or more arguments (in one case - a ctor takes a C++
reference) - so far I haven't seen an example where a COM class's ctor
takes arguments (let alone a C++ reference) - can this be done? if yes, how?
Any pointers/links would be appreciated
Ralph - 27 Jul 2007 14:07 GMT
> I have a C++ class that I need to wrap up in a COM (ATL) object. After a
> little initial reading/investigation, this seems to be not too much of
[quoted text clipped - 3 lines]
> takes arguments (let alone a C++ reference) - can this be done? if yes, how?
> Any pointers/links would be appreciated

Quick 'n dirty response...

You will have to provide a default.
COM uses only OLE Types. Well you can fake a few using Variants and such,
but best not to go there as you will destroy the basics of "COM" - binary
independance.
Use and play with the ATL Wizard. It will do much of the work for you and
provide a good example of how it all works. After you are comfortable - then
you can start bending the rules. <g>

But more importantly you are in the wrong newsgroup. This one is for users
of Classic VB and COM. You might try one of the VC++ ones.

-ralph
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.