Solved

Accessing a COM .exe from VB .Net

Posted on 2004-09-23
2
175 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

813 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

10 Experts available now in Live!

Get 1:1 Help Now