|
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~
|
|
|
|
|
danberlove wrote: open source is good
Agreed, except some people need to earn a living which is virtually impossible off donations from a few thoughful users out of the n that will expect support.
Most people don't have the knowledge or desire to disassemble your application. If it's a good application that they have the need for, so long as the price/licence is fair they will purchase it. The few that may attempt to rip you off will normally only do so if you are overcharging or have an unfair licence.
There's always the odd ones but they will do it no matter what you do if there is the demand for your work.
[My opinion only!]
|
|
|
|
|
See NTcore's Phoenix protector, it's pretty good and free
However, before you do that, you should realize that it is fundamentally impossible to completely hide your code (ok you can, but then your CPU does not know what to execute either so your program wouldn't be useful anyway)
So no matter what you do, people will be able to "borrow" (and/or edit) your code. But with obfuscation, the script kiddies and other noobs may give up. That's all. If you're worried about industrial espionage, your only choice is to never release your program.
|
|
|
|
|
ok i really hounestly (on my own mind and heart) cant think of ANY code to start this,
right so a value in a textbox say equals "999" i want to then convert it to hex (i know how to do that with SB) then having it add 1 byte (00) after each byte so : "3900390039" how would i go about doing this ?
Thanks
|
|
|
|
|
Is this an attempt at UTF-16?
Why not iterate over the 999, converting one character at a time and adding the '00'?Regards,
Rob Philpott.
|
|
|
|
|
Try this:
string s1 = "999";
byte[] b1 = new byte[s1.Length * 2];
int index = 0;
foreach (char ch in s1)
{
b1[index++] = (byte)ch;
b1[index++] = 0;
} txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
|
OK..,
I giving u a idea about this..,
read text box value to a byte array...,
byte[] mybyte = Encoding.UTF8.GetBytes(textbox1.Text);
declaring 0x00 byte
byte x = 0x00;
declare a new byte array and add, bytes as per your requirement.
TnanksRajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|