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

how to declare global Class library project?

Ron
Hello,

I need to create/instantiate a global class library
project so that 2 EXE's can write to the same class
library form in the same instance of the class libary. I
am thinking something along the lines of declaring the
class library project in a global assembly and then
referencing this global declaration from each of the 2
EXE's. Is the global assembly where I could declare my
global class libary project? How to do that?

Thanks
Nov 21 '05 #1
1 1962
Easist way would be a web service. Otherwise a service itself using
remoting... (or services messages, but thats a whole other topic)

Now here is why.

In .NET libraries are loaded into their calling process. I haven't seen
anything that supports a shared memory segment like C++'s #pragma
declaration nor really see how. Each EXE is it's own process, has its own
memory reserved for it and cannot interact with other applications through a
shared library (at least one written in .NET).

Now, you could write a regular DLL (not activeX, because COM uses Single
Threaded Apartments *I think I'm right here.*) which would be right back
where you started. It would have to be written to support shared memory
addressing (a subject I'm not too familar with, just how its declared) and
it would obviously be unmanaged. So you have that to deal with as well.

Which leads me back to my original point of either a hosting application
supporting remoting (i.e a winforms app that has a singleton instance of the
class and simply acts as a server for the two other executable) or a web
service/service that runs in the background and also serves requests

Advantage of the web service. 95% of the work is done for you, easy as pie
to integrate into any .NET application. Disadvantage, you have to watch for
the aspnet_wp recycling and make sure you keep your data integrity up to
snuff. Service, you don't have to worry about the recycling, but you do
have a little more work ahead of you.

Let me know if you have any questions.

HTH,
CJ
"Ron" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...
Hello,

I need to create/instantiate a global class library
project so that 2 EXE's can write to the same class
library form in the same instance of the class libary. I
am thinking something along the lines of declaring the
class library project in a global assembly and then
referencing this global declaration from each of the 2
EXE's. Is the global assembly where I could declare my
global class libary project? How to do that?

Thanks

Nov 21 '05 #2

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

Similar topics

3
by: BillG | last post by:
I have a solution that has 3 projects in it. A web application called USITracking. A project library holding my business logic classes and a project library holding my data logic classes. From...
41
by: Miguel Dias Moura | last post by:
Hello, I am working on an ASP.NET / VB page and I created a variable "query": Sub Page_Load(sender As Object, e As System.EventArgs) Dim query as String = String.Empty ... query =...
22
by: fd123456 | last post by:
Hi Tom ! Sorry about the messy quoting, Google is playing tricks on me at the moment. > Global.asax is where you normally have the Global Application > and Session variables and code to...
2
by: ray well | last post by:
hi, i have a function i need to use in various aspx pages and would like to keep it in one place instead of duplicating it in every page i want to use it. i tried puting it in 'Global.asax'...
15
by: randyr | last post by:
I am developing an asp.net app based on a previous asp application. in the asp applications global.asa file I had several <object id="id" runat="server" scope="scope" class="comclass"> tags for...
5
by: ad | last post by:
The Global.asax is code-inside with default. How to change Global.asax to code-behind?
19
by: furiousmojo | last post by:
This is a strange problem. I have a project where the contents of global.asax application_error are not firing. It is an asp.net 2.0 application using web application projects. I have another...
4
by: Larry Epn | last post by:
Simple question: I have a c# asp.net project that was given to me. It has the c# code within the <scriptsection of the global.asax file. I would rather have it in separate files; e.g.,...
1
by: Konstantinos Pachopoulos | last post by:
Hi, i had posted earlier for not being able to declare global vars. No i followed the suggestions and created a class, but still the vars do not seem to have a global scope. I have tried pretty...
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
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
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
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...
0
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...
0
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...
0
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,...

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.