|
If a process has opened the file "exclusively" then other processes cannot access it. The file has to be opened in a shared mode for other files to be able to access it.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
How do i do it? Is there an existing code to set an opened file to shared mode?
|
|
|
|
|
Are there any built in framework classes in the .NET by which i can directly convert an integer value into its equivalent Hexadecimal form in C#.
|
|
|
|
|
int number = 1223445;
string hex = number.ToString("x");
//hex is "12ab15"
|
|
|
|
|
String.Format ("{0:X}", 12345678);
Or String.Format ("{0:X8}", 12345678). The "X8" will pad the number with 0s if there aren't 8 digits.
Jon Sagara
Look at him. He runs like a Welshman. Doesn't he run like a Welshman? Doesn't he? I think he runs like a Welshman.
Sagara.org | Blog | My Articles
|
|
|
|
|
Hi all,
I want to study some important/difficult concepts in .net.
like
1. .Net Remoting
2. XML programing using c#
3. Thread synchronization
4. Appdomain and memory concepts
5. inside CLR
if any one knows the good link for the above concepts please share with me.
i thought these are the most difficult/important concepts in .NET
If you have any more inputs please add it to the list.
Thanks and Regards,
Srini;)
|
|
|
|
|
engsrini wrote: 2. XML programing using c#
3. Thread synchronization
4. Appdomain and memory concepts
5. inside CLR
Read Tom Archer's "Inside C# 2 ed".
engsrini wrote: 1. .Net Remoting
Read Ingo Rammer's "Advanced .NET Remoting".
Cheers,
Simon
> blog:: brokenkeyboards
> what I think of the OPTIONAL keyword in VB.NET? :: here
> CV :: PDF
> skype :: SimonMStewart
|
|
|
|
|
Hello,
I am trying to find out a way to know that the user has changed value in NumericUpDown control by typing in it or by pressing the up or down buttons. Any suggestions about it?
Thanks in Advance.
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
hi,
Value Changed Event is fired when you Click the Up or Down Button, you can do your calculations within that Event.
Also look for Leave Event of it, Compare the Previous value with New value and then you can customize ..... if the user has changed the value through Keyboard this will work
I hope this helps
kss
|
|
|
|
|
i want to create a blank process and decrypt my exe file and pause the blank process and memory overwritten with decrypted exe file and restart the process again (like process injection)
how to do that ????
Please Help Me ????
|
|
|
|
|
Wow! Just trying to come to terms with all the security implications of that makes my head hurt.
I think you might want to reconsider your strategy of implementing the protection for your software. Apart from anything else, where would you securely store the key to decrypt the exe so that no one else can do that themselves?
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
hi
this is algorith of "TZ Executable Protector" and finally i found it .
i want to implement above steps for protecting my exe file . but how to do this ?
please give an example !!!!!
thanks ...
|
|
|
|
|
hdv212 wrote: this is algorith of "TZ Executable Protector"
I would mark that algorithm as malware. The idea that one process can inject an executable inside another (blank or not) is deeply disturbing.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Colin Angus Mackay wrote: hdv212 wrote:
this is algorith of "TZ Executable Protector"
I would mark that algorithm as malware. The idea that one process can inject an executable inside another (blank or not) is deeply disturbing.
Agreed. Assuming this description is correct, someone's exploiting a security hole in the OS. There's almost certainly not going to be any documentation on the (C/C++) implementation, and there's a risk of it being broken permantly if MS decides to close it up. I know they're killing the ability to patch the kernel in Vista without getting MS certification and approval first (no more rootkits). The only reason they haven't previously is that it would break too many existing drivers and low level apps. Since win64 would break these as well they no longer had a reason to keep the hole alive. This is even less likely to be kept alive.
|
|
|
|
|
Hello board,
I looking for something that is similare to the MessageFormat class from java.
String.format() does a lot ofthe stuff I need, but I´m wondering if there is anything like the ChoiceFormat, where different phrases depending on a variable can be returned.
i.e.
"There {0,choice,0#are no cars|1#is one car|1<are {0,number,integer} cars} on the street.");
Any idea? Thanks for any answer,
Fridi.
|
|
|
|
|
Fridi69 wrote: Any idea?
You would have to create your own method for that sort of thing.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
You can do simple conditions with the String.Format() method.
string format = "x is {0:greater than;less than;equal to} 0";
string message;
message = String.Format(format, 5);
message = String.Format(format, 0);
message = String.Format(format, -5);
format = "x is {0:greater than or equal to; less than} 0";
message = String.Format(format, 5);
message = String.Format(format, -5);
|
|
|
|
|
This looks great, but it is limited to comparing on negativ, positiv and zero. I miss the plural...
In addition, I am not able to insert the var into the phrase, i.e. like
<br />
string format = "There {0:are no cars;is one car;are {0} cars} on the street.";<br />
causes the FormatException .
|
|
|
|
|
Hi,
Does anyone know ALL reasons why UnauthorizedAccessException exception could be thrown? (Except security problems.)
I'm writing desktop application that reads/writes into "C:\Documents and Settings\<username>\Application Data\...\my.xml file". This application is multithreaded so concurrency situations are possible. I’ve implemented retry mechanism in case of exceptions of type "System.IO.IOException". This mechanism solved all problems like: "System.IO.IOException: The process cannot access the file … because it is being used by another process." However, now I get “System.UnauthorizedAccessException: Access to the path "C:\Documents and Settings\<user>\Application Data\...\my.xml" is denied." I understand that catching System.UnauthorizedAccessException in addition to System.IO.IOException in the retry mechanism could solve the problem, but I’d like to know if it is possible that concurrency issues could generate UnauthorizedAccessException.
|
|
|
|
|
I don't think so! Furthermore, unless your program is running with administrative priviledges, it does not have the permission to access to certain files especially located below C:\Document and Settings\.
-- modified at 19:38 Monday 13th February, 2006
|
|
|
|
|
The program is not running with administrative privileges.
It's installed for a single user, that's why "C:\Documents and Settings\username\Application Data\...\" directory is used.
The UnauthorizedAccessException exception happens only for small subset of the customers and I can't reproduce it locally. In addition, these "unlucky" customers don't see the problem instantly.
That's why I'm wondering if theoretically this exception could be thrown during reading a file that is opened for writing in the same time.
|
|
|
|
|
hi
i want to embed an exe file in my app and (to protect exe file) run it from my app ?
please give me an example of this (exe file)
thanks ...
|
|
|
|
|
hdv212 wrote: i want to embed an exe file in my app and (to protect exe file) run it from my app ?
It isn't anything I've ever tried. One way I can think of is to embed it as a resource, then when necessary extract the resource and write it to disk and run it. When the process terminates it can then be deleted from the disk.
However, I don't see how this would protect the exe. You could always run some diagnostic tools over the wrapper application and extract the resource.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Hello...
I'm in the process of writing a network analyzer in C#
for an IT project. One of the project requirements is for the
analyzer to report some metadata concerning Exchange-based
emails that go out to the internet. Currently, I've got a simple
listening socket (RAW socket) that is intercepting the
network packets. The questions are:
1) Where in the IP packet (Ehternet, IP, or TCP header)
can I inspect to determine that it's an Exchange-related
packet and needs to be process (inspected) further.
I'm pretty sure the IP packet would be of type TCP, but
2) Where in that series of bytes does it specify Exchange, the to:/from:/subject:/ etc. Is it the TCP header, IP??
3) Is the a doable thing?
I'm assuming that Exchange is using SMTP for sending the email(s).
Any info would be extremely helpful...
Thx,
T
|
|
|
|
|
What if you used a program called Ethereal to capture the traffic you want to sniff. Figure out what trigger you are looking for and then program that into your project? Ethereal can get very detailed and can show you where the data is in the packets you are looking for. It parses out the data automatically based on what protocol it's sent and can show you the raw data if you need to see it.
|
|
|
|