|
I will be testing it that way, I'm just throwing it out there that if someone has a better idea on how to do this, I'm open to that.
When I'm done testing I will report back on how it worked.
|
|
|
|
|
This did work manually ... I'm having a very difficult time finding information on how to do this programatically though.
I haven't found any code examples that do this remotely, and that specify as to which group is the permission change is being done to.
|
|
|
|
|
Ok I finally got this to work programatically, it was quite a pain ... at least for me.
If you remove query access and then put it back, it works. It's quite simple I think.
|
|
|
|
|
dunno, but is regedt32.exe not ok?
|
|
|
|
|
Hello To All,
Please Help Me To Solve My Problem.
I am developing an Window Application. I just want to know that, what code should I write so that when user press the Update Version Button On Form, the Software Should get updated with new version Online. My Appliccation is Online.
Please Help Me.
Thanks & regards
Sanket Patil
.
|
|
|
|
|
|
|
Nothing more than a rewrite of Click Once
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hello
I am doing face detection in live camera, first I detect skin and then I copy that skin area from the original image and re-size to he 50(width) and 70(height), because my template is 50(width) by 70(height) size.
when I start so some frames are checked properly but after some moment (or some time at the first frame) the following exception is generated.
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
the above error is generated on below line in the code.
stor = ((rowTamplate[(h * pixelSize)] + rowTamplate[(h * pixelSize) + 1] + rowTamplate[(h * pixelSize) + 2]) / 3) - ((rowBitmap[(h * pixelSize)] + rowBitmap[(h * pixelSize) + 1] + rowBitmap[(h * pixelSize) + 2]) / 3);
I thought alot to understand this problem but I failed.
the actual code is here.
BitmapData templateData = template.LockBits(new Rectangle(0, 0, 50, 70), System.Drawing.Imaging.ImageLockMode.WriteOnly, template.PixelFormat)
bitmap = ImageResizer.ResizeImage(bitmap, 50, 70);
BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, 50, 70), System.Drawing.Imaging.ImageLockMode.WriteOnly, bitmap.PixelFormat);
double stor = 0;
for (int w = 0; w < 70; w++)
{
Byte* rowTamplate = (byte*)templateData.Scan0 + (w * templateData.Stride);
Byte* rowBitmap = (byte*)bitmapData.Scan0 + (w * bitmapData.Stride);
for (int h = 0; h < 50; h++)
{
stor = 0;
stor = ((rowTamplate[(h * pixelSize)] + rowTamplate[(h * pixelSize) + 1] + rowTamplate[(h * pixelSize) + 2]) / 3) - ((rowBitmap[(h * pixelSize)] + rowBitmap[(h * pixelSize) + 1] + rowBitmap[(h * pixelSize) + 2]) / 3);
if (stor < 0)
{
stor *= -1;
}
PixelsCounter += (int)stor;
stor = 0;
}
}
thanks
modified on Tuesday, December 28, 2010 9:53 PM
|
|
|
|
|
I suggest you read the forum guidelines, and use PRE tags. I don't read unformatted code.
|
|
|
|
|
sir I used pre tages please now check. and let me tell you sir every time when exception is generated I check the different run time values, the exception is raised every time when the value of w which is in upper loop reaches to 67.if i keep the upper loop lower than 67 so then every thing is ok. but i don't understand that what is the reason.
|
|
|
|
|
When you apply a filter to an image, you have to make sure that every pixel exists.
So this pseudo-code will fail:
for (x=0; x < imgWid; x++) {
for (y=0; y < imgHei; y++) {
calculate output pixel using pixel(x,y) as well as pixel(x+filterWid-1, y+filterHei-1);
}
}
For any filter size larger than one, the rightmost or bottommost pixels will fail as either x+filterWid-1 or y+filterHei-1 or both will lie outside the input image.
It is like moving a 2*2 block inside a 4*4 box; there aren't 4*4 positions, there are only 3*3.
A possible approach would be:
for (x=0; x < imgWid-filWid+1; x++) {
for (y=0; y < imgHei-filHei+1; y++) {
calculate output pixel using pixel(x,y) as well as pixel(x+filterWid-1, y+filterHei-1);
}
}
as now none of the indices will be outside the input image.
This really means the output image would be slightly smaller than the input image. Most image processing software will try and keep the output image the same size; they do this by cheating somehow, most often by adding a few imaginary rows and columns of pixels, either by using a dummy color (white or black), by replicating the top and bottom rows and left and right columns, or by mirroring the image.
So if your filter is 3*3, add an imaginary row above and below, and a column left and right.
|
|
|
|
|
Does Native C# can do all what WMI can do special for Remote PC??
umm i heart that and i heart also it will be faster so is it true ??
thanks all
bye
|
|
|
|
|
You might want to give an example of what you're talking about. I don't have a any idea of what you're trying to do.
And what's with the "I heart this and that" garbage??
|
|
|
|
|
Dave Kreskowiak wrote: what's with the "I heart this and that"
I think OP means "I heard ... "
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Since you can use WMI from C# (ManagmentObjects), you can per definitionem do at least all that can be done with WMI. Since you can also use native dlls from C# you can do already more than WMI alone. Q.E.D
Cheers!
|
|
|
|
|
What the heck is "Native C#"?????
We normally call C and most C++ native (and unmanaged), and C#, VB.NET and C++/CLI managed (and not native).
|
|
|
|
|
Luc Pattyn wrote: What the heck is "Native C#"?????
The local version of C#. It's native to him.
All the best,
Dan
|
|
|
|
|
Dear ALL
Now i have a col . contains for example the following PC1 PC2 PC10 PC100 , if u tried to sort it , it will be PC1 PC10 PC100 PC2 so how to make it sort as it sort numbers to be PC1 PC2 PC10 PC100
my datagridview is binded to a datasource so i can't use SortCompare(object sender, DataGridViewSortCompareEventArgs e)
so any tips
thanks all
bye
|
|
|
|
|
Sort the data before it is bound. You will need to implement a custom IComparer
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Yes, wait for .NET Framework 5.0 and hope they have implemented your specific sorting requirements into the DataGridView control.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Daoist Coding and Sarcasm, I like it!
|
|
|
|
|
Sarcasm?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
If you're able to control the format of the data, you can achieve what you want by padding the small numbers with leading zeros:
PC001
PC002
PC010
PC100
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|