|
hey,
I would need to capture click event when a file is open. for example, when a user click to open a word doc file, do something to the file b4 opening it with ms word.
|
|
|
|
|
This[^] would give you some idea on this. "No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
|
|
|
|
|
i tried the mouse click event on compact framework but the HookManager is giving this error:
The type System.Windows.Forms.MoustEventHandler is defined in an assembly that is not referenced. you must add a reference to assembly Systems.Windows.Forms version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
any solution for compact framework??
|
|
|
|
|
how can i save a picture captured by webcam
|
|
|
|
|
naghoumeh14 wrote: how can i save a picture captured by webcam
By writing it out as a series of bytes to a storage medium. You'll have to be more specific to get a less vague answer; what format do you want to store it in, what format is it in when you get the data out of the webcam?"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
i need to save the picture captured in the bin/debug of my project and name it.. that's it...
|
|
|
|
|
bin/debug is a folder. He asked do you want to save picture as JPEG/JFIF, Exif, TIFF, RAW, PNG, GIF, BMP or others. And in what format do you get picture?
|
|
|
|
|
http://www.tokenworks.com/products/IDWedge.htm[^]
Hi is there any sample application in .NET is present to read card swipe information from these devices. i thinks this device works as keyboard buffered magnetic swipe reader. It would be great if any one can help
|
|
|
|
|
Hei,
I'm trying to get the Processor IDs of different PCs on the network. It works fine for one PC but when I use it to fetch IDs of more then one PC it return the IDs of first system and gives error at the second PC.
Error
RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
I have search this problem over the net and find this solution.
http://support.microsoft.com/kb/884564[^]
but each time i cant restart the system for taking the id of second PC.'
Any Solution?
ThanksSyed Shahid Hussain
|
|
|
|
|
|
I'm using
<br />
<br />
ManagementScope scope = new ManagementScope("system path");<br />
<br />
<br />
ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_Processor"); <br />
<br />
ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);<br />
<br />
ManagementObjectCollection queryCollection = searcher.Get();<br />
<br />
<pre> Now search here for "ProcessorId" </pre><br />
<br />
Is it the right way?<div class="signature">Syed Shahid Hussain</div>
|
|
|
|
|
|
Thanks Dmitry for ur quick reply.
ur syntax is right. And here i have send the short code. I have called coonnect method and all other thing related to that but problem is here with
scope.connect() When the control comes at this point at the secong time it give this RPC error .
What to do in ur suggestion.
Is there any other way for geting the LAN PC's processor IDs ?
ThanksSyed Shahid Hussain
|
|
|
|
|
Hm...
Maybe this [^] of this [^] will help?Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
|
|
|
|
|
Hi everyone.
I'm translating some code from C++ to C# and I've run into a big problem due to the fact that C# is managed and I cannot get the address of the objects I'm handling. (I'm a complete C# newbie so correct me if I'm wrong; I hope I am).
Here's the thing: I'm translating a system that underlies applications and makes sure accesses to shared data are done safely (handles concurrent accesses, etc). For that, whenever a position of the shared memory is accessed there are some measures to be taken, and locks are involved. Memory is segmented so that each 4 words share a lock (too fine a granularity creates high overhead; too coarse, and it greatly reduces parallelism) -- and this is the problem for me. The address of the accessed element is used to map to the lock, but I cannot use addresses in C#, since the garbage collector may relocate objects, etc. I could pin them, but I doubt that would do any good performance-wise.
Instead of addresses I've considered using hash codes (with RuntimeHelpers.GetHashCode), but then I have no way (that I can think of) to control how many memory elements map to the same lock. When using addresses you just shift the address 4 positions to the right, and then you know that you have 4 words mapping to the same lock (assuming addressing by byte and a 32-bit processor), but if you just take a hash code and shift it 4 bits you may end up with very irregular mappings, since hash codes don't need to be consecutive, etc. You may end up with a lock that is mapped by 10 words, and another by 1 or none... This is important for both perfomance and parallelism.
Please tell me that I'm wrong.
Is there a way to do something similar in C#?
Thanks.
|
|
|
|
|
If you don't want things reordering, you can always use the MemoryBarrier [^]class. To be honest, if performance at this level is an issue, I'd have to question why you're rewriting it in C# at all."WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Yeah, I'm questioning that myself
I didn't choose it, it was an assignment.
I'll check out MemoryBarrier, thanks, although I'm not very hopeful (it may cause more harm than good).
If anyone has an alternative way of controlling the number of elements that map to the same lock, please share! Please note that it cannot be a global counter, because that would create contention of the threads trying to read/update it. Oh man. I have no hope at all.
|
|
|
|
|
Hi again,
1.
only yesterday[^] you weren't inserting any locks, and now you're floading the world with them?
2.
indeed, CLR objects float around unless pinned; and pinning reduces the efficiency of the memory manager, possably resulting in an early OutOfMemoryException.
3.
I would create a fixed number of locks (actually I would do no such thing, you won't sell me automated or hidden locks, as I told you earlier), and keep a dictionary mapping objects to locks; when a new object needs a lock, just pick an existing one at random, and store the mapping in the dictionary. You may want to use weak references so your dictionary does not keep everything alive forever.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
Hi,
1. I didn't mean I didn't use locks at all, just that it's not that straightforward. Perhaps I should've written "I'm not JUST inserting locks".
3. I'll consider that, thanks. (and I assure you the system is efficient! But have it your way)
|
|
|
|
|
Hi.
I'm using Visual Studio 2008.I'm writing apps under C#.
Some disassemblers (like Reflector) can see my source code.
I searching in internet.There are so many app - anti disassembly.And they not free.
How i can protect my C# app ?
Thanks.We are haven't bug,just temporarily undecided problems.
|
|
|
|
|
You need an obstifucator, there is one that comes free with Visual Studio called "Dotfuscticator". Different obstifucators have different levels of security, so the free ones might not be the best. You'll need to do your research to find out which provides the level of security you are happy with. Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
|
|
|
|
|
See here[^].Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Thanks keefb and Abhinav.
I was try Dotfuscator.
It only renaming methods , fields name.But ,i think , after that can understand.
Any ideas?
Thanks.We are haven't bug,just temporarily undecided problems.
|
|
|
|
|
I haven't ever seen any really processional free obfuscator.Dotfuscator community edition cannot protect your code against advanced hackers, EazFuscator doesn't support reflection.Sorry if I dissappoint you but there's no any free obfuscators that can be used for commercial projects.
[EDIT]
Some of the soft. companies are using licence managers for their Win Forms/WPF components components based on unmanaged code, because it's mush more harder for disassembling compared with .NET or Java code, but even that
their products are cracked by some hackers.Life is a stage and we are all actors!
modified on Tuesday, February 16, 2010 9:25 AM
|
|
|
|
|
open source is good, just in my opinion.
why not share~ aha~
|
|
|
|