473,503 Members | 5,495 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to make a singleton dll or exe using C#

Hello...Everyone...

i want to make a singleton dll or exe using C#,

i want to call the C# dll or exe from C, C++, VB...

The C# dll will be called by any process(C, C++, VB), after any process
call the C# dll, the C# dll have a same instance all of any process , like a
ATL Singleton(Out-of-Service), so i can use a shared data from C# dll

Could you tell me how i can make this kind of dll by C#...
Jan 18 '08 #1
1 4642
C# isn't really geared towards creating out-of-process components in
the way you describe.

2 approaches I can think of:
a: Create it as an exe (perhaps a windows service), and communicate
over sockets or similar (since we are talking C etc, remoting isn't an
option)
b: Make it COM accessible, and create (yeuch) create a facade COM exe
in VB6 or similar; the other processes talk to the VB6, which simply
forwards (via COM) to the C#; the VB6 provides the COM server, the C#
provides the CLR framework.

The first is cleaner, but I have seen examples of the second on the
web.

Marc
Jan 18 '08 #2

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

Similar topics

2
5839
by: Sean Dettrick | last post by:
Hi, apologies for yet another Singleton posting. From reading around previous postings etc, I've cobbled together two Singleton template definitions - one that returns a reference, and one that...
7
3251
by: Ethan | last post by:
Hi, I have a class defined as a "Singleton" (Design Pattern). The codes are attached below. My questions are: 1. Does it has mem leak? If no, when did the destructor called? If yes, how can I...
3
3911
by: Harry | last post by:
Hi ppl I have a doubt on singleton class. I am writing a program below class singleton { private: singleton(){}; public: //way 1
8
2806
by: Gaensh | last post by:
HI, I have a singleton pattern to acess my database the following is the sample code use to implement singleton pattern public class DataAccessHelper { private static DataAccessHelper instance;...
6
2256
by: Manuel | last post by:
Consider the classic singleton (from Thinking in C++): ----------------------------------------------------- //: C10:SingletonPattern.cpp #include <iostream> using namespace std; class...
3
5722
by: Raider | last post by:
I need to have one object for each template argument(s) used. For example, I need to have one object of int. I tried the following code and it gives me all I want with Visual C++ 7.1. But is it...
5
21146
by: Damien | last post by:
Hi all, I'm using a pretty standard C++ Singleton class, as below: template <typename T> class Singleton { public: static T* Instance() {
3
18224
weaknessforcats
by: weaknessforcats | last post by:
Design Pattern: The Singleton Overview Use the Singleton Design Pattern when you want to have only one instance of a class. This single instance must have a single global point of access. That...
3
1776
by: stevewilliams2004 | last post by:
I am attempting to create a singleton, and was wondering if someone could give me a sanity check on the design - does it accomplish my constraints, and/or am I over complicating things. My design...
0
7207
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
7093
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
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5023
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...
0
4690
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...
0
3180
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...
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
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...

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.