Solved

Accessing a COM .exe from VB .Net

Posted on 2004-09-23
2
174 Views
Last Modified: 2010-04-23
I'm really sorry if this is a dumb question but how do I get at the services on a COM exe from within VB .Net?  I have just started using VB .Net having been using VB6 for ages and ages and I cannot see hwo to do it.  As usual the help is useless.

Goodwill to all,

Rob.
0
Comment
Question by:brushhead
2 Comments
 
LVL 28

Expert Comment

by:iboutchkine
ID: 12132291
try this

The System.Diagnostics.Process class provides several methods to launch and controls other Windows
processes. For example, the following code sample shows how to run Notepad, pass arguments to it,
and run it from inside a given intial directory:

' this code assumes that you have used this Imports statement
' Imports System.Diagnostics

Dim proc As New Process()
' Prepare to run Notepad and load C:\Autoexec.bat in it.
proc.StartInfo.FileName = "Notepad.exe"
proc.Start()


0
 
LVL 3

Accepted Solution

by:
RacinRan earned 50 total points
ID: 12135298
The COM component has to be installed and registered on the development machine.  The you add a reference to it using Add Reference and selecting on the COM tab.  Add it to you project and you should be able use the objects just like you would use .Net objects.

Racin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now