473,724 Members | 2,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET and ActiveX

I'm just starting a C++ application which will send data to someone
else's program (written as a VB ActiveX COM app)
and receive some data back from it.

I have the Visual Studio .NET 2003 develoopment environment
and I decided to use C++.

Just as #import once built the interface for me in the Visual Studio 6.0
compiler,
what .NET framework tools might I use to build the interface to the other
app?

The C++ app will be on a web server.

Thanks for any suggestions, this is my first .NET app.

Jim

Nov 17 '05 #1
1 1869
"Aaron Hare" <ah***@online.m icrosoft.com> wrote in message
news:9F******** *************** ***********@mic rosoft.com...
I'm not sure I understand your question. Specifically, I'm not clear on why you'd need to use something other than >#import unless you are writing a
managed app in a lanaguage other than in C++. So, I'll try to answer by
assuming that >your situation is that you want to write a managed app that
interacts with an ActiveX app

in respose to a previous posting from James Pannozzi that read:
I'm just starting a C++ application which will send data to someone
else's program (written as a VB ActiveX COM app)
and receive some data back from it. I have the Visual Studio .NET 2003 develoopment environment
and I decided to use C++. Just as #import once built the interface for me in the Visual Studio 6.0
compiler,
what .NET framework tools might I use to build the interface to the other
app?

Thanks, your assumption was right on, I should have specified that I was
considering a managed app.
I want to end up with an app that has a Datagrid control in an ASP .NET
page
and data from the grid flows to and from the external ActiveX app.

Your answer seems exactly what I was looking for.

I suspect that doing it as a managed app may actually end up being less work
that then #import way though I will of course proceed somewhat more slowly
with the plethora of new tools and concepts available.
Thanks Again
Jim


"Aaron Hare" <ah***@online.m icrosoft.com> wrote in message
news:9F******** *************** ***********@mic rosoft.com...
James:

I'm not sure I understand your question. Specifically, I'm not clear on why you'd need to use something other than #import unless you are writing a
managed app in a lanaguage other than in C++. So, I'll try to answer by
assuming that your situation is that you want to write a managed app that
interacts with an ActiveX app.
In that case, you'll probably want to use tlbimp, which creates managed assemblies that can communicate with the activex control (aka "Interop
Assemblies" or "Runitme Callable Wrappers"). You can then add a reference
to the interop assembly to your managed project to access the unmanaged
object model. (see
http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpgrfTypeLibrar yImporterTlbimp exe.asp for a description.)
Also, if the unamanged application is publicly available, you might want to find out if the vendor has a Primary Interop Assembly ("PIA") available
instead of using tlbimp. MS Office apps, for example, ship PIAs for
developers to use in exactly this situation. Using a PIA that was created
by the vendor has numerous benefits over using tlbimp yourself, as discussed
at
http://msdn.microsoft.com/library/de...us/dndotnet/ht
ml/whypriinterop.a sp.
Hope that helps get you started.

-Aaron
Please post questions to the newsgroup - everyone benefits.
This post is provided "AS IS" with no warranties, and confers no rights
Sample code subject to http://www.microsoft.com/info/cpyright.htm

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4563
by: AnalogKid | last post by:
Short question: What's the difference between SingleUse and MultiUse ? Long question: I've been writing some sample code to see how different Instancing values and threading models work. I tried all main combinations of Instancing (Multiuse/Singleuse) and of Threading models (per object/pool). Here's what I found: MultiUse - Thread per Object
1
5993
by: wang xiaoyu | last post by:
Hello: i want use activex in wxpython program,but when i use MakeActiveXClass an exception occurs. this is my source code dealing the DICOM ocx.I must note that in this program "hwtxcontrol" is a ocx developed my me use vc6,this ocx works fine in wxpython. but you can see i only change this ocx with a new DICOM ocx and set up eventClass,
2
7571
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run the VB program on that same machine, I can view the ActiveX control fine. He is using Citrix. The same ActiveX controls can be viewed on other machines. When trying to view 1 of the ActiveX control, he got an error "Visual Basic Run-time redist...
6
2588
by: Pippen | last post by:
I'm getting a little confused about what is supported in MS-SQL ActiveX and what is Visual Basic and what is VBScript. Can someone please point me to a website, recommend a book or if I've missed it where in the MS-SQL help that deals with the ActiveX supported in SQL. I'm not looking to do web pages ASP, ect. I'm looking to use the ActiveX as add on funtionality to support the Stored Procs I write. Thanks, -p
12
2589
by: A.M. | last post by:
Hi at all, how can I do to insert into a HTML page a file .txt stored in the same directory of the server where is the html file that must display the text file.txt? Thank you very much P.Pietro
0
7125
by: Ike | last post by:
I have an Activex Control created in VB6, which, displays no problem on any machine I have, but, on some machines of others, it does not. All machines are running either XP or Windows 2000, and all are running MSIE6.x, woth security settings set to display this control. For the life of me, I cannot figure out how such a simple control can be so sporadic in it;s showing on a page. It always downloads - it just doesn't always show. I'm...
18
8429
by: DartmanX | last post by:
Is there a simple way to determine if someone using Internet Explorer has completely disabled ActiveX controls? Jason
7
4395
by: Jarod_24 | last post by:
I just downloaded a activex control that was written in C# and tried to view it on my PDA's Internet Explorer. At my regular PC it displayed just fine, but nothing showed up on the pda. Do ActiveX controls that are to be used by a pda need to be written in the ..net compact framework, or am i missing something else here? i have a HP iPaq 2490 with Windows Mobile Premium installed While i'm at it; does a activex control allow you to...
4
6788
by: Wilfried Mestdagh | last post by:
Hi, I have a C# application (VS2005) with Microsoft Mappoint activeX control on a form. At a certain moment I want to create a second one temporary in code. This seems not to work, when I try to access it I have an InvalidActiveXState Exception. I cannot find mutch on the web about this Invalid State of a component except that it is invalid (what the Exception already describe). So I hope someone here knows ?
6
8076
by: hufaunder | last post by:
I have an ActiveX component that I want to use in a library that I am writing. As a first test I used the ActiveX component in a windows form application. Adding the component created: Ax.dll .dll I can not call the functions in the ActiveX component. In the next step I tried to use the ActiveX component in a class library. I simply added a reference to the corresponding COM component. This this only
0
8741
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9241
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9090
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8062
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6685
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5996
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4504
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4764
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2149
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.