473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 1720
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stephanie | last post by:
I have a problem that I am trying to solve. We have a huge product with a whole lot of ASP and VB code. VB code is all ActiveX dlls which are used by ASP app. When I attempt to add features or fix...
4
by: mike | last post by:
I'm tring to learn how to use activeX controls in my C++ programs but have hit a stone wall. I have a server control that's suppose to pass the clients name and password. The VB example shows it...
1
by: Owen Woo | last post by:
I have built many controls in VC++, how can I use these control in C# without re-programing? Thanks.
4
by: Bob C. | last post by:
Hi All, I was working on MFC ActiveX controls using VC++. Now i moved to C#.NET. In MFC ActiveX we have DoPropertyExchange(), what is an equivalent to that in C#.NET...
0
by: Anders Eriksson | last post by:
Hello! I don't get it! How do I use an ActiveX control in VC++ 7.1?? I'm using MFC and I have added the ActiveX control to my ToolBox and then added it to my CFormView. In VC++ 6.0 there...
3
by: MD Websunlimited | last post by:
I'm having a problem utilizing a control that was created in VB 6 sp6 in VC 7 (unmanged). The VC7 is a dialog based application that uses the control. The control work perfectly in a VB test form but...
1
by: Nick Wilton | last post by:
Hello, sorry for X-posting Hope you are able to help with this one as its really urgent. I have two unmanaged VC++ 7.0 projects which requre the use of ActiveX controls within the dialog...
0
by: Shrii | last post by:
1.I am using an inhouse developed ActiveX control in MFC application. 2.I created application inserted ActiveX control, created a member variable with that control. 3.I got respective .cpp and .h...
15
by: Michael Tissington | last post by:
I have a Visual Basic 6.0 ActiveX Control. It seems there is no way with VS 2005 to create a similar control for containers that host ActiverX controls, is this correct ? I'm thinking of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.