|
1 . What is the best way to set communication between 2 processes on the same computer? (The simplest way because every process will be writen by another company and team).
2. Is there a way that 2 processes will be in Contact through DLL (class with static values, Static function and so on) ?
Thanks ,
Shai.
|
|
|
|
|
bonzaiholding wrote: communication between 2
We use named pipes for our application which has worked out pretty well for us.
bonzaiholding wrote: Is there a way that 2 processes will be in Contact through DLL
I guess I don't understand what you are asking here. But is sounds like you are asking that the two process have to have a common reference to the same data structures. So yes you would have to have both projects use the same data structures.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
Wes Aday wrote: named pipes
That sounds right.
Wes Aday wrote: have both projects use the same data structures.
That's not real easy; each app has its own app domain.
|
|
|
|
|
what is the best car?
do you need signaling? are you looking for something message oriented? or just shared data?
do you need locks? etc etc.
You need to provide more information as to the kind of data and communication you're intending.
|
|
|
|
|
I don't need a lock, i need data,structure and most important is signaling.
|
|
|
|
|
that does not tell me anything about the app and the data, so the best I can say is:
- sharing data can be done with a memory mapped file, this probably needs P/Invoke and Win32 API;
- signaling can be done in many ways, e.g. with Windows messages (override WndProc)
alternatives are:
- sending messages (data+signal), e.g. with named pipes
- RPC
- remoting
- ...
|
|
|
|
|
One way to setup interprocess queue using a reliable queueing mechanism would be to use MSMQ.
Here is a good sample - http://articles.techrepublic.com.com/5100-10878_11-6170794.html[^].
I have never used MSMQ for interprocess communication myself, so I cannot help you further with this.
modified on Tuesday, December 8, 2009 12:00 AM
|
|
|
|
|
I'm not even sure if this is possible, or what to even google for, so I'm looking for suggestions.
What I want to have is a directory full of .net dlls, that all do different things, but have the same public function as an entry point.
I don't want to have to reference each dll, so is there a way to hook up to the dll and use the public function that I know will be the same for each dll file?
Thanks,
Tim
|
|
|
|
|
Try like the following,
<pre> private const string Kernel32Dll = "kernel32.dll";
private sealed class SafeLibraryHandle : SafeHandleZeroOrMinusOneIsInvalid
{
public SafeLibraryHandle() : base(true) { }
[SuppressUnmanagedCodeSecurity]
[DllImport(Kernel32Dll)]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool FreeLibrary(IntPtr hModule);
/// <summary>Release library handle</summary>
/// <returns>true if the handle was released</returns>
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
protected override bool ReleaseHandle()
{
return FreeLibrary(handle);
}
}
</pre>
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
|
I agree with you.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Thank you! Plug-in was the term I was looking for.
Also, thank you for the link, I'm off to some happy coding.
|
|
|
|
|
|
Hi,
since:
- you can get synchronous exceptions, e.g. when the disk is full, the file locked, whatever;
- you can modify or Dispose the image right after the Save statement, without affecting the file content.
- the documentation tends to explicitly say so whenever something is asynchronous, and say nothing for everything synchronous.
Image.Save() to me looks like a blocking call.
If there is anything that makes you doubt that, why don't you provide your observations?
|
|
|
|
|
AFAIK, both Save methods are synchronous ('blocking' in your jargon).
|
|
|
|
|
Hi everyone
I have an XML file which I can read from using XmlDocument, XPath and XmlTextReader and all is well this far.
But is there a way that I can write data to an XML file, lets say entered from textboxes using the XmlDocument class?
Please I will appreciate any kind of help..
|
|
|
|
|
XmlDocument , or (surprise, surprise) XmlTextWriter
|
|
|
|
|
XmlDocument has a Write method, doesn't it?
|
|
|
|
|
XmlDocument xmlDoc;
.......
change xmldoc
.......
xmlDoc.Save(filePath);
|
|
|
|
|
Hi
I am trying to convert a 2D rectangular array (type [,]) to Image.... I saw examples for 1D array to Image and 2D array of type[][] to Image. I am new to C#. Please some one direct me to a site or code snapshot that shows me how to do it.
Thanks a lot
umesh
|
|
|
|
|
Try like the following:
<pre>
e.Graphics.DrawImage(New Bitmap(tile(TilePos.X, TilePos.Y)), TilePos.X * 30, TilePos.Y * 30)
</pre>
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Dear Sirs,
Who is the pro at creating Visual Studio addins? I don't want to use one of those canning programs, but rather I would like to write one from scratch. There seems to be a lack of examples and the documentation is `so-so.' Specifically I'm trying to change the background color in a code window, but only a certain portion of the code window. Let me know if you know anything about this, or provide a link to some good documentation or a tutorial. Thanks!
In Christ,
Aaron Laws
http://ProCure.com
|
|
|
|
|
I have developed a POS system. I am having problem opening the cash drawer that is attached with receipt printer. I have searched alot but i am not been able to find the right code that can work for me. I am using CBM 1000 receipt printer. Is there any one who has done such app, please help/assist me.
Thanks
|
|
|
|
|
i have an off topic question and want to know your advise..
I am using C$ and i want to know what's recmonnaded in order to have the best result?
should I save the debit and credit in a table in the same field (trxn_amount with + or - sign? or save them in separate fields (trx_amount_debit and trxn_amount_credit?
|
|
|
|
|
jrahma wrote: should I save the debit and credit in a table in the same field (trxn_amount with + or - sign? or save them in separate fields (trx_amount_debit and trxn_amount_credit?
What do you mean with "best result"? From a developers' perspective, things that are the same go into the same table. Splitting them into separate tables gives no advantages that I can think of.
--edit--
I'd simply derive the credit/debit type from the amount, e.g., everything positive is credit. Developers don't store the same information twice. So, from a dev's view, storing the credit/debit type is redundant if it's value can be derived from the stored information.
Now, I have been told that this is inconvenient for reporting, and that it's rather convenient to have a flag in the database that indicates the direction of the transaction. The thing I missed, is that I could be credited $-1, and that would be something completely different from being debited a dollar.
I are Troll
modified on Monday, December 7, 2009 11:38 AM
|
|
|
|