Friday 7 December 2007

WINDOWS CE - FAQ


Q: WinCE3.0 support IDE H.D Driver or not?

A: Yes, check atadisk.dll

Q: Does CE support java ,Macro media flash and PDF view ?
A:
Java: only java script,it does not include java virtual machine (3rd party support)
Pocket word: Yes.
PDF view: Yes.
Macro mediaFlash: 3rd party support


Q: How to verify OS image with or without PID?
A:
use : viewbin -t nk.bin

if it shows :
ROMHDR Extensions ------
PID[0] = 0x00000000
PID[1] = 0x00000000
PID[2] = 0x00000000
PID[3] = 0x00000000
PID[4] = 0x00000000
PID[5] = 0x00000000
PID[6] = 0x00000000
PID[7] = 0x00000000
PID[8] = 0x00000000
PID[9] = 0x00000000
Means this nk.bin without PID.

Q: WinCE 一how to auto start or execute an application on Power on ?
A:
add:
\FILES\ PLATFORM.BIB
FILES
sampleprogram.exe $(_FLATRELEASEDIR)\sampleprogram.exe NK S

Add in platform.dat
Directory("\Windows\StartUp"):-File("sampleprogram.exe","\Windows\sampleprogram.exe")
In Platform.reg add:
[HKEY_LOCAL_MACHINE\init]
"Launchxx"="sampleprogram.exe"
"Dependxx"=hex:1e,00
xx- will depend on BSP implementations.



Q: How to hide desktop icon
A:
Mask this registry.
;[HKEY_LOCAL_MACHINE\Explorer\Desktop]
;"{……..}"="My Computer"
;"{……..}"="Recycle Bin"


Q: How to hide start bar
A:
Set this registry.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\AutoHide]
@=" "
Name: (Default)
Type: REG_SZ (String Value)
Value: (0 = disabled, 1 = enabled)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\OnTop]
@=""
Name: (Default)
Type: REG_SZ (String Value)
Value: (0 = disabled, 1 = enabled)

Q: How to check that you have installed QFE.
A:
Check it with ceqfecheck.exe

Q:how do you set static IP.
A:
[HKEY_LOCAL_MACHINE\Comm\NE20001\Parms\Tcpip]
"EnableDHCP"=dword:0
"DefaultGateway"=""
"UseZeroBroadcast"=dword:0
"IpAddress"="195.168.33.222"
"Subnetmask"="255.255.0.0"


Q: how do you set IE start page.
A:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Start Page"="http://ujagga.blogspot.com/"

Q: How to use unalignment memory.
A:
#pragma pack(1)
typedef struct
{
CHAR syncbytes[7];
ULONG imgaddr;
ULONG imglen;
} IMGHDR, *PIMGHDR;
//unaligned
typedef UNALIGNED IMGHDR unlIMGHDR;
typedef UNALIGNED PIMGHDR unlPIMGHDR;


Q: How to bypass all warning.
A: Use compiler option - /W, /w(Set Warning Level.)
Warning Level Description
/w Turns off all warning messages. Use this option when you compile
programs that deliberately include questionable statements. The /w
option applies to the remainder of the command line, or applies until
the next occurrence of a /w option on the command line. /W and /W0
are the same as /w.
/W1 Default. Displays severe warning messages.
/W2 Displays an intermediate level of warning messages. Level 2 includes
warnings such as the following:
• Use of functions with no declared return type
• Failure to put return statements in functions with non-void
return types
• Data conversions that would cause loss of data or precision
/W3 Displays a less severe level of warning messages, including warnings
about function calls that precede their function prototypes in the source
code.
/W4 Displays the least severe level of warning messages, including
warnings about the use of non-ANSI features and extended keywords.
/WX Treats all warnings as errors. If there are any warning messages, the
compiler generates an error message, and continues compilation.


