|
Ill try that.
Anyway it turns out i may not have to delete hat file any way. But ill try doing this. Im curios to know why this works though.
Two Thumbs Up!!
Mihir Karkare
|
|
|
|
|
My dear you want to delete such a file that is already in use by any other process.
First of all you should check which process using your desire file.
For check the process you can use unlocker softwares.
The second reason that i guess you have did that thing. That is you open the stream and did not close the stream.
You should check your code that you create the file you must close the stream before using the the file by any other function.
If you did't solve the problem then contact me personally
nidostyle@gmail.com
|
|
|
|
|
Hey thanks for helping but the requirement has changed. Turns out i dont have to delete the file anyway.
Thanks for benig so helpful.
Two Thumbs Up!!
Mihir Karkare
|
|
|
|
|
You first need to stop the service which is using this log file and then delete the log and restart the service.
You can stop and restart the service using WMI approach.
i can write down the code for you if you want, its quite simple.
SS
|
|
|
|
|
Thank you so much. But turns out i dont have to perform that deletion anyway. If you could, please share the code anyway!
thanks
Two Thumbs Up!!
Mihir Karkare
|
|
|
|
|
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.
|
|
|
|