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

Doing something once when a DLL is loaded (global static ? )

Hi

I have an managed C++ dll, thats uses an API to handling some HW.
This DLL is then called from an C# dll.
But I need only once instance of the managed C++ dll, no matter how many
user application are starded, because I just whant one instance of my driver
handle (From the API)
Today, when I start a new application, I allso create and new instance of
the class, and there by create a new handle in my C++ dll.

1: Is there any DllMain alike i can use, either in my managed C++ or C# dll
?

2: Can I make something global and static in either C++ or C#, thats is
outside the classes, that I can initialize once, and then use in many
instance of the class ?

Thomas

Nov 15 '05 #1
0 921

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

Similar topics

1
by: Philippe C. Martin | last post by:
This is a basic question I'm sure but I do not know wether to use __builtin__, global, or a static method: I have a very large XML file that I load into dictionnaries defined in a class located...
24
by: Steven T. Hatton | last post by:
In the following code, at what point is S::c fully defined? #include <iostream> using std::cout; using std::endl; using std::ostream; class C { int _v;
3
by: Zhigang Cui | last post by:
Hi, When I saw 'global static', the first response was there was no such term. But I realized it's an idiom later. When we learn C language, when we study C standard, when we study compiler, we...
10
by: Julien | last post by:
Hi folks, I am facing a little problem with my website that gives me an headache : It can not have 2 users at the same time (quite annoying, as you see:)) I think I miss something in the ASP.NET...
0
by: John Smith | last post by:
I still have not gotten this damn thing figured out and I'm asking for help one last time before I give up on it. I have a user control that contains a paged gridview control. The master page...
11
by: Matthew | last post by:
Ok let me try to explain this as good as I can. I am creating this application where it contains a userlogin class. The user logs in before entering the main apploication. I want to do audit trails...
20
by: JohnQ | last post by:
The way I understand the startup of a C++ program is: A.) The stuff that happens before the entry point. B.) The stuff that happens between the entry point and the calling of main(). C.)...
11
by: ssecorp | last post by:
I am never redefining the or reassigning the list when using validate but since it spits the modified list back out that somehow means that the modified list is part of the environment and not the...
5
by: vunet | last post by:
I have some properties data to be loaded for the site use, such as: website url, admin email, mailing component to use, etc. for my ASP website. They will be stored in a database, or I also...
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: 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
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: 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
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
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,...
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.