Q: Don’t show suspend button in start menu.
A:
Set the registry key in platform.reg.
; @CESYSGEN IF CE_MODULES_GWES
; This registry setting eables the Explorer's suspend menu button
; Emulator does not currently support suspend
[HKEY_LOCAL_MACHINE\Explorer]
"Suspend"=dword:0
; @CESYSGEN ENDIF CE_MODULES_GWES

Q: How to change bin to nb0.
A:
Cvrtbin.exe is command-line tool. Converts read-only memory (ROM) files from
binary (.bin) format to SRE or NBX (.nb0) format.


Q: How to simulate KeyDown and KeyUP.
A:
#include //keybd_event need to include file
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
unsigned char c;
for(c='A';c<='Z';c++)
{
keybd_event (c, 0, 0, 0); //Key down
//keybd event (virtual-key code, scan code, key type, extern)
keybd_event(c, 0,KEYEVENTF_KEYUP,0); //Key up
//keybd event (virtual-key code, scan code, key type, extern)
}
return 0;
}

Q: How to modify wallpaper.
A:
Replace the WindowsCE.bmp file.
[HKEY_CURRENT_USER\ControlPanel\Desktop]
"wallpaper"=\\Windows\\WindowsCE.bmp


Q: Auto enable keyboard "NumLock" key when OS boot up.
A:
Write an AP to execute when OS boot up.
keybd_event(VK_NUMLOCK, 0, 0, 0);
keybd_event(VK_NUMLOCK, 0, KEYEVENTF_KEYUP, 0);



Q: How to auto run the program when card plug in.
A:
1. Use the API to build up a execute file.
#include
#include
#include
void wmain(void)
{
CeRunAppAtEvent(_T("\\windows\\touch.exe"),
NOTIFICATION_EVENT_DEVICE_CHANGE);
}
Parameter one is launch APP and two is Card detect even.
2. Launch the execute file to notify the information to OS when launch the
notified APP after OS boot up.
3. OS will auto run the APP after card plug in.
ps. The way can’t launch APP in Card because the program will launch APP
when card plug in before mount.

