473,386 Members | 1,793 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.

Allowing other apps access to methods in a .net app

cj
I've often used methods exposed by software purchased for other uses to
automate tasks. For instance back in the late 90's I found the terminal
emulation package the company exposed methods that allowed me to write a
VB program that could use that terminal emulation package to connect to,
read, and enter data on the company's mainframes. I think this was
called OLE?

Well now I'm on the other end of the picture and I need to write into a
..net program the ability to allow Microsot MOM or System Center Manager
(whatever it's called now) to check the value of a few variables.
Ideally this would be done in such a way that any other software could
call a method of my app and get the value of a variable. I'm not sure
OLE will work because unlike the terminal emulation software which was
started up by the VB program, in this case my .net program is constantly
running and working independently it just needs to be probed for status
info.

Can someone tell me the buzz word for what I need to do so I can find
some info on how do do it? BTW my application is a Windows App, NOT
ASPX so a web service is NOT what I'm looking for.

If all else fails I'll just keep some environment variables set and
updated that MOM can look at.

Thanks!
Oct 20 '07 #1
4 1307
CJ,

The term that describes what you're trying to do is called "COM Interop".
Dot-Net code can call into ActiveX DLL's using the Com Interop feature. At
our company we have made extensive use of this ability as we migrate our
application forward a piece at a time.

-bwr-
"cj" <cj@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
I've often used methods exposed by software purchased for other uses to
automate tasks. For instance back in the late 90's I found the terminal
emulation package the company exposed methods that allowed me to write a
VB program that could use that terminal emulation package to connect to,
read, and enter data on the company's mainframes. I think this was called
OLE?

Well now I'm on the other end of the picture and I need to write into a
.net program the ability to allow Microsot MOM or System Center Manager
(whatever it's called now) to check the value of a few variables. Ideally
this would be done in such a way that any other software could call a
method of my app and get the value of a variable. I'm not sure OLE will
work because unlike the terminal emulation software which was started up
by the VB program, in this case my .net program is constantly running and
working independently it just needs to be probed for status info.

Can someone tell me the buzz word for what I need to do so I can find some
info on how do do it? BTW my application is a Windows App, NOT ASPX so a
web service is NOT what I'm looking for.

If all else fails I'll just keep some environment variables set and
updated that MOM can look at.

Thanks!

Oct 21 '07 #2
If i understand you correctly the scenario is :

The app that you developed is running constantly on a system other programs
written by third parties must have the ability to comunicate with this one
running instance .

Well in this case a inmediate COM interface wil not solve the problem as COM
creates a new instance in the past ( VB6 ) you could create ACTIVEX
executables with VB6 in apartment threaded state so 1 instance could server
many clients since .Net this is not possible annymore with COM , every .Net
COM instance is actually a new instance of your component .

What can you do to solve this :

You could make your app a service and control it with the service
controler or through a database
You could create your app as a singletong remoting object hosted in a
remoting server
You could use WCF ( requires framework 3.0 )

Ofcourse for all options you could write a COM dll that acts as a wrapper to
the actuall interface , this for legacy clients

This sort of application is also called a "distributed application"

HTH

regards

Michel


"Bruce W. Roeser" <br*****@cfl.rr.comschreef in bericht
news:ur**************@TK2MSFTNGP03.phx.gbl...
CJ,

The term that describes what you're trying to do is called "COM Interop".
Dot-Net code can call into ActiveX DLL's using the Com Interop feature.
At our company we have made extensive use of this ability as we migrate
our application forward a piece at a time.

-bwr-
"cj" <cj@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>I've often used methods exposed by software purchased for other uses to
automate tasks. For instance back in the late 90's I found the terminal
emulation package the company exposed methods that allowed me to write a
VB program that could use that terminal emulation package to connect to,
read, and enter data on the company's mainframes. I think this was called
OLE?

Well now I'm on the other end of the picture and I need to write into a
.net program the ability to allow Microsot MOM or System Center Manager
(whatever it's called now) to check the value of a few variables. Ideally
this would be done in such a way that any other software could call a
method of my app and get the value of a variable. I'm not sure OLE will
work because unlike the terminal emulation software which was started up
by the VB program, in this case my .net program is constantly running and
working independently it just needs to be probed for status info.

Can someone tell me the buzz word for what I need to do so I can find
some info on how do do it? BTW my application is a Windows App, NOT ASPX
so a web service is NOT what I'm looking for.

If all else fails I'll just keep some environment variables set and
updated that MOM can look at.

Thanks!


Oct 21 '07 #3
cj


Michel Posseth [MCP] wrote:
If i understand you correctly the scenario is :

The app that you developed is running constantly on a system other programs
written by third parties must have the ability to comunicate with this one
running instance .
YES!
>
Well in this case a inmediate COM interface wil not solve the problem as COM
creates a new instance in the past ( VB6 ) you could create ACTIVEX
executables with VB6 in apartment threaded state so 1 instance could server
many clients since .Net this is not possible annymore with COM , every .Net
COM instance is actually a new instance of your component .
This was my fear, however I can write a vb program that will use an
already running instance of Excel and do things in it. How does excel
allow this?
>
What can you do to solve this :

You could make your app a service and control it with the service
controler or through a database
You could create your app as a singletong remoting object hosted in a
remoting server
You could use WCF ( requires framework 3.0 )
Your loosing me here except that I know WCF is supposed to be the
replacement for Web Services.
>
Ofcourse for all options you could write a COM dll that acts as a wrapper to
the actuall interface , this for legacy clients
??????
>
This sort of application is also called a "distributed application"

HTH

regards

Michel


"Bruce W. Roeser" <br*****@cfl.rr.comschreef in bericht
news:ur**************@TK2MSFTNGP03.phx.gbl...
>CJ,

The term that describes what you're trying to do is called "COM Interop".
Dot-Net code can call into ActiveX DLL's using the Com Interop feature.
At our company we have made extensive use of this ability as we migrate
our application forward a piece at a time.

-bwr-
"cj" <cj@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>>I've often used methods exposed by software purchased for other uses to
automate tasks. For instance back in the late 90's I found the terminal
emulation package the company exposed methods that allowed me to write a
VB program that could use that terminal emulation package to connect to,
read, and enter data on the company's mainframes. I think this was called
OLE?

Well now I'm on the other end of the picture and I need to write into a
.net program the ability to allow Microsot MOM or System Center Manager
(whatever it's called now) to check the value of a few variables. Ideally
this would be done in such a way that any other software could call a
method of my app and get the value of a variable. I'm not sure OLE will
work because unlike the terminal emulation software which was started up
by the VB program, in this case my .net program is constantly running and
working independently it just needs to be probed for status info.

Can someone tell me the buzz word for what I need to do so I can find
some info on how do do it? BTW my application is a Windows App, NOT ASPX
so a web service is NOT what I'm looking for.

If all else fails I'll just keep some environment variables set and
updated that MOM can look at.

Thanks!

Oct 21 '07 #4
cj <cj@nospam.nospamwrote in
news:#4**************@TK2MSFTNGP05.phx.gbl:
>Well in this case a inmediate COM interface wil not solve the problem
as COM creates a new instance in the past ( VB6 ) you could create
ACTIVEX executables with VB6 in apartment threaded state so 1
instance could server many clients since .Net this is not possible
annymore with COM , every .Net COM instance is actually a new
instance of your component .

This was my fear, however I can write a vb program that will use an
already running instance of Excel and do things in it. How does excel
allow this?
Through it's COM interface:

http://en.wikipedia.org/wiki/Component_Object_Model
>What can you do to solve this :

You could make your app a service and control it with the service
controler or through a database
You could create your app as a singletong remoting object hosted in
a
remoting server
You could use WCF ( requires framework 3.0 )

Your loosing me here except that I know WCF is supposed to be the
replacement for Web Services.
What Michel meant was to expose your application as a network app - this
allowing external applications to make network calls... either through
WCF, webservices, or another channel. However, if the applications which
need to talk to your app are COM, this may not be the best choice since
COM/ActiveX don't really interact with newer technology too well.
>Ofcourse for all options you could write a COM dll that acts as a
wrapper to the actuall interface , this for legacy clients

??????
..NET has the ability to expose your application/library/etc via a COM
interop layer thus allowing legacy clients to talk to the application.
The machine running the app still needs to have .NET installed, but
legacy applications can use COM to interface with the app.

http://www.codeproject.com/dotnet/nettocom.asp

Unfortunately COM isn't something straightforward to do ... and seeing
you don't know much about .NET - this maybe out of your league? You may
want to try exposing a simpiler app first (i.e. a hello world DLL), then
move your way up to exposing your current application.

Oct 22 '07 #5

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

Similar topics

1
by: Steve | last post by:
We are considering the ways to migrate our VC++ 6.0 applications to .NET platform. It would be nice to rewrite them completely in C#, but due to the time constraints this option is out of...
0
by: Glenn Engelbart | last post by:
I am trying to find out a way to get more code re-use & object orientation in the UI portion of my apps. (There already is plenty of both in the DataAccess & Business Logic portion of my apps. ...
3
by: Mark | last post by:
Ok, I know that .net inherently does not share session data across asp.net projects, but is there any decent work around to this. We already have a big chunk of our application using the asp.net...
10
by: Sarah Smith | last post by:
Hello, I am a bit of a newbie to VB.NET, but not totally new. I took the plunge recently and decided (along with my colleagues), to try to convert/port a VB6 client/server app to .Net. (I'm...
6
by: google | last post by:
I have a few general questions. I am working on a new database to be used within my company. I would like to give a couple of people, particularly HR, the ability to add and delete Access users,...
22
by: spam.noam | last post by:
Hello, I discovered that I needed a small change to the Python grammar. I would like to hear what you think about it. In two lines: Currently, the expression "x" is a syntax error. I suggest...
9
by: TC | last post by:
Like a lot of database developers, I often choose Jet for the back- end. I'm starting to worry about what will happen when Jet is deprecated. Ostensibly, Jet users like me must switch to SQL Server...
11
by: walterbyrd | last post by:
With PHP, libraries, apps, etc. to do basic CRUD are everywhere. Ajax and non-Ajax solutions abound. With Python, finding such library, or apps. seems to be much more difficult to find. I...
13
by: John | last post by:
Hi How can I send simple messages/command like "GotoClientRecord=1024" or "GotoSupplierRecord=234" from a vb.net app to a) a vb.net winform app and b) an MS Access app, all three running on the...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.