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

C# Calling Executable or DLL

Can anyone tell me the prons and cons having C# program calling an
executable or DLL?
I always do not like the idea of having one executable calling another
executable since I can have more control by calling interfaces exposed
from a DLL. In my situation, I need to watch for a certain event and
exe can only give me a return code. Any pros using an exe?

Oct 17 '06 #1
5 2277
DLL is contains code tha can be shared between applications where on the
other hand the exe (application) uses dlls and don't expose any
functionaluty for the others to reuse. I say usually because it doesn't have
to be like this. There are several different ways for an exe to expose
functionality for reuse, but they come with a cost.

My advice is to use DLLs that what they are for.
--
HTH
Stoitcho Goutsev (100)

<gu**@hotmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Can anyone tell me the prons and cons having C# program calling an
executable or DLL?
I always do not like the idea of having one executable calling another
executable since I can have more control by calling interfaces exposed
from a DLL. In my situation, I need to watch for a certain event and
exe can only give me a return code. Any pros using an exe?

Oct 17 '06 #2
Thanks. The DLL contains managed C++ code. Should I stay away from
managed DLL and go with exe?
Stoitcho Goutsev (100) wrote:
DLL is contains code tha can be shared between applications where on the
other hand the exe (application) uses dlls and don't expose any
functionaluty for the others to reuse. I say usually because it doesn't have
to be like this. There are several different ways for an exe to expose
functionality for reuse, but they come with a cost.

My advice is to use DLLs that what they are for.
--
HTH
Stoitcho Goutsev (100)
Oct 17 '06 #3
Thanks. The DLL contains managed C++ code. Should I stay away from
managed DLL and go with exe? Any known problem for using managed DLL? I
am still new to this.
Stoitcho Goutsev (100) wrote:
DLL is contains code tha can be shared between applications where on the
other hand the exe (application) uses dlls and don't expose any
functionaluty for the others to reuse. I say usually because it doesn't have
to be like this. There are several different ways for an exe to expose
functionality for reuse, but they come with a cost.

My advice is to use DLLs that what they are for.
--
HTH
Stoitcho Goutsev (100)
Oct 17 '06 #4
What you are going to do with an exe. What your is that you want to do
actually?
--
Stoitcho Goutsev (100)

<gu**@hotmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Thanks. The DLL contains managed C++ code. Should I stay away from
managed DLL and go with exe?
Stoitcho Goutsev (100) wrote:
>DLL is contains code tha can be shared between applications where on the
other hand the exe (application) uses dlls and don't expose any
functionaluty for the others to reuse. I say usually because it doesn't
have
to be like this. There are several different ways for an exe to expose
functionality for reuse, but they come with a cost.

My advice is to use DLLs that what they are for.
--
HTH
Stoitcho Goutsev (100)

Oct 17 '06 #5
Hi,

If you use a DLL, either managed or unmanaged, it runs in the same process
as your C# executable.

In case you are using a managed C++ based DLL, you can directly refer to
that DLL and use the classes and events from your classes in your C#
application.

Lastly your requirement is not clear, so if the above points do not clarify
your doubts, then please provide your requirement in detail and I'll try to
answer your queries.

--
Regards,
Aditya.P

"gu**@hotmail.com" wrote:
Thanks. The DLL contains managed C++ code. Should I stay away from
managed DLL and go with exe? Any known problem for using managed DLL? I
am still new to this.
Stoitcho Goutsev (100) wrote:
DLL is contains code tha can be shared between applications where on the
other hand the exe (application) uses dlls and don't expose any
functionaluty for the others to reuse. I say usually because it doesn't have
to be like this. There are several different ways for an exe to expose
functionality for reuse, but they come with a cost.

My advice is to use DLLs that what they are for.
--
HTH
Stoitcho Goutsev (100)

Oct 18 '06 #6

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

Similar topics

1
by: Chandra Mohan | last post by:
Hi All, I have a requirement of calling a Executable from SQL Server. I know we can use - EXEC @result = Master..xp_cmdshell @<command_string> However I want to get the return value (int)...
5
by: Al the programmer | last post by:
I have a dll that consists of unmanaged C++ routines. I can call a function in the dll from a C++ executable, but not from a C# executable. I am calling an independent function, not a class. C#...
17
by: Bill Grigg | last post by:
I have been successfully calling DLL's using VC++ 6.0 and also using VC++7.1 (.NET). I only mention this because I have never felt comfortable with the process, but nonetheless it did work....
6
by: Marlene Arauz Martin | last post by:
Hello, How's everybody??? I have an aspx. page that is calling an executable,....like this... System.Diagnostics.ProcessStartInfo psi= new System.Diagnostics.ProcessStartInfo();...
2
by: Daniel Lidström | last post by:
I'm using a library called fyba. This library reads and writes files in a format called sosi. fyba uses the following code to determine if the calling process has own methods to handle errors,...
15
by: dspfun | last post by:
Hi, Is it possible to print the function name of the calling function? For example, f1() and f2() both calls f3(), in f3() I would like to print the name of the function calling f3() which...
1
by: muhamad.abbas | last post by:
Hello Folks, This is what i am required to do. Call an executable from my python script, and when the executable is finished running, i should continue with my python script. I have tried...
4
by: Darin | last post by:
I have a public class that I use to read columns out of a SQL database. In the try, catch, loop I want to display the error, and in the error I want to display the calling routine (and helpfully...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.