WM5 Registry Tweaks -For performance.

  • Disable menu animations
    To disable menu animations (sliding in/out) and speed up performance of the UI a bit:
    HKLM\SYSTEM\GWE\Menu\AniType = 0 (DWORD decimal)
    To change it back to the default:
    HKLM\SYSTEM\GWE\Menu\AniType = 6 (DWORD decimal)
  • Disable window animations
    To disable window animations (minimizing/maximizing) and speed up performance of the UI a bit:
    HKLM\SYSTEM\GWE\Animate = 0 (DWORD decimal)
    And to switch them back on:
    HKLM\SYSTEM\GWE\Animate = 1 (DWORD decimal)
  • Increase font cache
    To increase the font cache, speeding up font rendering at the cost of a bit of memory:
    HKLM\SYSTEM\GDI\GLYPHCACHE\limit = 16384 (DWORD decimal)
    To change it back to the default:
    HKLM\SYSTEM\GDI\GLYPHCACHE\limit = 8192 (DWORD decimal)
  • Enable FileSystem cache
    To enable the FileSystem cache, speeding up overall performance at the risk of the cache not being written on a sudden reset:
    HKLM\System\StorageManager\FATFS\EnableCache = 1 (DWORD decimal)
    To disable again:
    HKLM\System\StorageManager\FATFS\EnableCache = 0 (DWORD decimal)
  • Increase FileSystem cache
    To increase the file system cache:
    HKLM\System\StorageManager\FATFS\CacheSize = 4096 (DWORD decimal)
    To return the file system cache to zero:
    HKLM\System\StorageManager\FATFS\CacheSize = 0 (DWORD decimal)
  • Increase FileSystem filter cache
    To enable the file system filter cache, speeding up overall performance with file mangement:
    HKLM\System\StorageManager\Filters\fsreplxfilt\ReplStoreCacheSize = 4096 (DWORD decimal)
    To return the file system filter cache to zero:
    HKLM\System\StorageManager\Filters\fsreplxfilt\ReplStoreCacheSize = 0 (DWORD decimal)
  • UI Modifications
  1. Change the thickness of scrollbars
    To change the thickness of the scrollbars at the right/bottom of documents larger than the screen, adjust...For the horizontal (bottom) scrollbar:
    HKLM\System\GWE\cyHScr = 9 (DWORD decimal)
    For the vertical (right) scrollbar:
    HKLM\System\GWE\cxVScr = 9 (DWORD decimal)
  2. Change the length of scrollbar arrow buttons
    To go with changing the thickness of the scrollbars, you may wish to change the length of the scrollbar arrow buttons...For the horizontal (bottom) scrollbar arrows:
    HKLM\System\GWE\cyVScr = 9 (DWORD decimal)
    For the vertical (right) scrollbar:
    HKLM\System\GWE\cxHScr = 9 (DWORD decimal)
  3. Enable ClearType in Landscape mode
    To enable ClearType in Landscape mode:
    HKLM\System\GDI\ClearTypeSettings\OffOnRotation = 0 (DWORD decimal)
    To disable:
    HKLM\System\GDI\ClearTypeSettings\OffOnRotation = 1 (DWORD decimal)
  4. Change the display of the clock in the taskbar
    The clock in the taskbar can be changed to show not only the time, but also the date, or just the date, or nothing at all.To show nothing:
    HKLM\Software\Microsoft\Shell\TBOpt = 0 (DWORD decimal)
    To show just the clock:
    HKLM\Software\Microsoft\Shell\TBOpt = 1 (DWORD decimal)
    To show just the date:
    HKLM\Software\Microsoft\Shell\TBOpt = 2 (DWORD decimal)
    To show both the date and the clock:
    HKLM\Software\Microsoft\Shell\TBOpt = 3 (DWORD decimal)
  5. Show Edge network indicator instead of GPRS
    If your network provider supports the Edge network (and your device does as well), you can use the following to show a little 'E' icon instead of 'G' icon when connected to an Edge network:
    HKLM\Drivers\BuiltIn\RIL\EnableDifferGprsEdgeIcon = 1 (DWORD decimal)
    To disable again:
    HKLM\Drivers\BuiltIn\RIL\EnableDifferGprsEdgeIcon = 0 (DWORD decimal)
  6. Add GPS settings icon
    If you have a GPS device, you can add a GPS settings icon to your Start > Settings menu using:
    HKLM\ControlPanel\GPS Settings\Group = 2 (DWORD decimal)HKLM\ControlPanel\GPS Settings\redirect <-- delete, or rename, this value
  7. Hide/Show Screen orientation icon
    If you wish to hide the Screen orientation icon, shown in the task bar on some devices, you can set:
    HKLM\Services\ScreenRotate\ShowIcon = 0 (DWORD decimal)HKLM\System\GDI\Rotation\HideOrientationUI = 1 (DWORD decimal)
    And to show it again:
    HKLM\Services\ScreenRotate\ShowIcon = 1 (DWORD decimal)HKLM\System\GDI\Rotation\HideOrientationUI = 0 (DWORD decimal)
    If this doesn't work, you can try:
    HKLM\Services\screenrotate = 0 (DWORD decimal)
    And to show it again:
    HKLM\Services\screenrotate = 1 (DWORD decimal)
  8. Hide/Show battery indicator in Task bar
    If you wish to hide the battery indicator in the task bar on some devices, you can set:
    HKLM\Services\Power\ShowIcon = 0 (DWORD decimal)
    And to show:
    HKLM\Services\Power\ShowIcon = 1 (DWORD decimal)
  9. Put custom text on bottom-right of Today screenf ollowing key:
    HKLM\Software\Microsoft\Shell\DeviceBeta\Today = "This is windows mobile world of Umesh Jagga" (REG_SZ string, no quotes)
  • File Locations
    Change the location of My Documents HKLM\Software\Microsoft\Windows CE Services\FileSyncPath = "\Storage Card\My Documents" (REG_SZ string, no quotes)
    To return to the original location:
    HKLM\Software\Microsoft\Windows CE Services\FileSyncPath = "\My Documents" (REG_SZ string, no quotes)
  • Change the location of email and attachments
    When reading and sending email in Pocket Outlook, emails and their attachments are saved in the device's internal storage by default. You can change this location to, for example, your Storage Card:
    HKCU\Software\Microsoft\MAPI\PropertyPath = "\Storage Card\Mail" (REG_SZ string, no quotes) HKCU\Software\Microsoft\MAPI\AttachPath = "\Storage Card\Mail\Attachments" (REG_SZ string, no quotes)
    To return to the original location:
    Just simply delete these Registry settings (since neither is included by default).
    Change the location of Temporary Internet Files
    When browsing the web, pages and images are saved in the 'Temporary Internet Files' location. You can change this location to, for example, your Storage Card:
    HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Cache = "\Storage Card\cacheie" (REG_SZ string, no quotes)
    To return to the original location:
    HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Cache = "\Windows\Profiles\guest\Temporary Internet Files" (REG_SZ string, no quotes)
    Change the location of Ringtone file storage
    WM5 will look for Ringtones in \Windows\ or \Windows\Rings by default. You can change this location to, for example, your Storage Card (example given is for ringtones placed on the Storage Card root folder)
    HKCU\ControlPanel\SoundCategories\Ring\Directory = "\Storage Card\" (REG_SZ string, no quotes)
    To return to the original location:
    HKCU\ControlPanel\SoundCategories\Ring\Directory = "\Windows\Rings\" (REG_SZ string, no quotes)
    Note the default location may be "\Windows\" or "\Windows\Rings\" depending on your Device provider.
    Make WM5 ask where to install a program (1)
    If you wish to be able to specify whether to install a program on WM5's Main storage, or your Storage Card, regardless of installer setting set:
    HKLM\Software\apps\Microsoft Application Installer\fAskDest = 1 (DWORD decimal)
    To disable again:
    HKLM\Software\apps\Microsoft Application Installer\fAskDest = 0 (DWORD decimal)
    Make WM5 ask where to install a program (2)
    An alternative method of making WM5 ask where to install a program is by adding the "/askdest" option to the Windows CE loader:
    HKCR\cabfile\Shell\open\command = 'wceload.exe "%1" /askdest' (REG_SZ string, no quotes)
    Make WM5 keep CAB files around after installing (1)
    If you wish to keep the original .CAB file around after installing the application, set:
    HKLM\Software\apps\Microsoft Application Installer\nDynamicDelete = 0 (DWORD decimal)
    Or to restore to the default:
    HKLM\Software\apps\Microsoft Application Installer\nDynamicDelete = 2 (DWORD decimal)
    Make WM5 keep CAB files around after installing (2)
    An alternative method of making WM5 keep the original .CAB file around after installing the application is by adding the "/nodelete" option to the Windows CE loader:
    HKCR\cabfile\Shell\open\command = 'wceload.exe "%1" /nodelete' (REG_SZ string, no quotes)
    Make WM5 prompt before overwriting an existing installation
    If you wish to make WM5 prompt you before overwriting an existing installation, set:
    HKLM\Software\apps\Microsoft Application Installer\fAskOptions = 1 (DWORD decimal)
    To disable again:
    HKLM\Software\apps\Microsoft Application Installer\fAskOptions = 0 (DWORD decimal)
  • Input (keyboard, soft keys, SIP)
    Change slide-out keyboard layout
    If you have a Device from one country, but would like to use the keyboard layout of another, you can change the keyboard's language setting to do so...
    For US layout (QWERTY):HKCU\ControlPanel\Keybd\Locale = 0409 (String)For German layout (QWERTZ):HKCU\ControlPanel\Keybd\Locale = 0407 (String)For French layout (AZERTY):HKCU\ControlPanel\Keybd\Locale = 040c (String)For Spanish layout (QWERTY):HKCU\ControlPanel\Keybd\Locale = 040a (String)