472,093 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,093 software developers and data experts.

Add reference withing an vc++ ActiveX Control

I am creating an ActiveX control that should contain a reference to a certain
COM interface.
I have written before a C# application containing this COM interface but my
problem is that it seems not to be possible to add a reference to my COM
interface within my vc++ ActiveX controller.
Perhaps Im missing some fundemental understanding about ActiveX controllers.

So I guess my question is. Is it possible to add a reference to a COM
interface within an ActiveX controller?
--
________________________
Gunnar Gudmundsson
Apr 9 '06 #1
1 1638
OfurGørn wrote:
I am creating an ActiveX control that should contain a reference to a
certain COM interface.
I have written before a C# application containing this COM interface
but my problem is that it seems not to be possible to add a reference
to my COM interface within my vc++ ActiveX controller.
Perhaps Im missing some fundemental understanding about ActiveX
controllers.

So I guess my question is. Is it possible to add a reference to a COM
interface within an ActiveX controller?


Project references, such as you're used to in C#, don't exist in unmanaged
C++. Instead, to make use of a COM component, you'll typically #import the
type library (.TLB or .OCX) file directly in your C++ code (you can do this
in you "precompiled header file", usually known as stdafx.h as well). If
you don't have a type library, then typically you'll have either an IDL file
or a C-header file (.H file) that you can include in your project to expose
the type and constant defitions for the COM object to your C/C++ code.

-cd
Apr 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by mike | last post: by
1 post views Thread by Owen Woo | last post: by
4 posts views Thread by Bob C. | last post: by
reply views Thread by Anders Eriksson | last post: by
3 posts views Thread by MD Websunlimited | last post: by
reply views Thread by Shrii | last post: by
15 posts views Thread by Michael Tissington | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.