473,385 Members | 1,712 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,385 software developers and data experts.

How do you make one dotnet exe talk to another dornet.exe like a dotnet dll?

GG
Currently we have clientMail.dll in dot net. All the dot net exes use it
to send e-mail.
However, the above will not work with mcafee 8 unless adding into the
exceptions all the apps exe.
I would like only to make a clientMail.dll to exe so I can only add one
exception to the list

I can add
[STAThread]
public static void Main()
{
}
and conmpile clientMail to exe but the apps do not let me add a
reference to exe even though is build through dot net

Any ideas how to make it work?
Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
6 2087
GG wrote:
Currently we have clientMail.dll in dot net. All the dot net exes use it
to send e-mail.
However, the above will not work with mcafee 8 unless adding into the
exceptions all the apps exe.
I would like only to make a clientMail.dll to exe so I can only add one
exception to the list

I can add
[STAThread]
public static void Main()
{
}
and conmpile clientMail to exe but the apps do not let me add a
reference to exe even though is build through dot net

Any ideas how to make it work?


It won't help as clientMail.dll is only used as a dynamic library,
but i'm sure that McAfee is looking for running apps, so even if you make an exe file instead of dll
and use this exe in other exe apps, it will see those apps, not clientMail.

But just for your record you can utilize classes from an exe file with Assembly.* functions and Reflection
Nov 16 '05 #2
You can reference a .exe but not from within Visual Studio. You have to use the command line compiler such as

csc /r:mtexe.exe app.cs

However this will not solve your problem as the .exe assembly will simply be loaded into the process of the other application. You need it to run as a separate process.

I guess you need dll to be autostarted so:
you could repackage the code as a windows service and have it autostart and use remoting to communicate with it.
you could do the same using ASP.NET as a remoting host rather than a service
you could change the code so that the components in question derive from System.EnterpriseServices.ServicedComponent and set the application to be a server one so it loads into a copy of DllHost.exe (of course this will mean having McAffee having to trust all components running under DllHost.exe). Then DCOM will be used as the communication protocol rather than remoting.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Currently we have clientMail.dll in dot net. All the dot net exes use it
to send e-mail.
However, the above will not work with mcafee 8 unless adding into the
exceptions all the apps exe.
I would like only to make a clientMail.dll to exe so I can only add one
exception to the list

I can add
[STAThread]
public static void Main()
{
}
and conmpile clientMail to exe but the apps do not let me add a
reference to exe even though is build through dot net

Any ideas how to make it work?
Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.1 - Release Date: 19/01/2005

[microsoft.public.dotnet.languages.csharp]
Nov 16 '05 #3
GG
I got the dll to run with reflection but still the same problem.
Is there a way to run the dll as a separate process but not through
remoting?

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4
GG
Remoting makes the apps complex and will require more code and more
links for something to break.
I would like to stay away from remoting.

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #5
GG wrote:
I got the dll to run with reflection but still the same problem.
Is there a way to run the dll as a separate process but not through
remoting?


Sorry to disappoint you but it doesn't matter how you invoke your dll's functions.
All that matters is which application calls those classes/functions from your dll -
those apps will be seen by mcafee, not your dll, which is just a "storage", when you call
dll you don't "execute" it, you just request it's methods/classes in simple words.

So, i wouldn't advise you to spend much more time trying to do it the way you wanted.

If you want to achieve your goal, you really need to use this as a separate mailing program,
which will either use remoting or just have a tcp server for talking with other programms,
which is pretty much the same idea.

Good luck,
Andrey
Nov 16 '05 #6
GG
Think you are right that need a separate application all togetther.
Finally, we decided to relax the Mcafee rule since we had other apps
including sql server that need to send e-mail.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #7

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

Similar topics

77
by: nospam | last post by:
Reasons for a 3-tier achitecture for the WEB? (NOTE: I said, WEB, NOT WINDOWS. DON'T shoot your mouth off if you don't understand the difference.) I hear only one reason and that's to switch a...
40
by: Eitan | last post by:
Hello, I know Java-Applet (written for JBuilder). I would like to know about dotnet technology, pros and cons in comparation to Java-Applet technololgy. Can I write a program in dotnet, like...
3
by: Shabam | last post by:
I'm running Dotnet on Windows 2003 and was wondering, can scripts write to files/folders outside of the webroot, for instance, in another drive? How about writing to a network share via UNC? Is...
2
by: Alex | last post by:
Hi all, I'm writing a small web application which searches a database based on a date field, and populates a datagrid control with the results. The datagrid control has selection buttons added...
29
by: amos | last post by:
Hi I'm experiencing a real nasty thing about dotnet. I've made a big application in dotnet and I would like to use ILAYERS for netscape 4. You CAN NOT USE Layers and Form buttons in...
3
by: Geoff | last post by:
I need to keep a few VB6 tcpClients active, but have them talk to a dotNet tcpServer/tcpListener. The "Server"/Listener is running as a Plugin, and needs to respond to "outside requests". The...
2
by: Abhi | last post by:
i need to create a user in web mail using dotnet coad by using webmailserver api ex: xxx is my webmail then i want to create to a user in that webmail xxx ex: yyy@xxx.com how i should do in...
2
by: Jeff Jarrell | last post by:
We are a software vendor and have been working on an integrated dotnet\java solution to replace the legacy product offering. The new architecture is a dotNet client with a Java backend. the java...
8
by: Derek Hart | last post by:
I am unclear about what all the requirements are to call a simple vb.net application, installed in the GAC, from COM (such as writing vba in Word to call the dotnet dll). I believe I have...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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,...
0
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...

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.