473,795 Members | 3,231 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to write a exe application which can be also used as a dll library

Max
Hi, I am new to .NET.

I want to implement an application which can be run independantly. I also
want it can be used as a dll library. I cannot reference a exe file in
Visual Studio .NET. Can I do it?

Thanks a lot,
Max
Nov 16 '05 #1
3 1355
On 2004-10-03, Max <no*******@gmai l.com> wrote:
Hi, I am new to .NET.

I want to implement an application which can be run independantly. I also
want it can be used as a dll library. I cannot reference a exe file in
Visual Studio .NET. Can I do it?

Thanks a lot,
Max


Why don't you put the common functionality into a class libary project
and then reference it from both exe's?

--
Tom Shelton [MVP]
Nov 16 '05 #2
Max
Thank you Tom,

Yeah, it is a way to do that. But I noticed that some applications based COM
techniques can do that, such as MS Word. I want a exe file which can run
itself and this exe file can be invoked by other .NET applications. If this
exe file invoked by other applications, it still runs on its own process
other than the process of that application.

I don't know much about COM. I guess this is a feature of COM process model.
Could I do it in .NET framework?

Thanks a lot,
Max

"Tom Shelton" <to*@YOUKNOWTHE DRILLmtogden.co m> wrote in message
news:uu******** ******@tk2msftn gp13.phx.gbl...
On 2004-10-03, Max <no*******@gmai l.com> wrote:
Hi, I am new to .NET.

I want to implement an application which can be run independantly. I also
want it can be used as a dll library. I cannot reference a exe file in
Visual Studio .NET. Can I do it?

Thanks a lot,
Max


Why don't you put the common functionality into a class libary project
and then reference it from both exe's?

--
Tom Shelton [MVP]

Nov 16 '05 #3
Max... You can write native win32 code that can be called by a native
win32
exe and from .NET, but this is advanced stuff. If this is really what
you want
to do, you can do this with C++ ATL COM creating a dll and then calling
the
dll functions from a native C++MFC/VB exe or a managed C# exe.

Regards,
Jeff
I want to implement an application which can be run independantly. I

also
want it can be used as a dll library.<

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

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

Similar topics

5
2652
by: John Ladasky | last post by:
Hi, folks, At the beginning of 2003, I was a frustrated computer user, and lapsed programmer, with problems to solve that screamed for programming. Thanks to the Python language and community, I am a programmer once again. My earlier solicitation to the computer world is here: http://groups.google.com/groups?selm=c09b237b.0302060136.5683054e%40posting.google.com
1
3086
by: DC Gringo | last post by:
I have some code that writes log entries upon errors in an VB.NET web app. I can write the Message but in the log, preceding my message is the following: Description: The description for Event ID ( 0 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this...
2
4368
by: Andy Fish | last post by:
Hi, I am wanting to put some simple logging into my .net app. The basic features will be that errors get logged to a file and that there will be a configuration flag to enable more detailed logging. It must be simple to enable the detailed output in the live application. I have used Debug.Write() but this seems to come out only on the output window in the IDE - is there a way of configuring this to go into a file? I also saw there is...
5
1584
by: Venky | last post by:
We have a strange error here. We have an application that is built in VC++ 6.0 and uses a C library built using the same. Now, we have migrated to .Net and have used the same source code to be built using the new compiler. What happens now is, that any call that we make to the C library(also built in .Net Env now) from the VC++ Application(built in .Net now), falls prey to a runtime exception and gets into our try catch block. We are...
2
2281
by: clintonG | last post by:
The application is a simple form of three textbox controls that results in writing an XML file to the file system of the application root when it runs on the local development machine. I've just used FTP to deploy this as my first ASP.NET application using a hosting provider using W2003 IIS6 noting the host provides a control panel that allows me to set the application root as a virtual application. The XML file is not being created...
3
7960
by: Angelos Karantzalis | last post by:
Hi y'all, recently I've come across a situation where a web service needs to deal with an exception that might arise, originating from a COM+ component. It then returns an int value (please don't ask me why) indicating that there was something wrong with the requested operation. Assuming that I don't really know all the posible exceptions that might arise from the COM+ layer, and therefore I can't accurately return an int identifying...
8
2507
by: Zheng Da | last post by:
I don't know where should I ask the question, so send the email to this group. I choose this group, because I want to write the program with c++ :) I want to write a program which support multiprotocol, but do not want to write code for all protocols which I want to support. I plan I give a interface and others give a module which implements a protocol, and then the module can be inserted into my program without recompiling my program....
24
5868
by: Charles Ulrich | last post by:
Greetings, I hope my greenness isn't showing too bad by asking this, but I ran across this trivial program today that left me flabbergasted: #define MESSAGE "This account is currently not available.\n" int main(int argc, char *argv) {
1
8067
by: =?Utf-8?B?R2FuZXNoIE11dGh1dmVsdQ==?= | last post by:
Hello All, Our application write logs to a file in a folder. Before our application starts writing to that file, I want to check if the current user has write access to that file, for example, "c:\temp\LogFile.txt". I see several articles for setting file access permissions, getting file access permissions for a given user or current user - but the current user could also gain write access to the same file not just by explicit permssion...
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10435
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9037
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6779
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.