<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8862960353498382799</id><updated>2011-04-21T14:35:51.056-07:00</updated><title type='text'>Windows CE, Pocket PC ,Windows Mobile SmartPhone</title><subtitle type='html'>This blog will have helpful hints and needed information for Windows CE, Pocket PC ,Windows Mobile , Smartphone starting from CE3.0/4.0/5.0/6.0 and now 7.0 hope this will help us all.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ujagga.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ujagga.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>UmeshJagga</name><uri>http://www.blogger.com/profile/02269101590343387557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_m3ftC8grSmY/R_zLElK0WxI/AAAAAAAAACU/7JDRwIMTgsU/S220/DSC00089.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8862960353498382799.post-2148522638005550163</id><published>2008-04-03T06:56:00.000-07:00</published><updated>2008-04-03T06:57:19.784-07:00</updated><title type='text'>Making Powerful and  Power Saving Windows Mobile and Pocket PC applications</title><content type='html'>POWER CONSCIOUS APPS&lt;br /&gt;&lt;br /&gt;coming soon.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8862960353498382799-2148522638005550163?l=ujagga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ujagga.blogspot.com/feeds/2148522638005550163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8862960353498382799&amp;postID=2148522638005550163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/2148522638005550163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/2148522638005550163'/><link rel='alternate' type='text/html' href='http://ujagga.blogspot.com/2008/04/making-powerful-and-power-saving.html' title='Making Powerful and  Power Saving Windows Mobile and Pocket PC applications'/><author><name>UmeshJagga</name><uri>http://www.blogger.com/profile/02269101590343387557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_m3ftC8grSmY/R_zLElK0WxI/AAAAAAAAACU/7JDRwIMTgsU/S220/DSC00089.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8862960353498382799.post-8312561283000339083</id><published>2008-04-03T06:42:00.000-07:00</published><updated>2008-04-03T06:55:56.330-07:00</updated><title type='text'>Difference Between CE5.0 6.0 and 7.0</title><content type='html'>what are the major difference between Windows mobile 5.0 / 6.0 and 7.0 ??&lt;br /&gt;&lt;br /&gt;Windows Mobile 5.0 Windows mobile 6.0 Windows mobile 7.0&lt;br /&gt;&lt;br /&gt;coming soon.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8862960353498382799-8312561283000339083?l=ujagga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ujagga.blogspot.com/feeds/8312561283000339083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8862960353498382799&amp;postID=8312561283000339083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/8312561283000339083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/8312561283000339083'/><link rel='alternate' type='text/html' href='http://ujagga.blogspot.com/2008/04/difference-between-ce50-60-and-70.html' title='Difference Between CE5.0 6.0 and 7.0'/><author><name>UmeshJagga</name><uri>http://www.blogger.com/profile/02269101590343387557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_m3ftC8grSmY/R_zLElK0WxI/AAAAAAAAACU/7JDRwIMTgsU/S220/DSC00089.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8862960353498382799.post-5068865470433333881</id><published>2008-04-03T06:30:00.000-07:00</published><updated>2008-04-03T06:41:12.778-07:00</updated><title type='text'>Minimizing the Delay of the Battery Level Indicator</title><content type='html'>Minimizing the Delay of the Battery Level Indicator on a Windows Mobile Powered Device esp for smartphone.&lt;br /&gt;&lt;br /&gt;The BatteryEarly and BatteryLate values under the HKEY_LOCAL_MACHINE\Software\Microsoft\ssupdate registry key control polling of the battery. Place the code to set or clear the BatteryEarly and BatteryLate values code in the Platform.reg file. Turn off battery polling by clearing both the BatteryEarly and BatteryLate values.&lt;br /&gt;The following code example shows how to turn off battery polling.&lt;br /&gt;Copy Code&lt;br /&gt;[HKEY_LOCAL_MACHINE\Software\Microsoft\ssupdate]&lt;br /&gt;"BatteryEarly"=dword:0&lt;br /&gt;"BatteryLate"=dword:0&lt;br /&gt;After specifying the BatteryEarly and BatteryLate values, you must force the shell to update.&lt;br /&gt;&lt;br /&gt;hevent = CreateEvent(NULL, FALSE, FALSE, TEXT("SSUpdatePower"));&lt;br /&gt;SetEvent(hevent);&lt;br /&gt;CloseHandle(hevent);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;or you can use BatteryPDDGetStatus  in the battery driver this can be called once you call GetSystemPowerStatusEx2&lt;br /&gt;for example:&lt;br /&gt;GetSystemPowerStatusEx2 ( &amp;amp;sysPowerStatus, sizeof( sysPowerStatus ), TRUE );//this will call BatteryPDDGetStatus&lt;br /&gt;&lt;br /&gt;handle the battery indication stuff in the BatteryPDDGetStatus and after that you must refresh MDD power level cache this you can do by calling:&lt;br /&gt;PowerPolicyNotify ( PPN_POWERCHANGE, 0 );//update cache so that icon is displayed without delay&lt;br /&gt;&lt;br /&gt;To be Continued ........will write more in detail later&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8862960353498382799-5068865470433333881?l=ujagga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ujagga.blogspot.com/feeds/5068865470433333881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8862960353498382799&amp;postID=5068865470433333881' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/5068865470433333881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/5068865470433333881'/><link rel='alternate' type='text/html' href='http://ujagga.blogspot.com/2008/04/minimizing-delay-of-battery-level.html' title='Minimizing the Delay of the Battery Level Indicator'/><author><name>UmeshJagga</name><uri>http://www.blogger.com/profile/02269101590343387557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_m3ftC8grSmY/R_zLElK0WxI/AAAAAAAAACU/7JDRwIMTgsU/S220/DSC00089.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8862960353498382799.post-3947112063631413548</id><published>2008-01-08T07:16:00.001-08:00</published><updated>2008-04-03T06:20:12.465-07:00</updated><title type='text'>Windows CE 5.0 device driver development-Part 2</title><content type='html'>&lt;strong&gt;How ca we build a driver for Device manufacturer specific functionalities and use it from an apps without using device IOCTLs:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. lets make a folder DeviceFunc&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. make a new file DeviceFunc.cpp in the above folder&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;lets edit this as this will be our main device driver source file.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;#include &lt;windows.h&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#ifdef __cplusplusextern "C"&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void GreenLEDControl(BOOL OnOff )&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;RETAILMSG (1, (TEXT(" Green LED is currently=%d\r\n"), OnOff ));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void&lt;br /&gt;&lt;br /&gt;(BOOL OnOff )&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;RETAILMSG (1, (TEXT(" RED LED is currently=%d\r\n"), OnOff ));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void BacklightControl(BOOL OnOff )&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;RETAILMSG (1, (TEXT(" Backlight is currently =%d\r\n"), OnOff ));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void WirelessControl(BOOL OnOff )&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;RETAILMSG (1, (TEXT(" Wireless is currently=%d\r\n"), OnOff ));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void DisplayControl(BOOL OnOff )&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;RETAILMSG (1, (TEXT(" Display is currently=%d\r\n"), OnOff ));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#ifdef __cplusplus&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;BOOL WINAPI DllEntry( HANDLE hinstDLL, DWORD Op, LPVOID lpvReserved )&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;return TRUE;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now we have the code lets make a &lt;strong&gt;def&lt;/strong&gt; file which will export these functions:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;LIBRARY DeviceFunc&lt;br /&gt;EXPORTS&lt;br /&gt;&lt;br /&gt;GreenLEDControl&lt;br /&gt;&lt;br /&gt;RedLEDControl&lt;br /&gt;&lt;br /&gt;BacklightControl&lt;br /&gt;&lt;br /&gt;WirelessControl&lt;br /&gt;&lt;br /&gt;DisplayControl&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;and now lets make a sources file:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TARGETNAME=DeviceFunc&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RELEASETYPE=PLATFORM&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TARGETTYPE=DYNLINK&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TARGETLIBS= \$(_COMMONSDKROOT\lib\$(_CPUINDPATH\coredll.lib \&lt;br /&gt;&lt;br /&gt;$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DEFFILE=DeviceFunc.def&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DLLENTRY=DllEntry&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SOURCES= DeviceFunc.cpp&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;now we have made copy a makefile from a standard wince driver directory and compile the folder.&lt;br /&gt;&lt;br /&gt;you will get a DeviceFunc.dll file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now to the next step, how can we access these exported functions on our device by other drivers\applications:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Lets first take an app implementation:&lt;br /&gt;&lt;br /&gt;typedef void (*PFN_BacklightControl)(BOOL fOn);&lt;br /&gt;&lt;br /&gt;HINSTANCE gDeviceFuncDll = NULL;&lt;br /&gt;&lt;br /&gt;gDeviceFuncDll =LoadLibrary(TEXT("DeviceFunc.dll"));&lt;br /&gt;&lt;br /&gt;pfnBrightnessUp = (PFN_BacklightControl)GetProcAddress(gDeviceFuncDll , TEXT("BacklightControl"));&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8862960353498382799-3947112063631413548?l=ujagga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ujagga.blogspot.com/feeds/3947112063631413548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8862960353498382799&amp;postID=3947112063631413548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/3947112063631413548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/3947112063631413548'/><link rel='alternate' type='text/html' href='http://ujagga.blogspot.com/2008/01/windows-ce-50-device-driver-development_08.html' title='Windows CE 5.0 device driver development-Part 2'/><author><name>UmeshJagga</name><uri>http://www.blogger.com/profile/02269101590343387557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_m3ftC8grSmY/R_zLElK0WxI/AAAAAAAAACU/7JDRwIMTgsU/S220/DSC00089.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8862960353498382799.post-7217898379745335703</id><published>2008-01-08T03:45:00.000-08:00</published><updated>2008-01-18T06:15:26.089-08:00</updated><title type='text'>Windows CE 5.0 device driver development-Part 1-Basics</title><content type='html'>&lt;strong&gt;A driver is simply a DLL&lt;/strong&gt; (dynamic link library), DLL’s are loaded into a parent process address space, the parent process can then call any of the interfaces exposed from the DLL – the driver is typically loaded by it’s parent process through a call to LoadLibrary( ); or LoadDriver( ); - LoadDriver not only loads the DLL into the parent process address space but will also make sure the DLL isn’t paged out.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;On Windows CE, stream drivers are opened just like files, and are opened using a unique three letter prefix (e.g. BKL,COM,TST,PWR).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The core stream interface entry points are:&lt;br /&gt;&lt;br /&gt;XXX_Open (Device Manager)&lt;br /&gt;&lt;br /&gt;XXX_Close (Device Manager)&lt;br /&gt;&lt;br /&gt;XXX_Read (Device Manager)&lt;br /&gt;&lt;br /&gt;XXX_Write (Device Manager)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Choose a unique three letter identifier for your driver. lets choose it as TST.&lt;br /&gt;&lt;br /&gt;2. name the driver - here we will name it as TestDriver&lt;br /&gt;&lt;br /&gt;3. Next, you will need to implement the required entry points.&lt;br /&gt;&lt;br /&gt;lets see required functions for a complete stream driver:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//TestDriver.c by &lt;a href="http://ujagga.bravehost.com/"&gt;Umesh Jagga&lt;/a&gt;&lt;br /&gt;#include &lt;windows.h&gt;&lt;windows.h&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//This function initializes a device. It is called by Device Manager.&lt;br /&gt;//This function is required by drivers loaded by ActivateDeviceEx, ActivateDevice, or&lt;br /&gt;&lt;br /&gt;//RegisterDevice.&lt;br /&gt;DWORD &lt;strong&gt;TST_Init&lt;/strong&gt;(LPCTSTR pContext, LPCVOID lpvBusContext);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//This function de-initializes a device. It is called by Device Manager&lt;br /&gt;BOOL &lt;strong&gt;TST_Deinit&lt;/strong&gt;( DWORD hDeviceContext );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//This function opens a device for reading, writing, or both. An application indirectly invokes&lt;br /&gt;&lt;br /&gt;//this function when it calls the CreateFile function to open special device file names.&lt;br /&gt;DWORD &lt;strong&gt;TST_Open&lt;/strong&gt;( DWORD hDeviceContext, DWORD AccessCode, DWORD ShareMode );&lt;br /&gt;&lt;br /&gt;//This function closes a device context created by the hOpenContext parameter.&lt;br /&gt;&lt;br /&gt;//An application calls the CloseHandle function to stop using a stream interface driver. The hFile&lt;br /&gt;&lt;br /&gt;//parameter specifies the handle associated with the device context. In response to&lt;br /&gt;&lt;br /&gt;//CloseHandle, the operating system invokes XXX_Close.&lt;br /&gt;&lt;br /&gt;BOOL &lt;strong&gt;TST_Close&lt;/strong&gt;( DWORD hOpenContext );&lt;br /&gt;&lt;br /&gt;//This function sends a command to a device.&lt;br /&gt;&lt;br /&gt;//An application uses the DeviceIoControl function to specify an operation to perform. The&lt;br /&gt;&lt;br /&gt;//operating system, in turn, invokes the XXX_IOControl function&lt;br /&gt;&lt;br /&gt;BOOL &lt;strong&gt;TST_IOControl&lt;/strong&gt;( DWORD hOpenContext, DWORD dwCode, PBYTE pBufIn, DWORD dwLenIn, PBYTE pBufOut, DWORD dwLenOut, PDWORD pdwActualOut );void USB_PowerUp( DWORD hDeviceContext );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void &lt;strong&gt;TST_PowerDown&lt;/strong&gt;( DWORD hDeviceContext );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//This function reads data from the device identified by the open context&lt;br /&gt;&lt;br /&gt;//an application calls the ReadFile function to read from the device, the operating system&lt;br /&gt;&lt;br /&gt;//invokes this function.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DWORD &lt;strong&gt;TST_Read&lt;/strong&gt;( DWORD hOpenContext, LPVOID pBuffer, DWORD Count );&lt;br /&gt;&lt;br /&gt;//This function writes data to the device.&lt;br /&gt;&lt;br /&gt;//After an application uses the WriteFile function to write to the device, the operating system,&lt;br /&gt;&lt;br /&gt;//invokes this function.&lt;br /&gt;&lt;br /&gt;DWORD &lt;strong&gt;TST_Write(&lt;/strong&gt; DWORD hOpenContext, LPCVOID pBuffer, DWORD Count );&lt;br /&gt;&lt;br /&gt;//This function moves the data pointer in the device.&lt;br /&gt;&lt;br /&gt;//After an application calls the SetFilePointer function to move the data pointer in the device,&lt;br /&gt;&lt;br /&gt;//the operating system invokes this function.&lt;br /&gt;//If your device is capable of opening more than once, this function modifies only the data&lt;br /&gt;&lt;br /&gt;//pointer for the instance specified by hOpenContext.&lt;br /&gt;DWORD &lt;strong&gt;TST_Seek&lt;/strong&gt;( DWORD hOpenContext, long Amount, WORD Type );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//If the function is used, it is called by the system when processes and threads are initialized&lt;br /&gt;&lt;br /&gt;//and terminated, or on calls to the LoadLibrary and FreeLibrary functions.&lt;br /&gt;&lt;br /&gt;//Direct entry point for a DLL.&lt;br /&gt;&lt;br /&gt;//If you use the C Runtime in your application, it is responsible for performing any initialization&lt;br /&gt;&lt;br /&gt;//of the C Runtime at process attach, and for deinitializing the C Runtime at process detach&lt;br /&gt;&lt;br /&gt;// ----------------------------------------------------&lt;br /&gt;BOOL APIENTRY &lt;strong&gt;DllMain&lt;/strong&gt;( HANDLE hModule, DWORD ul_reason_for_call, LPVOID pReserved )&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;switch(ul_reason_for_call)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;case DLL_PROCESS_ATTACH:&lt;br /&gt;&lt;br /&gt;OutputDebugString(L"TestDriver - DLL_PROCESS_ATTACH\n");&lt;br /&gt;&lt;br /&gt;break;&lt;br /&gt;&lt;br /&gt;case DLL_PROCESS_DETACH:&lt;br /&gt;&lt;br /&gt;OutputDebugString(L"TestDriver - DLL_PROCESS_DETACH\n");&lt;br /&gt;&lt;br /&gt;break;&lt;br /&gt;&lt;br /&gt;case DLL_THREAD_ATTACH:&lt;br /&gt;&lt;br /&gt;OutputDebugString(L"TestDriver - DLL_THREAD_ATTACH\n");&lt;br /&gt;&lt;br /&gt;break;&lt;br /&gt;&lt;br /&gt;case DLL_THREAD_DETACH:&lt;br /&gt;&lt;br /&gt;OutputDebugString(L"TestDriver - DLL_THREAD_DETACH\n");&lt;br /&gt;&lt;br /&gt;break;&lt;br /&gt;&lt;br /&gt;default:&lt;br /&gt;&lt;br /&gt;break;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return TRUE;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;p&gt;// Driver Init...&lt;/p&gt;&lt;p&gt;DWORD &lt;strong&gt;TST_Init&lt;/strong&gt;( LPCTSTR pContext, LPCVOID lpvBusContext)&lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - TST_Init - Context: "); &lt;/p&gt;&lt;p&gt;OutputDebugString(pContext); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - ~ TST_Init\n");&lt;/p&gt;&lt;p&gt;return 0x1234;&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p&gt;BOOL &lt;strong&gt;TST_Deinit&lt;/strong&gt;( DWORD hDeviceContext )&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - TST_Deinit\n");&lt;br /&gt;OutputDebugString(L"TestDriver - ~ TST_Deinit\n");&lt;/p&gt;&lt;p&gt;return TRUE;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;}&lt;br /&gt;// Driver Open&lt;/p&gt;&lt;p&gt;DWORD &lt;strong&gt;TST_Open&lt;/strong&gt;( DWORD hDeviceContext, DWORD AccessCode, DWORD ShareMode )&lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - TST_Open\n"); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"hDeviceContext - "); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - ~ TST_Open\n");&lt;/p&gt;&lt;p&gt;return 0x5678;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;BOOL &lt;strong&gt;TST_Close&lt;/strong&gt;( DWORD hOpenContext )&lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - TST_Close\n"); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"hOpenContext - "); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"\n"); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - ~ TST_Close\n");&lt;/p&gt;&lt;p&gt;return TRUE;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;BOOL &lt;strong&gt;TST_IOControl&lt;/strong&gt;( DWORD hOpenContext, DWORD dwCode, PBYTE pBufIn, DWORD dwLenIn, PBYTE pBufOut, DWORD dwLenOut, PDWORD pdwActualOut )&lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - TST_IOControl\n");&lt;/p&gt;&lt;p&gt;OutputDebugString(L"hOpenContext - ");&lt;/p&gt;&lt;p&gt;OutputDebugString(L"\n"); &lt;/p&gt;&lt;p&gt;switch (dwCode) { &lt;/p&gt;&lt;p&gt;case IOCTL_DRIVER_TST: &lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;OutputDebugString(L"DRIVER TST IOCTL...\n"); &lt;/p&gt;&lt;p&gt;} &lt;/p&gt;&lt;p&gt;break; &lt;/p&gt;&lt;p&gt;default: &lt;/p&gt;&lt;p&gt;OutputDebugString(L"Unknown IOCTL\n");&lt;/p&gt;&lt;p&gt;break;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - ~ TST_IOControl\n");&lt;/p&gt;&lt;p&gt;return TRUE;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;void &lt;strong&gt;TST_PowerUp&lt;/strong&gt;( DWORD hDeviceContext )&lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - TST_PowerUp\n"); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"hDeviceContext - ");&lt;/p&gt;&lt;p&gt;OutputDebugString(L"\n");&lt;br /&gt;OutputDebugString(L"TestDriver - ~ TST_PowerUp\n");&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;void &lt;strong&gt;TST_PowerDown&lt;/strong&gt;( DWORD hDeviceContext )&lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - TST_PowerDown\n");&lt;/p&gt;&lt;p&gt;OutputDebugString(L"hDeviceContext - ");&lt;/p&gt;&lt;p&gt;OutputDebugString(L"\n");&lt;br /&gt;OutputDebugString(L"TestDriver - ~ TST_PowerDown\n");&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;DWORD &lt;strong&gt;TST_Read&lt;/strong&gt;( DWORD hOpenContext, LPVOID pBuffer, DWORD Count )&lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - TST_Read\n"); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"hOpenContext - "); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"\n"); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - ~ TST_Read\n");&lt;br /&gt;return 1;&lt;/p&gt;&lt;p&gt;} &lt;/p&gt;&lt;p&gt;&lt;br /&gt;DWORD &lt;strong&gt;TST_Write&lt;/strong&gt;( DWORD hOpenContext, LPCVOID pBuffer, DWORD Count )&lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - TST_Write\n"); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"hOpenContext - "); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"\n");&lt;br /&gt;&lt;br /&gt;OutputDebugString(L"TestDriver - ~ TST_Write\n");&lt;br /&gt;return 1;&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;DWORD &lt;strong&gt;TST_Seek&lt;/strong&gt;( DWORD hOpenContext, long Amount, WORD Type )&lt;/p&gt;&lt;p&gt;{ &lt;/p&gt;&lt;p&gt;OutputDebugString(L"TestDriver - TST_Seek\n"); &lt;/p&gt;&lt;p&gt;OutputDebugString(L"hOpenContext - ");&lt;br /&gt;OutputDebugString(L"TestDriver - ~ TST_Seek\n");&lt;br /&gt;return 0;&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p&gt;//end of TestDriver.c by umesh Jagga&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;now lets write a testdriver.def file. This is the definition file that is passed&lt;br /&gt;to the linker. This file contains the exported function names.&lt;/p&gt;&lt;br /&gt;Note: the DLL filename and def filename should be same.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;LIBRARY TestDriver&lt;br /&gt;EXPORTS &lt;/p&gt;&lt;p&gt;TST_Init &lt;/p&gt;&lt;p&gt;TST_Deinit &lt;/p&gt;&lt;p&gt;TST_Open &lt;/p&gt;&lt;p&gt;TST_Close &lt;/p&gt;&lt;p&gt;TST_IOControl &lt;/p&gt;&lt;p&gt;TST_PowerUp &lt;/p&gt;&lt;p&gt;TST_PowerDown &lt;/p&gt;&lt;p&gt;TST_Read &lt;/p&gt;&lt;p&gt;TST_Write &lt;/p&gt;&lt;p&gt;TST_Seek&lt;/p&gt;&lt;p&gt;now lets write a sources file:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;TARGETNAME=TestDriver&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;TARGETTYPE=DYNLINK&lt;/p&gt;&lt;p&gt;TARGETLIBS=$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib&lt;/p&gt;&lt;p&gt;SOURCES=TestDriver.c&lt;/p&gt;&lt;br /&gt;&lt;p&gt;now we need to put the registry and bib file entries.&lt;/p&gt;you will need to create the registry entries for this driver so that the&lt;br /&gt;driver can be loaded by Device.exe.&lt;br /&gt;&lt;p&gt;lets put this in platform.bib and platform.reg files.&lt;/p&gt;&lt;p&gt;addin platform.reg file:&lt;/p&gt;&lt;p&gt;[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\TestDriver] &lt;/p&gt;&lt;p&gt;"Dll" = "TestDriver.Dll"&lt;/p&gt;&lt;p&gt;"Prefix" = "TST" &lt;/p&gt;&lt;p&gt;"Order" = dword:0 &lt;/p&gt;&lt;p&gt;"FriendlyName" = "Umesh TestDriver"&lt;/p&gt;&lt;p&gt;"Ioctl" = dword:0&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;add the below in platform.bib file&lt;br /&gt;TestDriver.dll $(_FLATRELEASEDIR)\TestDriver.dll NK SH&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Just for reference:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Device Driver Loading Process:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Kernel---loads---&gt; Device.exe (I/O Resource Manager)-------Loads------&gt;&lt;br /&gt;--------&gt;REGENUM.DLL(registryenumerator,its reentrant)&lt;br /&gt;&lt;br /&gt;-----------------loads-----------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;REGENUM.DLL(ISA) PCIBUS.DLL&lt;br /&gt;&lt;br /&gt;Now we know the concept of device driver lets proceed to step2...&lt;br /&gt;&lt;br /&gt;making a custom device driver for your device for customized functionality........&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8862960353498382799-7217898379745335703?l=ujagga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ujagga.blogspot.com/feeds/7217898379745335703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8862960353498382799&amp;postID=7217898379745335703' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/7217898379745335703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/7217898379745335703'/><link rel='alternate' type='text/html' href='http://ujagga.blogspot.com/2008/01/windows-ce-50-device-driver-development.html' title='Windows CE 5.0 device driver development-Part 1-Basics'/><author><name>UmeshJagga</name><uri>http://www.blogger.com/profile/02269101590343387557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_m3ftC8grSmY/R_zLElK0WxI/AAAAAAAAACU/7JDRwIMTgsU/S220/DSC00089.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8862960353498382799.post-6630331599245324668</id><published>2008-01-08T02:21:00.000-08:00</published><updated>2008-01-08T02:26:40.419-08:00</updated><title type='text'>Memory allocation check???</title><content type='html'>Q. How can I determine how much memory my application can allocate without severely impacting other applications?&lt;br /&gt;&lt;br /&gt;A.  you could use &lt;strong&gt;GlobalMemoryStatus&lt;/strong&gt; for this.&lt;br /&gt;&lt;br /&gt;usage:&lt;br /&gt;MEMORYSTATUS gMemStatus;&lt;br /&gt;GlobalMemoryStatus(&amp;amp;gMemStatus);&lt;br /&gt;&lt;br /&gt;if (gMemStatus.dwMemoryLoad &lt; somevalue)&lt;br /&gt;{&lt;br /&gt; //do....   LocalAlloc&lt;br /&gt; } else&lt;br /&gt;{&lt;br /&gt;//do not allocate  anything u want.,........like free memory close other apps and try again...&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8862960353498382799-6630331599245324668?l=ujagga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ujagga.blogspot.com/feeds/6630331599245324668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8862960353498382799&amp;postID=6630331599245324668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/6630331599245324668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/6630331599245324668'/><link rel='alternate' type='text/html' href='http://ujagga.blogspot.com/2008/01/memory-allocation-check.html' title='Memory allocation check???'/><author><name>UmeshJagga</name><uri>http://www.blogger.com/profile/02269101590343387557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_m3ftC8grSmY/R_zLElK0WxI/AAAAAAAAACU/7JDRwIMTgsU/S220/DSC00089.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8862960353498382799.post-2265485785178044799</id><published>2008-01-07T07:13:00.000-08:00</published><updated>2008-01-07T07:31:02.067-08:00</updated><title type='text'>ShellExecuteEx</title><content type='html'>Its better to use shellexecuteEx to launch apps.&lt;br /&gt;The device can have lot of flexibility from where we launch the apps from.&lt;br /&gt;&lt;br /&gt;the example given below shows how we could read from the  registry and run the apps programmatically on windows mobile devices.&lt;br /&gt;&lt;br /&gt;            SHELLEXECUTEINFO sei;&lt;br /&gt;            HKEY hKey;&lt;br /&gt;            TCHAR szKeyName[250], szApplName[250], szApplDir[250], szApplParam[250];&lt;br /&gt;           &lt;br /&gt;            RegOpenKeyEx(HKEY_LOCAL_MACHINE, &lt;app&gt;, 0, 0, &amp;amp;hKey);&lt;br /&gt;                                   &lt;br /&gt;dwcbData=sizeof(szApplName)*sizeof(TCHAR);&lt;br /&gt;            rc = RegQueryValueEx (hKey, szKeyName, 0, &amp;amp;dwType, (LPBYTE)szApplName, &amp;amp;dwcbData);&lt;br /&gt;&lt;br /&gt;if (rc != ERROR_SUCCESS)&lt;br /&gt;{&lt;br /&gt;//do something&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;             dwcbData=sizeof(szApplParam)*sizeof(TCHAR);&lt;br /&gt;          rc = RegQueryValueEx (hKey, szKeyName, 0, &amp;amp;dwType, (LPBYTE)szApplParam, &amp;amp;dwcbData);&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;           dwcbData=sizeof(szApplDir)*sizeof(TCHAR);&lt;br /&gt;           rc = RegQueryValueEx (hKey, szKeyName, 0, &amp;amp;dwType, (LPBYTE)szApplDir,        &amp;amp;dwcbData);&lt;br /&gt;  &lt;br /&gt;            RegCloseKey (hKey);&lt;br /&gt;if(&lt;notdefineinregistry&gt;)&lt;br /&gt;{&lt;br /&gt;                                   wcscpy(szApplName, _T("&lt;appsname&gt;"));&lt;br /&gt;                                    wcscpy(szApplParam, _T(""));&lt;br /&gt;                                    wcscpy(szApplDir, _T(""));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;            memset(&amp;amp;sei, 0, sizeof(sei));&lt;br /&gt;            sei.cbSize = sizeof(sei);&lt;br /&gt;            sei.hwnd = NULL;&lt;br /&gt;            sei.lpFile = szApplName;&lt;br /&gt;            sei.lpParameters = szApplParam;&lt;br /&gt;            sei.lpDirectory = szApplDir;&lt;br /&gt;            sei.nShow = SW_SHOWNORMAL;&lt;br /&gt; &lt;br /&gt;             ShellExecuteEx(&amp;amp;sei) ;    //parse application szDirNameText to szDirName&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8862960353498382799-2265485785178044799?l=ujagga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ujagga.blogspot.com/feeds/2265485785178044799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8862960353498382799&amp;postID=2265485785178044799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/2265485785178044799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/2265485785178044799'/><link rel='alternate' type='text/html' href='http://ujagga.blogspot.com/2008/01/shellexecuteex.html' title='ShellExecuteEx'/><author><name>UmeshJagga</name><uri>http://www.blogger.com/profile/02269101590343387557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_m3ftC8grSmY/R_zLElK0WxI/AAAAAAAAACU/7JDRwIMTgsU/S220/DSC00089.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8862960353498382799.post-3514673720997368592</id><published>2007-12-07T06:50:00.000-08:00</published><updated>2007-12-07T07:12:04.527-08:00</updated><title type='text'>WINDOWS CE - FAQ</title><content type='html'>&lt;p&gt;&lt;br /&gt;Q: WinCE3.0 support IDE H.D Driver or not?&lt;/p&gt;&lt;p&gt;A: Yes, check atadisk.dll&lt;/p&gt;Q: Does CE support java ,Macro media flash and PDF view ?&lt;br /&gt;A:&lt;br /&gt;Java: only java script,it does not include java virtual machine (3rd party support)&lt;br /&gt;Pocket word: Yes.&lt;br /&gt;PDF view: Yes.&lt;br /&gt;Macro mediaFlash: 3rd party support&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q: How to verify OS image with or without PID?&lt;br /&gt;A:&lt;br /&gt;use : viewbin -t nk.bin&lt;br /&gt;&lt;br /&gt;if it shows :&lt;br /&gt;ROMHDR Extensions ------&lt;br /&gt;PID[0] = 0x00000000&lt;br /&gt;PID[1] = 0x00000000&lt;br /&gt;PID[2] = 0x00000000&lt;br /&gt;PID[3] = 0x00000000&lt;br /&gt;PID[4] = 0x00000000&lt;br /&gt;PID[5] = 0x00000000&lt;br /&gt;PID[6] = 0x00000000&lt;br /&gt;PID[7] = 0x00000000&lt;br /&gt;PID[8] = 0x00000000&lt;br /&gt;PID[9] = 0x00000000&lt;br /&gt;Means this nk.bin without PID.&lt;br /&gt;&lt;br /&gt;Q: WinCE 一how to auto start or execute an application on Power on ?&lt;br /&gt;A:&lt;br /&gt;add:&lt;br /&gt;\FILES\ PLATFORM.BIB&lt;br /&gt;FILES&lt;br /&gt;sampleprogram.exe $(_FLATRELEASEDIR)\sampleprogram.exe NK S&lt;br /&gt;&lt;br /&gt;Add in  platform.dat&lt;br /&gt;Directory("\Windows\StartUp"):-File("sampleprogram.exe","\Windows\sampleprogram.exe")&lt;br /&gt;In Platform.reg add:&lt;br /&gt;[HKEY_LOCAL_MACHINE\init]&lt;br /&gt;"Launchxx"="sampleprogram.exe"&lt;br /&gt;"Dependxx"=hex:1e,00&lt;br /&gt;xx- will depend on BSP implementations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q: How to hide desktop icon&lt;br /&gt;A:&lt;br /&gt;Mask this registry.&lt;br /&gt;;[HKEY_LOCAL_MACHINE\Explorer\Desktop]&lt;br /&gt;;"{……..}"="My Computer"&lt;br /&gt;;"{……..}"="Recycle Bin"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q: How to hide start bar&lt;br /&gt;A:&lt;br /&gt;Set this registry.&lt;br /&gt;[HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\AutoHide]&lt;br /&gt;@=" "&lt;br /&gt;Name: (Default)&lt;br /&gt;Type: REG_SZ (String Value)&lt;br /&gt;Value: (0 = disabled, 1 = enabled)&lt;br /&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\OnTop]&lt;br /&gt;@=""&lt;br /&gt;Name: (Default)&lt;br /&gt;Type: REG_SZ (String Value)&lt;br /&gt;Value: (0 = disabled, 1 = enabled)&lt;br /&gt;&lt;br /&gt;Q: How to check that you have installed QFE.&lt;br /&gt;A:&lt;br /&gt;Check it with  ceqfecheck.exe&lt;br /&gt;&lt;br /&gt;Q:how do you set static IP.&lt;br /&gt;A:&lt;br /&gt;[HKEY_LOCAL_MACHINE\Comm\NE20001\Parms\Tcpip]&lt;br /&gt;"EnableDHCP"=dword:0&lt;br /&gt;"DefaultGateway"=""&lt;br /&gt;"UseZeroBroadcast"=dword:0&lt;br /&gt;"IpAddress"="195.168.33.222"&lt;br /&gt;"Subnetmask"="255.255.0.0"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q: how do you set IE start page.&lt;br /&gt;A:&lt;br /&gt;[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]&lt;br /&gt;"Start Page"="&lt;a href="http://ujagga.blogspot.com/"&gt;http://ujagga.blogspot.com/&lt;/a&gt;"&lt;br /&gt;&lt;br /&gt;Q: How to use unalignment memory.&lt;br /&gt;A:&lt;br /&gt;#pragma pack(1)&lt;br /&gt;typedef struct&lt;br /&gt;{&lt;br /&gt;CHAR syncbytes[7];&lt;br /&gt;ULONG imgaddr;&lt;br /&gt;ULONG imglen;&lt;br /&gt;} IMGHDR, *PIMGHDR;&lt;br /&gt;//unaligned&lt;br /&gt;typedef UNALIGNED IMGHDR unlIMGHDR;&lt;br /&gt;typedef UNALIGNED PIMGHDR unlPIMGHDR;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q: How to bypass all warning.&lt;br /&gt;A: Use compiler option - /W, /w(Set Warning Level.)&lt;br /&gt;Warning Level Description&lt;br /&gt;/w Turns off all warning messages. Use this option when you compile&lt;br /&gt;programs that deliberately include questionable statements. The /w&lt;br /&gt;option applies to the remainder of the command line, or applies until&lt;br /&gt;the next occurrence of a /w option on the command line. /W and /W0&lt;br /&gt;are the same as /w.&lt;br /&gt;/W1 Default. Displays severe warning messages.&lt;br /&gt;/W2 Displays an intermediate level of warning messages. Level 2 includes&lt;br /&gt;warnings such as the following:&lt;br /&gt;• Use of functions with no declared return type&lt;br /&gt;• Failure to put return statements in functions with non-void&lt;br /&gt;return types&lt;br /&gt;• Data conversions that would cause loss of data or precision&lt;br /&gt;/W3 Displays a less severe level of warning messages, including warnings&lt;br /&gt;about function calls that precede their function prototypes in the source&lt;br /&gt;code.&lt;br /&gt;/W4 Displays the least severe level of warning messages, including&lt;br /&gt;warnings about the use of non-ANSI features and extended keywords.&lt;br /&gt;/WX Treats all warnings as errors. If there are any warning messages, the&lt;br /&gt;compiler generates an error message, and continues compilation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q: Don’t show suspend button in start menu.&lt;br /&gt;A:&lt;br /&gt;Set the registry key in platform.reg.&lt;br /&gt;; @CESYSGEN IF CE_MODULES_GWES&lt;br /&gt;; This registry setting eables the Explorer's suspend menu button&lt;br /&gt;; Emulator does not currently support suspend&lt;br /&gt;[HKEY_LOCAL_MACHINE\Explorer]&lt;br /&gt;"Suspend"=dword:0&lt;br /&gt;; @CESYSGEN ENDIF CE_MODULES_GWES&lt;br /&gt;&lt;br /&gt;Q: How to change bin to nb0.&lt;br /&gt;A:&lt;br /&gt;Cvrtbin.exe is command-line tool. Converts read-only memory (ROM) files from&lt;br /&gt;binary (.bin) format to SRE or NBX (.nb0) format.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q: How to simulate KeyDown and KeyUP.&lt;br /&gt;A:&lt;br /&gt;#include &lt;winuser.h&gt; //keybd_event need to include file&lt;br /&gt;int WINAPI WinMain(HINSTANCE hInstance,&lt;br /&gt;HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)&lt;br /&gt;{&lt;br /&gt;unsigned char c;&lt;br /&gt;for(c='A';c&lt;='Z';c++)&lt;br /&gt;{&lt;br /&gt;keybd_event (c, 0, 0, 0); //Key down&lt;br /&gt;//keybd event (virtual-key code, scan code, key type, extern)&lt;br /&gt;keybd_event(c, 0,KEYEVENTF_KEYUP,0); //Key up&lt;br /&gt;//keybd event (virtual-key code, scan code, key type, extern)&lt;br /&gt;}&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Q: How to modify wallpaper.&lt;br /&gt;A:&lt;br /&gt;Replace the WindowsCE.bmp file.&lt;br /&gt;[HKEY_CURRENT_USER\ControlPanel\Desktop]&lt;br /&gt;"wallpaper"=&lt;a href="file://Windows//WindowsCE.bmp"&gt;\\Windows\\WindowsCE.bmp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q: Auto enable keyboard "NumLock" key when OS boot up.&lt;br /&gt;A:&lt;br /&gt;Write an AP to execute when OS boot up.&lt;br /&gt;keybd_event(VK_NUMLOCK, 0, 0, 0);&lt;br /&gt;keybd_event(VK_NUMLOCK, 0, KEYEVENTF_KEYUP, 0);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q: How to auto run the program when card plug in.&lt;br /&gt;A:&lt;br /&gt;1. Use the API to build up a execute file.&lt;br /&gt;#include &lt;stdio.h&gt;&lt;br /&gt;#include &lt;windows.h&gt;&lt;br /&gt;#include &lt;notify.h&gt;&lt;br /&gt;void wmain(void)&lt;br /&gt;{&lt;br /&gt;CeRunAppAtEvent(_T("\\windows\\touch.exe"),&lt;br /&gt;NOTIFICATION_EVENT_DEVICE_CHANGE);&lt;br /&gt;}&lt;br /&gt;Parameter one is launch APP and two is Card detect even.&lt;br /&gt;2. Launch the execute file to notify the information to OS when launch the&lt;br /&gt;notified APP after OS boot up.&lt;br /&gt;3. OS will auto run the APP after card plug in.&lt;br /&gt;ps. The way can’t launch APP in Card because the program will launch APP&lt;br /&gt;when card plug in before mount.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8862960353498382799-3514673720997368592?l=ujagga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ujagga.blogspot.com/feeds/3514673720997368592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8862960353498382799&amp;postID=3514673720997368592' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/3514673720997368592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/3514673720997368592'/><link rel='alternate' type='text/html' href='http://ujagga.blogspot.com/2007/12/windows-ce-faq.html' title='WINDOWS CE - FAQ'/><author><name>UmeshJagga</name><uri>http://www.blogger.com/profile/02269101590343387557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_m3ftC8grSmY/R_zLElK0WxI/AAAAAAAAACU/7JDRwIMTgsU/S220/DSC00089.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8862960353498382799.post-4127909881059699598</id><published>2007-12-07T06:34:00.000-08:00</published><updated>2007-12-07T06:48:57.503-08:00</updated><title type='text'>WM5 Registry Tweaks -For performance.</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Disable menu animations&lt;br /&gt;&lt;/strong&gt;To disable menu animations (sliding in/out) and speed up performance of the UI a bit:&lt;br /&gt;&lt;strong&gt;HKLM\SYSTEM\GWE\Menu\AniType = 0 (DWORD decimal)&lt;br /&gt;&lt;/strong&gt;To change it back to the default:&lt;br /&gt;&lt;strong&gt;HKLM\SYSTEM\GWE\Menu\AniType = 6 (DWORD decimal)&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Disable window animations&lt;/strong&gt;&lt;br /&gt;To disable window animations (minimizing/maximizing) and speed up performance of the UI a bit:&lt;br /&gt;HKLM\SYSTEM\GWE\Animate = 0 (DWORD decimal)&lt;br /&gt;And to switch them back on:&lt;br /&gt;HKLM\SYSTEM\GWE\Animate = 1 (DWORD decimal)&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Increase font cache&lt;/strong&gt;&lt;br /&gt;To increase the font cache, speeding up font rendering at the cost of a bit of memory:&lt;br /&gt;HKLM\SYSTEM\GDI\GLYPHCACHE\limit = 16384 (DWORD decimal)&lt;br /&gt;To change it back to the default:&lt;br /&gt;HKLM\SYSTEM\GDI\GLYPHCACHE\limit = 8192 (DWORD decimal)&lt;/li&gt;&lt;li&gt;Enable FileSystem cache&lt;br /&gt;To enable the FileSystem cache, speeding up overall performance at the risk of the cache not being written on a sudden reset:&lt;br /&gt;HKLM\System\StorageManager\FATFS\EnableCache = 1 (DWORD decimal)&lt;br /&gt;To disable again:&lt;br /&gt;HKLM\System\StorageManager\FATFS\EnableCache = 0 (DWORD decimal)&lt;/li&gt;&lt;li&gt;Increase FileSystem cache&lt;br /&gt;To increase the file system cache:&lt;br /&gt;HKLM\System\StorageManager\FATFS\CacheSize = 4096 (DWORD decimal)&lt;br /&gt;To return the file system cache to zero:&lt;br /&gt;HKLM\System\StorageManager\FATFS\CacheSize = 0 (DWORD decimal)&lt;/li&gt;&lt;li&gt;Increase FileSystem filter cache&lt;br /&gt;To enable the file system filter cache, speeding up overall performance with file mangement:&lt;br /&gt;HKLM\System\StorageManager\Filters\fsreplxfilt\ReplStoreCacheSize = 4096 (DWORD decimal)&lt;br /&gt;To return the file system filter cache to zero:&lt;br /&gt;HKLM\System\StorageManager\Filters\fsreplxfilt\ReplStoreCacheSize = 0 (DWORD decimal)&lt;/li&gt;&lt;li&gt;UI Modifications&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt; Change the thickness of scrollbars&lt;br /&gt;To change the thickness of the scrollbars at the right/bottom of documents larger than the screen, adjust...For the horizontal (bottom) scrollbar:&lt;br /&gt;HKLM\System\GWE\cyHScr = 9 (DWORD decimal)&lt;br /&gt;For the vertical (right) scrollbar:&lt;br /&gt;HKLM\System\GWE\cxVScr = 9 (DWORD decimal)&lt;/li&gt;&lt;li&gt;Change the length of scrollbar arrow buttons&lt;br /&gt;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:&lt;br /&gt;HKLM\System\GWE\cyVScr = 9 (DWORD decimal)&lt;br /&gt;For the vertical (right) scrollbar:&lt;br /&gt;HKLM\System\GWE\cxHScr = 9 (DWORD decimal)&lt;/li&gt;&lt;li&gt;Enable ClearType in Landscape mode&lt;br /&gt;To enable ClearType in Landscape mode:&lt;br /&gt;HKLM\System\GDI\ClearTypeSettings\OffOnRotation = 0 (DWORD decimal)&lt;br /&gt;To disable:&lt;br /&gt;HKLM\System\GDI\ClearTypeSettings\OffOnRotation = 1 (DWORD decimal)&lt;/li&gt;&lt;li&gt;Change the display of the clock in the taskbar&lt;br /&gt;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:&lt;br /&gt;HKLM\Software\Microsoft\Shell\TBOpt = 0 (DWORD decimal)&lt;br /&gt;To show just the clock:&lt;br /&gt;HKLM\Software\Microsoft\Shell\TBOpt = 1 (DWORD decimal)&lt;br /&gt;To show just the date:&lt;br /&gt;HKLM\Software\Microsoft\Shell\TBOpt = 2 (DWORD decimal)&lt;br /&gt;To show both the date and the clock:&lt;br /&gt;HKLM\Software\Microsoft\Shell\TBOpt = 3 (DWORD decimal)&lt;/li&gt;&lt;li&gt;Show Edge network indicator instead of GPRS&lt;br /&gt;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:&lt;br /&gt;HKLM\Drivers\BuiltIn\RIL\EnableDifferGprsEdgeIcon = 1 (DWORD decimal)&lt;br /&gt;To disable again:&lt;br /&gt;HKLM\Drivers\BuiltIn\RIL\EnableDifferGprsEdgeIcon = 0 (DWORD decimal)&lt;/li&gt;&lt;li&gt;Add GPS settings icon&lt;br /&gt;If you have a GPS device, you can add a GPS settings icon to your Start &gt; Settings menu using:&lt;br /&gt;HKLM\ControlPanel\GPS Settings\Group = 2 (DWORD decimal)HKLM\ControlPanel\GPS Settings\redirect &lt;-- delete, or rename, this value&lt;/li&gt;&lt;li&gt;Hide/Show Screen orientation icon&lt;br /&gt;If you wish to hide the Screen orientation icon, shown in the task bar on some devices, you can set:&lt;br /&gt;HKLM\Services\ScreenRotate\ShowIcon = 0 (DWORD decimal)HKLM\System\GDI\Rotation\HideOrientationUI = 1 (DWORD decimal)&lt;br /&gt;And to show it again:&lt;br /&gt;HKLM\Services\ScreenRotate\ShowIcon = 1 (DWORD decimal)HKLM\System\GDI\Rotation\HideOrientationUI = 0 (DWORD decimal)&lt;br /&gt;If this doesn't work, you can try:&lt;br /&gt;HKLM\Services\screenrotate = 0 (DWORD decimal)&lt;br /&gt;And to show it again:&lt;br /&gt;HKLM\Services\screenrotate = 1 (DWORD decimal)&lt;/li&gt;&lt;li&gt;Hide/Show battery indicator in Task bar&lt;br /&gt;If you wish to hide the battery indicator in the task bar on some devices, you can set:&lt;br /&gt;HKLM\Services\Power\ShowIcon = 0 (DWORD decimal)&lt;br /&gt;And to show:&lt;br /&gt;HKLM\Services\Power\ShowIcon = 1 (DWORD decimal)&lt;/li&gt;&lt;li&gt;Put custom text on bottom-right of Today screenf ollowing key:&lt;br /&gt;HKLM\Software\Microsoft\Shell\DeviceBeta\Today = "This is windows mobile world of Umesh Jagga" (REG_SZ string, no quotes)&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;File Locations&lt;br /&gt;Change the location of My Documents                                             HKLM\Software\Microsoft\Windows CE Services\FileSyncPath = "\Storage Card\My Documents" (REG_SZ string, no quotes)&lt;br /&gt;To return to the original location:&lt;br /&gt;HKLM\Software\Microsoft\Windows CE Services\FileSyncPath = "\My Documents" (REG_SZ string, no quotes)&lt;/li&gt;&lt;li&gt;Change the location of email and attachments&lt;br /&gt;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:&lt;br /&gt;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)&lt;br /&gt;To return to the original location:&lt;br /&gt;Just simply delete these Registry settings (since neither is included by default).&lt;br /&gt;Change the location of Temporary Internet Files&lt;br /&gt;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:&lt;br /&gt;HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Cache = "\Storage Card\cacheie" (REG_SZ string, no quotes)&lt;br /&gt;To return to the original location:&lt;br /&gt;HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Cache = "\Windows\Profiles\guest\Temporary Internet Files" (REG_SZ string, no quotes)&lt;br /&gt;Change the location of Ringtone file storage&lt;br /&gt;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)&lt;br /&gt;HKCU\ControlPanel\SoundCategories\Ring\Directory = "\Storage Card\" (REG_SZ string, no quotes)&lt;br /&gt;To return to the original location:&lt;br /&gt;HKCU\ControlPanel\SoundCategories\Ring\Directory = "\Windows\Rings\" (REG_SZ string, no quotes)&lt;br /&gt;Note the default location may be "\Windows\" or "\Windows\Rings\" depending on your Device provider.&lt;br /&gt;Make WM5 ask where to install a program (1)&lt;br /&gt;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:&lt;br /&gt;HKLM\Software\apps\Microsoft Application Installer\fAskDest = 1 (DWORD decimal)&lt;br /&gt;To disable again:&lt;br /&gt;HKLM\Software\apps\Microsoft Application Installer\fAskDest = 0 (DWORD decimal)&lt;br /&gt;Make WM5 ask where to install a program (2)&lt;br /&gt;An alternative method of making WM5 ask where to install a program is by adding the "/askdest" option to the Windows CE loader:&lt;br /&gt;HKCR\cabfile\Shell\open\command = 'wceload.exe "%1" /askdest' (REG_SZ string, no quotes)&lt;br /&gt;Make WM5 keep CAB files around after installing (1)&lt;br /&gt;If you wish to keep the original .CAB file around after installing the application, set:&lt;br /&gt;HKLM\Software\apps\Microsoft Application Installer\nDynamicDelete = 0 (DWORD decimal)&lt;br /&gt;Or to restore to the default:&lt;br /&gt;HKLM\Software\apps\Microsoft Application Installer\nDynamicDelete = 2 (DWORD decimal)&lt;br /&gt;Make WM5 keep CAB files around after installing (2)&lt;br /&gt;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:&lt;br /&gt;HKCR\cabfile\Shell\open\command = 'wceload.exe "%1" /nodelete' (REG_SZ string, no quotes)&lt;br /&gt;Make WM5 prompt before overwriting an existing installation&lt;br /&gt;If you wish to make WM5 prompt you before overwriting an existing installation, set:&lt;br /&gt;HKLM\Software\apps\Microsoft Application Installer\fAskOptions = 1 (DWORD decimal)&lt;br /&gt;To disable again:&lt;br /&gt;HKLM\Software\apps\Microsoft Application Installer\fAskOptions = 0 (DWORD decimal)&lt;/li&gt;&lt;li&gt;Input (keyboard, soft keys, SIP)&lt;br /&gt;Change slide-out keyboard layout&lt;br /&gt;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...&lt;br /&gt;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)&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8862960353498382799-4127909881059699598?l=ujagga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ujagga.blogspot.com/feeds/4127909881059699598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8862960353498382799&amp;postID=4127909881059699598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/4127909881059699598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8862960353498382799/posts/default/4127909881059699598'/><link rel='alternate' type='text/html' href='http://ujagga.blogspot.com/2007/12/wm5-registry-tweaks-for-performance.html' title='WM5 Registry Tweaks -For performance.'/><author><name>UmeshJagga</name><uri>http://www.blogger.com/profile/02269101590343387557</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp0.blogger.com/_m3ftC8grSmY/R_zLElK0WxI/AAAAAAAAACU/7JDRwIMTgsU/S220/DSC00089.JPG'/></author><thr:total>0</thr:total></entry></feed>
