Your dll is a very nice thread and I use it to protect my application with the IMEI. But, when I try to compile the application for the device (.Net Compact Framework 2.0, optimized) it will take an error in the line phoneID.setstrings. Where is the mistake?
setstrings is an input only method (you can see that only 'I' appears in the description).
I'm not sure what it's supposed to do but you can try to change the line to:
phoneID.setstrings = ""
Hi maXim and taximania! Thanks for this library - this is what i'm looking for! But I have some doubts - will this method work on all devices with all WinMobile versions?
Thanks to Agraham's help, in a few days I'll be able to post my aproach to software protection, using the MAC Address as a crypto key....
IMEi will only work on Phone enabled devices, but is my belief that all devices running WM, being them SmartPhones, PDA or whatever, will have at least one network adaptor....
setstrings is an input only method (you can see that only 'I' appears in the description).
I'm not sure what it's supposed to do but you can try to change the line to:
phoneID.setstrings = ""
The readonly property of 'SetStrings' in PhoneID.dll actually sets the strings returned from the other properties. If it isn't called, there's nothing returned from the other properties.
I sort of got it working by accident
I've just had a look my .dll code, altered something by mistake, and now it won't compile :signOops:
Hello! It seems what this method don't work on my Glofiish M700 (WM 6, .net cf 2)... When i'm trying to run compiled (Force VGA mode) program (both maXim's and taximania's), it always raises an attached error. I didn't change anything in the code. Maybe my device just unusual?
Hello maXim. Thank you for you new distribution, it work when i compile it with "non-optimized" option. But i can't compile it in "force VGA" mode, i get an attached error message...
Hello again, maXim!
I'm afraid what the code from your previous post still raises an error from my previous post :sign0148: What is it? Is this code compiles for all, except me?:sign0085:
GeneralInfo is a Struct declared private but B4ppc sees it anyway and treats it as an object. I don't really understand why the C# compiler doesn't like it, probably because as GeneralInfo is declared private it is honouring that declaration which makes it unavailable to the main program.
One solution would be to rename it to _GeneralInfo, which the B4ppc compiler will ignore due to the leading underscore, and access it through a public property which the B4ppc compiler treats correctly. It might also work if declared public.