Solved

Accessing a COM .exe from VB .Net

Posted on 2004-09-23
2
176 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb.net cycle through results of a sql query and capture variables 3 27
VB.NET String Settings and Temp Folder Question 3 75
Asp.Net Session Question 2 36
vb.net sendkey 4 19
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

697 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