Bugs in tounicode and reg2fdf - Windows Mobile Software Development

Hello, there!
I've found one bug in each of reg2fdf.pl and tounicode.
reg2fdf
reg2fdf.pl does not copy registry paths which contain no values to the resulting fdf file. For example the key "HKLM/Software/Microsoft/Windows Media Player 8/Button Map" is empty by default in my ROM (O2 GER 3.19.01), but needs to be present in the registry for Media Player to start up.
A workaround (which currently runs on my machine) is, to create an empty key=value pair for each path. This, however, increases the size of the fdf file by about 20KB, since every path gets this dummy key. The solution would be to detect paths with no keys and to add this dummy key only to those.
tounicode
tounicode uses signed chars and shorts to do the conversion. This makes it impossible to convert ASCII characters greater than 0x7F since they are treated as negative values. The German "ΓΌ" (ASCII: 0xFC) becomes some strange unicode character (0xFCFF).
The solution is to use unsigned types and do an implicit typecast to char where necessary.
HTH,
Christian

thanks,
fixed now in http://nah6.com/~itsme/download/mkrom_136.zip

Related

Help request - setting registry (owner info etc) from a cab

Hiya, I've been playing about with the extended rom and have the system in great shape, apart from some registry settings, such as the owner info and device name. It would be kinda handy to have these setup automatically but I am totally unable to do it... I'm presuming it's because there is something else that has to be done other than simply set the keys.
I'm using PHM reg ed to export keys as well as simply creating them manually and am using WinCE Cab Manager to make the cabs. I'm on the original O2 Exec rom (well, most of it )
When I run the cab (automatically from a hard reset or manually), I can see the values in the registry but they never appear on the today screen. I've tried a variety of power cycling, soft resetting etc but the today screen is never updated - it always says "Tap here to set owner info". If I do that, the registry keys are cleared out...
If anyone can shed some light on this I'd be grateful - for a small problem it's taking up a lot of time! :?
Cheers!
I've not gone down the .CAB route, but just import these and other settings from a .reg file and have never had this problem.
When I have to install from scratch, the first install is Resco's Explorer (which contains a Registry Editor), then execute the .reg file.
Almost sounds as if the registry changes are not being saved. Is it only these particular settings or are other changes not registered?
Well, I have created loads of CAB files in WinCE CAB Manager to set up my phone, tomtom, etc.
I Used the same method as you. The only difference being that I reset (automatically) after I install them. Could this be it?
Ahh, which WinCE CAB Manager version you running? You need the new beta 1.2 version to be able to create WM5 compatible CAB Files. Can this have something to do with it?
moghisi101 said:
... The only difference being that I reset (automatically) after I install them. Could this be it?
Click to expand...
Click to collapse
Probably the cause. I know I've read and experienced that I must allow the device to flush after changes before I reset it. I usually turn it off, then wait a minute or two before I soft-reset.
Ahh, which WinCE CAB Manager version you running? You need the new beta 1.2 version to be able to create WM5 compatible CAB Files. Can this have something to do with it?
Click to expand...
Click to collapse
As yet I'm not using CABs/Cab-Manager. Couldn't find one when I looked - except at ridiculous money, which I wasn't prepared to waste - so I'm just using the .reg-files manually
Guys, many thanks for the replies!
I'm using my 15 free goes (and hibernating ) on version 1.1 of WCM at the mo, it's too expensive to buy as I would only use it for this as far as I can see - I'll head off and look for the beta next.
I have tried power cycling, pausing while off and resetting as well as soft-resetting from software, but not doing it automatically 'cos I don't know how!
@moghisi101: Out of curiousity, how are you automatically performing a soft-reset and thanks for the heads-up about beta 1.2!
I have written an Autorun.exe file, much like the one in the extended rom. It does not however read a config.txt file. It runs the CAB files (with my apps and settings in) and then resets.
I don't remember where I put the code, so I can't compile one for you. It only needs a slight change from the Autorun sample Microsoft Supply.
At the moment I can set up pretty much everything on the phone. Button Lock, GPRS Settings (including GPRS Auto Attach, etc), Owner Info, Default Volume, Today Screen Plugins (order and enabled/disabled), Date/Time, Screen Config, Infrared off by default.....the list goes on. When I Hard Reboot, It skips the welcome screen (all the time settings etc) and I've got it to ask me which Operator Settings to Install (eg Vodafone, o2, Orange, Tmobile Splash Screens and GPRS connections).
It's much better than the default Qtek, i-mate, and (definately) o2 ROMs...
Just a thought!
Are you annotating your .reg files with semi-colon at the start of a line?
With the PC, I've always annotated my .reg import-files, so that I could remember why I'd done something later on, but found that *no* lines after those annotation would be imported on the Exec (Universal). Don't know if this is specifically a WM5 issue or not. If you put the annotations at the end of the .reg file, all the preceeding key/value content lines *are* imported.
@astage: Interesting about the annotations, that must have caused some pain before you figured it out! I don't have annotations in my reg files as I'm not really using reg files I'm building keys in WinCE Cab Manager by both importing reg exports and typing them in manually.
Unfortunately, the beta version is only available to registered users, so I'll have to abandon that one for now.
@moghisi101: It sounds like you're sorted! That's basically what I had in mind myself, except that I was thinking smaller
Thanks for the thought about compiling an exe, I was thinking I may have to ask a mate to make something like that so if you do find the code and feel like posting one, I'm sure the community would thank you!
I've been looking for something that would just install cabs etc then reboot but not found one yet on the web... I'm a UI designer and so am wary about going down the visual studio path for fear I may start to favour all-grey interfaces :twisted: .
Which autorun sample are you referring to though? I guess I may have to get my hands dirty after all!
No, I don't annotate them, so I haven't come accross this. But, if you save some Keys using a Reg Editor and then use Import in WinCE Cab Manager...ahhh, I think i may know the problem!
1. Don't put Comments in Reg Files
2. Don't use import in WinCE CAB Manager! If the reg key has data above a certain length it will split it to next line using a ";", but WinCE Cab Manager assumes this is the end of the data. So, your Owner Info could be being entered in incorrectly as a result. You have to copy-paste the reg key into a new dword, etc into WinCE Cab Manager. i.e. DONT IMPORT
I hope that vaguely made sense
Yup! Clear as a bell, thanks! I'll try that in a mo, just rebooting. Import is *sooo* tempting though, so simple... Curse my weakness for the easy path!
Hi. Here is Microsoft's Autorun Code (I have that)
You have to make slight changes to allow for reboot at end. It's fully annotated if you dont understand what it means. BTW, you dont need Visual Studio. Infact it's probably the worst root. Use Microsoft's eMbedded Visual C++ 4.0 to compile this for Windows CE, Mobile 2003SE, (or Mobile 5?). It's Microsoft but it's FREE!?
Sweet! Two terms you don't hear very often in the same context are Microsoft and free! Nice one, thanks! I'm downloading Microsoft's eMbedded Visual C++ 4.0 as I type.
You actually solved the problem already though, in a way, pointing out that WCM truncates "strings". I opened an exported key in Textpad and tidied it up (removing the end of line "\" and the "\n\t") then saved it and imported the file into WinCE Cab Manager, made my cab, installed it and soft rebooted from SPB PocketPlus without going back to the Today screen. It worked!
I'm a big fan of Textpad and will use that to make a macro to tidy up exported reg keys so I can import them easily (another triumph for the easy path!).
You, Sir, are a DUDE!
Edit: 16.4 kbps from MS... :roll: For anyone else who decides to go down this path, the killer bit is to make sure your key values don't get truncated! Open the .reg in a text editor and make sure any really long values, like binaries, are all on one nice long line! It doesn't seem to make any difference if you soft-reset from an app or use the stylus btw.
Shame the baby kept us up all last night! I've *got* to get some sleep or I'll end up doing god knows what to my device by accident!
Thanks for the help moghisi101!
Hehe, Gee Thanks. And btw, Textpad r0x!
If you want to do that autorun thing.....familiarize yourself with the whole 2577 method (search it and you'll understand). If you don't want crappy o2 Customisations, etc on your device then you are better off just editing the extended rom, edit the config.txt, add your configuration CABs, and then every time you hard reset all your customisations will appear! NO programming involved. If you then add "welcome.not" file to SD Card, the Welcome screen at hard reset wont appear (if you code this in your autorun file it will work on ALL devices, not just a few including HTC). BUT only do this if your CAB files contain stylus screen settings, and time settings. However, as this is not viable in all situations the 2577 method can be much better. Especially when selling a piece of software, etc (automatic installation and configuration), as I do.
I might email you, later on, a video of what happens when I hard reset my device to give you an idea of what you can do (at the least) and hopefully you can go on to improve on that.
Thought I will give you a kick start. Here are some Regedits I could make for you. Took me a short while, but there are loads more for inbuilt apps (e.g Messagig, etc) but I coudn't remember where the reg values where.
Please note, I couldn't find any of the WM5 ones...completely forgotten them. But these should give you and idea as to where they are. Also, look here in the Wiki
http://wiki.xda-developers.com/index.php?pagename=BA_Hacks_WM5
http://wiki.xda-developers.com/index.php?pagename=BA_Hacks
Some of the ones I have given are from here, but many more I found myself
Hope it helps you (become a millionaire - don't forget me )
You can see the solution here: http://forum.xda-developers.com/viewtopic.php?t=34525
Thanks to Bayondthetech for the CAB file.
Hehe. I feel like a n00b now (which I am really). I hadn't seen that. But I think mine does a couple of extra things that he didn't post....?
Bye
Wow! Holy Cr*p! Thanks for all those reg files! :bows:
I'd looked at BTT's post before and was hoping to use his cabs as a guide. Unfortunately, they aren't currently available (from what I've read, he generated so much traffic with his downloads that his host yanked his connection and he's in the process of moving sites).
Thanks to moghisi101 and a few other posters on this forum, I don't need them any more!
@moghisi101: I had already edited my extendedRom's config file to load and run cabs I store on the SD card (to keep the extRom below 10mb) and realised last night that that already does the auto reset for me, so life gets another bit easier These reg files rock though! Shame you're not running tomom5 yourself, I'll have to sort those out myself!
The next thing to try is to export the BT settings for my paired devices - I'm hoping it will be possible to restore those automatically too.
Attached is the TextPad macro (although it is too simple to call it that really!) that I'm using to tidy up the reg keys for import into WinCE Cab Manager, hope it helps someone!
Post that video!
Hey
Actually, I have TomTom 5....up until 5.10 I edited TomTom's Cab itself but I just haven't had a chance with 5.21 (need to use CabWiz now, not WinCE Cab Manager - no full WM5 support lol).
The TomTom 3 Today settings is same for TomTom 5 if you want to change order/hide/unhide. Most of the other settings are in a .cfg file on SD card for Home Address, etc. Only a couple other settings use Registry...
Anyway....glad to be of some service
moghisi101 said:
... (need to use CabWiz now, not WinCE Cab Manager - no full WM5 support lol). ...
Click to expand...
Click to collapse
Had a brief conversation this afternoon with a friend who uses Microsoft's CabWiz to produce .cab files for bespoke software.
He mentioned that (with CabWiz) if you use the .cab to apply registry entries, then the .cab must also install something, a text file or similar. I can't recall if he said it would otherwise not create the .cab correctly, or that the reg entries may not be applied correctly.
Not yet tried it myself - will have to wait until after the bloody Tax Return is finished!
Strange, It works fine for me? Was his the newer CabWiz that you can use with WM5, like mine?

VGA Files - How to edit?

Does any one out there know how to edit the .exe files so that I can turn them into VGA (96dpi) for the Uni?
I have tried with the Camera and WLanMgr modules and neither of them seem to work so I don't know what I am doing wrong.
I have tried PE Explorer, XN Resource Editor and Resource Hacker but none of them seem to work. Is there any sort of builtin checksum or protection.
Thanks in advance,
Pug
I think Visual Studio is the best resource editor for this job.
However, examine Azhad's work on fixed VGA apps, he did great work.
From memory, you have to create a new resource dll and sign it. But I'm not sure, I got for less direct routes personally.
V
pug said:
Does any one out there know how to edit the .exe files so that I can turn them into VGA (96dpi) for the Uni?
I have tried with the Camera and WLanMgr modules and neither of them seem to work so I don't know what I am doing wrong.
I have tried PE Explorer, XN Resource Editor and Resource Hacker but none of them seem to work. Is there any sort of builtin checksum or protection.
Thanks in advance,
Pug
Click to expand...
Click to collapse
I am using Tweaks2k2 always, the VGA hack is built in there. You just have to browse for the .exe file and click a button to apply "VGA brute force".
pug said:
Does any one out there know how to edit the .exe files so that I can turn them into VGA (96dpi) for the Uni?
I have tried with the Camera and WLanMgr modules and neither of them seem to work so I don't know what I am doing wrong.
I have tried PE Explorer, XN Resource Editor and Resource Hacker but none of them seem to work. Is there any sort of builtin checksum or protection.
Thanks in advance,
Pug
Click to expand...
Click to collapse
DPI aware applications just check in the registry which DPI is used.
QVGA Pocket Pc, 176 x 220 Smartphone & 240x240 Pocket PC have a resolution of 96 dpi.
VGA Pocket Pc & 480x480 Pocket Pc have a resolution of 192 dpi.
QVGA Smartphone has a resolution of 131 dpi.
This info can be found in MSDN (Windows Mobile Version 5.0 SDK, High DPI Display)
Windows Mobile Version 5.0 SDK, User Interface layout:
UI elements whose positions and sizes are specified in pixel coordinates that assume 96-DPI will be incorrect in high DPI. In general, all UI elements should be laid out using scaled positions and sizes, or relative to controls, fonts, or system metrics.
The GetDeviceCaps Windows CE-based function can be used to obtain a display's DPI by passing in either LOGPIXELSX or LOGPIXELSY as the second parameter. The CrosswordSample demonstrates how you can define SCALEX and SCALEY macros to apply a scaling factor based on information from GetDeviceCaps.
You can continue to work in pixels but remove assumptions about the DPI by:
Using the SCALEX and SCALEY macros to scale 96-DPI pixel coordinates, or using the metrics returned by GetSystemMetrics.
Expressing sizes or positions relative to other controls.
Expressing sizes or positions relative to a font.
Dialog boxes already use font sizes to determine their layout, so typically they need no special modification to work on high-DPI devices.
Here is an example of positioning a window with DPI awareness, where x, y, dx, and dy are pixel coordinates in 96-DPI:
SetWindowPos(hwnd, NULL, SCALEX(x), SCALEY, SCALEX(dx), SCALEY(dy), SWP_NOZORDER);
If you choose to scale 96-DPI pixel metrics, be aware of rounding problems when using integers. For example, SCALEX(a + b) may not equal (SCALEX(a) + SCALEX(b)) because of rounding issues.
For drawing lines or images and icons, the same should be applied.
So even if you change the size of the resources, the application will try to find and scale the image with the dpi found in the registry.
The dpi values are stored under:
HKLM/System/GWE/Display
Cheers,
.Fred
Thanks for the info guys,
Just read it so will shoot off and have a look at all the info and see which works best for me.
Once again, thanks.
Pug
Battery
I'm 200% sure the battery is gone, b'coz i faced the same problem with my Dopod 900. Strange, it was just 4 months old and the battery just gone.
I replaced it by warranty, but I was privately told there was a problem in some deliveris with battery

Easy FontLink .cab for Japanese

Couldn't find anything simple so I just made this very quickly: it copies the 2 Meiryo fonts to your \Windows\Fonts directory and sets the appropriate HKLM entries.
Made it for myself to display Japanese properly in PIE... No functionality guaranteed
If it helps anyone else, great!
(P.S. My X1 runs 6.5 with the 2009/7/3 EnergyROM)
(P.P.S. Sorry I didn't compress it but that seems to work better for me from a mobile)
http://rapidshare.com/files/255582233/japanese.cab

WP7 Unicode

Hi, WP7 support UNICODE?
I see some post where its said that WP7 supports Unicode,
But on my HD7 I cant see Georgian Text (UNICODE)
what part of the phone are you looking at? i know the browser does support it, but i'm not sure about the rest of the phone.
browser (IE),
I just navigate to http://google.GE
and get squares not Georgian text (Unicode)
the net seems to be stuffed on my phone at the moment... thanks vodafail.
i will try and test it when i can and get back to you on what it looks like on my phone. but i always through ie supported it, but if you're saying it's blocks, then i guess not.
if you want to know when it will be, twtter/facebook/social.microsoft.com would be the best ways to get in contact with them and find out.
Hm..., WP7 supports UNICODE!, because when i navigate to http://www.google.com/webhp?hl=yi its Yiddish google page its shows text correct!
Yiddish is UTF-8 and Georgian is also UTF-8
So perhaps its missing Georgian font
but how can I add Georgian font to WP7, and what fonts are supported...
Would be nice, if Microsoft would allow just copying sylfaen.ttf to windows\fonts directory, just like good old wm6.5
Pretty certain WP7 supports unicode since it's based on Silverlight which does so.
Yes it does support unicode. But for some reason it is missing fonts for some languages, like Georgian, etc.
use chevron ringtone installer for add fonts to wp7.
first step u need to change *.ttf to *.wma (chevron will build as ringtone)
after that deploy to ur phone.
open touch explorer and change file name to *.ttf
copy to /windows/fonts
don't know working or not
sorry for my poor english
I think the whole system is unicode.
WP7 has unicode. Cyrillic alphabet is working fine in browser, mail client, Office etc. The problem here is with the fonts.
I do not think it works. WP has some kind of restriction on ttf extensions.
1. You can not copy ttf's through mail attachements,
2. touchexplorer freezes when changing file extension to ttf.
Even worth. I coocked my own rom with Sylfaen.ttf in init and tweaked the registry as well. All I get is blank screen when viewing Georgian pages. Anyone has suggestions?
how to install unicode to HD7
Here is same problem too. I can't install my native font to HD7.
Could somebody help?
Thank in adv!
No Help Yet
I have truyed all kind of diffrent things to make georgian letters appear, but no hope. The furthest I could get is view georgian in MS Word, that's it... On the internet I found out that the unicode support in WP7 is half way through. It has problems displaying some charecter sets. So, I gues will have to wait for M$ to work this problem out.

default bluetooth low gain

looked everywhere to set default Bluetooth gain on win 10 phones....yes I still run a nokia 1520.
cracking the 5 year barrier ...eat that iPhone
anyway default audio in the Bluetooth stack is set to 13,
to change it...your phone must have interloop installed then its a easy
reg tweak located at
hkey local machine/software/oem/volumelimit
integer
reg value default =13
modify =30
and
hkey local machine/software/oem/enablevolumelimit
integer
reg value default =1
modify =0
also while I got you, cortana's phone number is
5555559876
add her to your contacts, you can dial her while driving and ask her to do heaps of stuff while on the fly... awesome stuff no other os can do..
hope this helps
beserk

Categories

Resources