|
Based on host evidence and strong name identity evidence the assembly must be granted permissions to run. In .NET 1.0 the Internet zone was granted no permissions, and in 1.1 was granted very few permissions.
Read Understanding .NET Code Access Security[^] for information about CAS and how to adjust your permissions.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Could anyone provide me with a simple C#'s client/server application. I am into socket programming with TCP/IP as my protocol.. Thanks in advance.
----------------------
Seeing the infinite...
|
|
|
|
|
Have you tried searching CodeProject?
http://www.codeproject.com/info/search.asp?cats=3&cats=4&cats=5&searchkw=socket+client+server&author=&sd=11%2F15%2F1999&ed=1%2F17%2F2005
|
|
|
|
|
Thanks Robert!!!
----------------------
Seeing the infinite...
|
|
|
|
|
Hi,
Does anyone know how to get the total commit charge of a system using c#?
Thanks
|
|
|
|
|
Can you describe what you mean by "commit charge"? That's rather ambiquous.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I meant, the total memory that is being used by the system (Virtual and Physical).
As is shown by Task Manager.
|
|
|
|
|
On NT you can use counters to query this information. Read about the PerformanceCounter[^] class in the .NET Framework SDK.
This works great in VS.NET where you can create instances of PerformanceCounter simply by using the Server Explorer to browse the performance counters and drag and drop the one you want onto the designer. You can do the same thing manually, of course, since the designer (for the most part) utilizes CodeDom serializers implements in the Framework.
WMI - via the System.Management namespace classes - can also query for this information but is not as robust compared to performance counters in this case.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hello
I want to find if a directory inherits of another parent directory.
For example in Windows, by clicking the right button of the mouse in a directory, after clicking on "Security" it's possible to know if the current directory inherits of the rigth of a parent directory.
How to find that ? I guess that this information is stored in wmi but I didn't find where.
Thanks in advance for your help !
|
|
|
|
|
please
|
|
|
|
|
|
Hi every one
I need a help in JPEG image processing with C# language ,I need to know how can I read the jpeg file bit’s in the stream wile it compressed and get from it each pixel value in jpeg pixel format and then convert this pixel from jpeg format into RGB format and return it for the jpeg format ,if that is possible.
I really need a help on this I search a lot for this but nothing I get ,if any one have any idea or resource about this problem pleas tell me about it ,if you can.
memo
|
|
|
|
|
What you're asking is kind of bizarre. A JPEG is compressed, you can't read it bit by bit to get the pixel values, you need to decompress it. Luckily, the Bitmap::FromFile function will do this for you for free. All you need to do is load the jpeg from disc, and then use the approach seen in my image processing articles here on code project to access the bits. Remember, if you're going to edit a jpg, jpg has lossy compression, so some detail is lost when you save it again.
To summarise, you need to load the entire jpeg, edit it as an in memory bitmap, and save it again as a jpeg. No compression scheme will allow you to change one pixel without changing significantly more than one byte of the image in it's compressed format.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hi
thanks you very much for answering me.
I will explain my problem , and why I want to do this bizarre thing ,this problem come from my project where I try to hide some kind of data in all the byte’s in the image pixel’s without insert any noise for the image colour and it worked with me in the bitmap format (RGB) ,but I try now to drive my algorithm to work on the jpeg format either but I found a lot of problem on this that because.
I couldn’t understand for this time how the jpeg compressed ,and how it store each compressed pixel in the jpeg file ,and how could I get this stored pixel and returned it into RGB format and work my algorithm with it and then return it into JPEG format and store it that only if that could be possible ,you can see that my problem come from ,that I still try to understand the JPEG image format but I tried very much to solve this problem but nothing helped me because I couldn’t find a good resource about this subject.
So as you said “If you're going to edit a jpg, jpg has lossy compression, so some detail is lost when you save it again “ and I want for this to be happen because any bit I loss it could cause for me a disaster.
I don’t ask here to tell me if there is any ready library can help me to do this I just want to know does that possible to be happen or not? And if it can be , how??
I believe that all the programming is just a game nothing more or less.
Thanks again for every one give me a suggestion that can help me to solve this bizarre problem.
i try to learn programming what ever i had i feal that i did'nt get anything
|
|
|
|
|
|
memoboy wrote:
..I try to hide some kind of data..
You mean steganography?
Corinna John has written a long series of articles on that subject here on CP: Clicky[^]
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
you what are you saying about the steganography and what corinna john did about it she provide a very wonderful work ,I have been read all of it work and I like it very much but in my project I use another algorithm which allow for me to hide a huge mountain of bit's in each pixel without insert any noise on the image it self ,but as I have seen in corinna work the passward control the a mount of bit's that you can hide in the image ,my algorithm allow for me to hide in all the pixel.
And that is a very big different here.
i try to learn programming what ever i had i feal that i did'nt get anything
|
|
|
|
|
I guessed this is what you were doing, image masking is why I almost never use jpeg, for exactly this reason.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
And to add what Christian said, use Bitmap.LockBits to get the BitmapData in which you process each pixel, and Bitmap.UnlockBits to release the lock (locks the data in memory so it isn't moved while processing it) on the bits.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
*grin* I was hoping he'd get that bit from my articles
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
ok but as i know if i open the image and modefy it bit's in bitmabe formate and then i restore it as jpeg foramte there will be a lose in bit's value
my project need from me to keep some spacifice bit's in each pixel with keeping it in it origonal form without losing it there is any way for that
memo
|
|
|
|
|
memoboy wrote:
ok but as i know if i open the image and modefy it bit's in bitmabe formate and then i restore it as jpeg foramte there will be a lose in bit's value
Yep, like I said, that's what 'lossy compression' means.
memoboy wrote:
my project need from me to keep some spacifice bit's in each pixel with keeping it in it origonal form without losing it there is any way for that
You want jpeg compression to be lossless ? No, you can't achieve that, you need to use a different image format.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
JPEG2000 claims to support lossless compression, but GDI+ does not support it yet in any release bits. If one could find a GDI+ image codec then .NET would inherit the format by instantiating your own ImageFormat using whatever Guid defined with such a codec.
To the original poster, if you want lossless compression PNG is about as close as you'll get.
You can also control the amount of compression (less compression == better quality == larger file size) by using the Save override to specify an EncoderParameters object and using the EncoderValue enumeration with one of the compression members if you save as a TIFF image (.tif or .tiff).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
hi every 1 ,
i'm working on a simple networking project and i want to transfer files between the client and the server , i use a FileStram and StreamReader in the client to read the data from that file . but i think i no data are retreved from thet file . is there any way to do that correctly ?! can any 1 write a few lines to show me how to get this byts and send them thrugh the network ?
please help me !
|
|
|
|
|
You need to use a NetworkStream , which is documented in the .NET Framework SDK class library[^].
You can obtain a NetworkStream from using a TcpClient or a plain Socket connection. You can also obtain one from WebResponse.GetResponseStream . Pluggable protocol handlers that extend WebRequest and WebResponse like the HttpWebRequest and HttpWebResponse class, respectively, communicate across channels (like HTTP for the HttpWebRequest class, obviously) and allow you to stream both request and response data.
Look at the classes available in the System.Net and System.Net.Sockets namespaces in the .NET Framework, which I've linked above and is installed by default with VS.NET. It's also available as a separate download from http://msdn.microsoft.com/netframework[^].
If all you need to do is copy a file from a network share you can use File.Copy . If the user has permissions the file will copy across the network to the destination location just like how files are copied when using Windows. If the user does not have permissions and you need to impersonate a use who does (which requires that you prompt for credentials), then read about the WindowsIdentity.Impersonate[^] method.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|