|
Hello,
what is the easiest way to make two separate compiled apps exchange data through shared memory pipeline or something like that?
Thanks much,
Michal
|
|
|
|
|
An easy way is using Socket class; you may need to explain to your FireWall it
should trust that tho.
Other ways:
- Windows messaging
- a memory mapped file
- a named pipe
- WM_COPYDATA
and there may be others.
I most often use a named pipe, which takes more code, but avoids all hassles
with firewalls.
|
|
|
|
|
Remoting[^] is the official way to do it for both interprocess and intermachine.
|
|
|
|
|
Thanks both for your ideas.
I'm going to look into all of the above concepts.
I thought that remoting is just a way to facilitate communication over network.
Thanks again,
Michal
|
|
|
|
|
Remoting is also used internally in applications that create and use multiple app domains.
only two letters away from being an asset
|
|
|
|
|
Yep, in .Net 2 theres a new IPC channel specificly for interprocess communication. It's pretty cool in the fact that you can use configuration file to change the channel used so if you want to switch from interprocess to intermachine for some reason you can easily do it
|
|
|
|
|
Dear Listeners !
I had a gui application that included a dll that raises Windows Messages whenever a remote unit communicates with him through UDP.
This woked great until I changed the application to a windows service , I do not know why but I do not receive the windows messages in my windows service although I check the interface with desktop flag.
Does any body know is it possible to use the WND_Proc function in a windows service and receive messages form that dll.
Thank you very much
Zvika Tubis
|
|
|
|
|
I am pretty sure that windows services are not on the message loop. They have no visible UI so most of the windows messages wouldn't work for them anyway. So I am not 100% sure, but I am pretty sure it won't work with a windows service.
Ben
|
|
|
|
|
That's because there's no message pump in a Windows Service. No windows, no pump. No pump, no way to receive window messages and process them.
|
|
|
|
|
Hello Forum of friends' supr
They could indicate me if it is possible and where can get resources for
The one of use Directory Activates, via automation, .NET of from
Thank you
|
|
|
|
|
Friends of Supr Forum here.
Yes, it is possible. You haven't stated exactly what you want to do. You can generally get resources for things like this from the internet. Searching Code Project articles is generally a good start or there's a new fangled website out there that also helps for things like this - google.
Google Search for Active Directory C#[^]
http://www.codeproject.com/[^]
Just put Active Directory C# in the search bar of the home page.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
Hello
I go to their valuable help with the following problem
It is possible from net to automate Directory Activates.
Concretely I want to activate the directive one that this in
Configuration of User
Administrative insoles
System
And to enable the directive one
Alone to Execute applications of allowed windows
And to establish the list of programs EXE that the user can execute, I can them
to select of a list.
Example: winword.exe, excel.exe, etc.
My idea is that the user can make it from ASP.net
I wait their valuable help, and thank you for their time
|
|
|
|
|
Hey C#ers,
i've checked codeproject and found nothing on remote connection. i want my app to be able to connect to another computer across the internet. is there some underlying http protocol to connect that can be used in C#?
In short how do i make a connection across tha internet form my windows app?
He who goes for revenge must first dig two graves.
|
|
|
|
|
If you don't be more explicit... "connect to another computer across the internet" isn't specific enough. Do you wan't send messages? Access to ftp?...
If you want "talk" beetween computers across internet maybe your solution is to use WebServices...
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
il_masacratore, just want to be able to view, or rather copy, a file form there to my own PC. It could also connect to an SQL server on that PC across the internet.
You dig?
He who goes for revenge must first dig two graves.
|
|
|
|
|
I'm thinking in two posible ways:
-FTP in remote machine and a client in your machine
-Webservice installed on remote machine used to simulate the behaviour
(basically give an director list, and returning a file as a stream ).
-IIS. Sharing with IIS the folder/s and its contents.
I hope it will help you in some way.
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
I find the properties of a class are set in name order.
For example,a property named A would be set before B.
My codes like this,I don't know how to resolve it.I need some hands.
...
private int _B=1;
public int B{
get{return this._B;}
set{if(value>0) this._B=value;
}
private int _A=10;
public int A{
get{return this._A;}
set{if(vale<100/this._B)this._A=value;}//
because A would be set before B,as a result,if you set A<br />
}
...
someone would like to help me to resolve such problem?If I do not want to rename the property?
Thanks
|
|
|
|
|
Perhaps you should use the property B instead of the variable _B in your setter in your Property A
So the could should be:
set{if(value<100/this.B)this._A=value;}
Hope that helps.
Ben
|
|
|
|
|
I will have a try.
I hope it will resolve the problem.
Thank you
|
|
|
|
|
I am sorry that although I chang the code following your guide,the problem remain.
But thank you all the same.
|
|
|
|
|
So if you set A = 99,
Then set B = 2,
Then try to set A = 88
I am pretty sure you will have A = 99 and B = 2 which is what your code does. What do you want your code to do?
Ben
|
|
|
|
|
Yes,you are right,if you set the properties using codes it works well.But if I make a usercontrol and edit its properties in its container,there would be some wrong.
I had pasted my real codes in another thread.Would like to have a look?
Thanks
|
|
|
|
|
hi,
kcynic wrote: public int A{
get{return this._A;}
set{if(vale<100/this._B)this._A=value;}
}
do you mean:
public int A {
get{return this._A}
set{if(value<(100/this._B))this._A=value}
}
or what?
I'm not sure about precedence, but if "<"'s is higher than "/" then the if returns false because value<100 can be (0 or 1 )/100 is 0 in int, so _A never gets a value.
I guess, you should check the condition.
|
|
|
|
|
I am sorry,I mean:
if(value<(100/this._B))
Thanks.But the source codes is like this,the problem is the same.
|
|
|
|
|
HEllo,
I think best practice would be implementing "System.ComponentModel.ISupportInitialize" in your control.
public class YourUserControl : System.Windows.Forms.UserControl, System.ComponentModel.ISupportInitialize
This interface has two methods:
BeginInit()
EndInit()
The designer will call the EndInit method at the end of InitializeComponets (means all the properties are set).
((System.ComponentModel.ISupportInitialize)(this.yourUserControl1)).EndInit();
Your UserControl just needs a boolean flag wich tells the properties when EndInit was called.
And as an init call a method which does the validation:
private bool initReady = false;
private int _aInt=0;
public int AInt
{
get
{
return _aInt;
}
set
{
if(value!=_aInt)
{
_aInt= value;
if(initReady)
{
DoStuffWithAandB();
}
}
}
}
private int _bInt=0;
public int BInt
{
get
{
return _bInt;
}
set
{
if(value!=_bInt)
{
_bInt= value;
if(initReady)
{
DoStuffWithAandB();
}
}
}
}
private void DoStuffWithAandB()
{
if(AInt < BInt)
{
}
}
#region ISupportInitialize Member
public void BeginInit()
{
}
public void EndInit()
{
initReady=true;
DoStuffWithAandB();
}
#endregion
Hope it helps!
All the best,
Martin
|
|
|
|