|
vista27 wrote:
Is this because both EXEs are using their own copy of the DLL, and not REALLY sharing the same DLL?
Although DLLs allow you to share the same code between two applications the data isn't shared. Hence the event fired in one EXE is not picked up by the other EXE.
vista27 wrote:
How can I achieve the behavior desired?
I have to admit never having needed to do this. The closest I've ever got is a web application making a change in a database and a Service process checking the database periodically to see if there is any new data. The event of the web application is picked up in the service which is a similar scenario, but the service spends most of its time asleep and only polls the database once a minute.
How soon does the event need to be picked up? If a wait of a minute is acceptable then something similar to my previous solution may work for you also.
Although I have not used it, Message Queues may be what you are looking for. MSMQ - Overview[^]. C#: A Message Queuing Service Application[^]
Do you want to know more?
|
|
|
|
|
To add to waht Colin said, you can't share a .DLL like this between two .EXE's because, like he said, the data is no shored between processes. The .DLL doesn't run in it's own process. It's injected into the process that's using it, therefore each .EXE has seperate instances of the data for the same .DLL.
Using a .DLL, you can't get the functionality you want. You'll have to rewrite the .DLL and code it to use the singleton pattern and pass data back and forth through remoting. There is no way to adapt the .DLL to your requirements.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Does anyone know how if its possible to tell what software a server is running (i.e. Apache, etc) using a HttpWebRequest as a starting point? I'd like to be able to get the current server time as well, if possible. Couldn't find an example in the MSDN library - any ideas, suggestions?
Thanks,
Justin
|
|
|
|
|
Can anyone tell me what kind of form this - http://people.clemson.edu/~jegarri/box.gif - is? I would like to have something similar, with the categories at the top, but I can't find anything like it in the Windows forms available in VS.Net 2003.
Thanks,
Justin
|
|
|
|
|
|
Terrific, I completely missed that one, thanks Tom.
Thanks,
Justin
|
|
|
|
|
np
IM PROUD TO BE A GMAIL;
|
|
|
|
|
Has anyone downloaded Boreland's C# personal edition ?
How in the heck do you activate this bugger ? The code supplied by Boreland
which is supposed to be put into the documents and setting root directory doesn't work ?
Holy cow, can anyone help me here ? I just want to teach myself C# , not steal from them.
As an absolute beginner to this language, does anyone of some great C# books to recommend ?
Thanks for your help.
Happy Trails .
|
|
|
|
|
take it easy , C# is for Micorosft , using Visual C# , Visual C# is as Compelete and Power than C# Bilder .
strat with Microsof tVisual c# if you need help i can help you My Yahoo Email is : pooria1212002@yahoo.com
and my MSN Mail is : pooria_madani@msn.com
|
|
|
|
|
havn't downloades Boreland's stuff, but if you just want to teach yourself the language, try downloading the latest beta visual c# express (it's beta so it's free) from here[^].
there's documentation there and sample apps.
there are no facts, only interpretations
|
|
|
|
|
Buy Inside C# by Tom Archer. And ditch Borland, you're better off with some of the free IDE's around if you can't get VS.NET, but if you're a student, the student edition is incredibly cheap.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hi friends...
i know that GDI+ & OpenGL are a graphic programming model... and i guess that C# supports both of them... but i want to know what is difference of them..?? how about their programing syntax...??
... and is there any difference between GDI and GDI+ ??!!
please explain about these.
|
|
|
|
|
visitsaadi wrote:
and i guess that C# supports both of them
I doubt it. You may be able to get C# to use OpenGL, but it does not support it 'out of the box'.
visitsaadi wrote:
and is there any difference between GDI and GDI+ ??!!
For you to ask these questions, you obviously have little to no idea what you're asking, i.e. you've done no research.
OpenGL is a 3D library, like Direct3D, but non-Microsoft. GDI+ is the new library that is designed to take the place of GDI. GDI is the graphical library that grew with each Windows release until GDI+ replaced it. The graphics library in C# is GDI+. To call old GDI functions, if you must, you need to IJW the functions in the dlls.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I am using TcpClient.Connect(ipaddress, portnumber) but the app must 'scan' a few possible IPs before finding the 'active' one. However if 'ipaddress' does not respond, the Connect() function hangs for nearly 60 seconds before raising an exception.
Is there any way I can test for an IP quickly (e.g. a 'ping() command) before calling 'Connect()? I don't really want to get into starting separate threads for each possible IP address to search.
|
|
|
|
|
I don't have access to the documentation right now but I thought you could set a time out on the underlying socket via TcpClient?
-Jeff
|
|
|
|
|
Jeff,
I have set both SendTimeout and ReceiveTimeout (to 6000 ms) but they have no effect on starting the connection, only presumably on send/receive data.
|
|
|
|
|
Try this code snippet.
try
{
System.Net.Dns.GetHostByAddress(this.serverAddress);
}
catch (System.Net.Sockets.SocketException)
{
}
www.troschuetz.de
|
|
|
|
|
Stefan,
Thanks but I think this will only be OK if there is a domain name server to provide a name. This system needs to work on LANs where there may not be one.
I guess I'll need to use the asynch StartConnect() method but I need a decent sample to see how to use it.
|
|
|
|
|
I don't think so.
The MSDDN doesn't state that you need the presence of a real DNS in your Network and i successfully used this method in my local LAN to determine whether a PC can be reached or not.
www.troschuetz.de
|
|
|
|
|
hi dear
i want to write 8puzzle problem with A* algoritme with manhatan heuristic but i got a magic problem thet when i assign a array of one node to local array and when i change the value of local array the array of node change too(source like this c=currnode.a)
what can i do;
|
|
|
|
|
It is happening because only reference of local array is copied to the node. try using Clone method of Array that makes a shallow copy of the data in an array. It returns an object, cast it to appropriate array and use it where-ever you want.
Maqsood Ahmed
Kolachi Advanced Technologies
http://www.kolachi.net/web/
|
|
|
|
|
no i said that array of node copy to local array and this problem appeared
sh not as shark ,as c#
|
|
|
|
|
Hi all,
Will the System.threading.Timer class stop or suspend when the PC is in sleep mode or suspend ? Are there any differences for Win98, Win2000 and WinXP ?
Thanks
|
|
|
|
|
As far as I know when the system is put to sleep or suspended there is nothing running at all. This means that your timers will be sleeping also.
Or did I misunderstand your question?
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|