'개발이야기'에 해당되는 글 32건

  1. 2009.04.27 비주얼 스튜디오 마법사 에러 - Some VS2005 and VS2008 Wizards Pop Up Script Error.
  2. 2008.03.15 HKCU/Software/ Microsoft/Home/Keys/ - Google 검색 3
  3. 2007.10.24 블랙잭 레지스트리 만지기
  4. 2007.10.18 Window I/O 관련 윈도우에서 Physical Drive 직접 읽고 쓰기
  5. 2007.10.10 정말 도움되는 Windows Mobile 팁
  6. 2007.08.30 HTC UNIVERSAL HACK COLLECTION POOL! - xda-developers
  7. 2007.08.30 PPCSG -> How to disable GPRS and MMS
  8. 2007.08.30 SKT 블랙잭 (SCH-M620)에서 인터넷 접속관련 정보
  9. 2007.08.30 SmartPhone Tips
  10. 2007.08.30 블랙잭에서 SD를 내문서로 사용하기
  11. 2007.08.30 Popular Reg Tweaks - SPV-Developers Forums
  12. 2007.08.30 Windows Mobile Registry Tweaks and Hacks - htc
  13. 2007.08.29 Virtual-Key Codes 4
  14. 2007.08.28 Opera 8.60 for PPC 관련 팁
  15. 2007.08.18 Accessing the Internet by E-mail FAQ 3
  16. 2007.08.18 Download details: Windows Mobile Developer Power Toys
  17. 2007.08.14 How to develop and test device drivers in Windows CE 5.0 4
  18. 2007.08.14 블랙잭(SCH-M620,SPH-M6200) 에서 메시지 (POP3)에 Gmail 설정하기
  19. 2007.08.13 XDADeveloperWiki - WM5_Tweaks_Other
  20. 2007.08.13 XDADeveloperWiki - WM5_Tweaks_Performance
  21. 2007.08.06 HowardForums: Your Mobile Phone Community & Resource - Bluetooth Stereo (A2DP) on Qtek 8500
  22. 2007.08.06 WM6 A2DP best settings here - xda-developers
  23. 2007.08.06 Windows CE Developers FAQ 9
  24. 2007.08.03 Bluetooth (A2DP)
  25. 2007.08.01 Wireless DevCenter: Microsoft Smartphone Tips and Tricks 4
  26. 2007.07.31 RegistryNotifyCallback 4
  27. 2007.07.31 The State and Notifications Broker Part I 4
  28. 2007.07.30 HTC Application Unlock Guide
  29. 2007.07.30 Application Unlock Motorola Q for Telus
  30. 2007.07.26 스마트 폰 (SCH-M620,블랙잭)의 레지스트리 만지기 1
개발이야기2009. 4. 27. 13:44

Internet Explorer 8.0 을 깐 후 VS2005 나  VS2008 에서 함수나 변수 추가 마법사에서

아래와 같은 에러가 발생할 때 조치 요령입니다.

자기네들 프로그램들인데..에러가 나게 하다니..ㅎㅎㅎ

 

조치요령 :

Please follow the following steps:

-          Open regedit (on a 64-bit OS, open the 32-bit regedit)

 

-          Under “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\Zones”, create a new key called 1000 (if it isn't already there)

 

-          Under 1000, create a DWORD entry with:

o   Name = 1207

o   Type = REG_DWORD

o   Data = 0x000000

Visual C++ Team Blog : Some VS2005 and VS2008 Wizards Pop Up Script Error.

Posted by krsuncom
개발이야기2008. 3. 15. 09:54

 

Windows Mobile 2003 Software for Smartphone Second Edition ...

- [ 이 페이지 번역하기 BETA ]

<wap-provisioningdoc> <characteristic type="Registry"> <characteristic type="HKCU\Software\Microsoft\Home\Keys"> <characteristic type="113"> <parm name="Open" value="\Windows\camera.exe" datatype="string"/> </characteristic> ...
msdn2.microsoft.com/en-us/library/aa457941.aspx - 19k - 저장된 페이지 - 유사한 페이지 - 노트에 저장하기

[樂] 즐거운 세상 :: m4500 레지스트리[펌] - 오전 9:42

[HKEY_CURRENT_USER\Software\Microsoft\Home\Keys\112]로가서 실행할 파일 경로를 지정해줍니다. 예를들어 .... HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Cache = "\Windows\Profiles\guest\Temporary Internet Files" ...
rockion.tistory.com/161 - 54k - 저장된 페이지 - 유사한 페이지 - 노트에 저장하기

Any way to oneclick a new sms? [Archive] - xda-developers

- [ 이 페이지 번역하기 BETA ]

You should now have: HKCU\Software\Microsoft\Home\keys Under this new key, create another key called "113":- ... Now under HKCU\Software\Microsoft\Home\keys\113, edit the "Default" Datatype "String" value and put: Create Msg (or ...
forum.xda-developers.com/archive/index.php/t-319753.html - 8k - 저장된 페이지 - 유사한 페이지 - 노트에 저장하기

Samsung BlackJack Users :: View topic - Keys with WM6 - 오전 9:46

- [ 이 페이지 번역하기 BETA ]

[HKCU\Software\Microsoft\Home] Create a key named 'Keys ' in here, and then ANOTHER key named '113' in ?Keys?. Next, create the following string values: ... [HKEY_CURRENT_USER\Software\Microsoft\Home\Keys\113] default = Speed Dial ...
www.blackjackusers.com/viewtopic.php?p=16783&sid=5d4716ec3f98856cba08d7ff5d955b50 - 24k - 저장된 페이지 - 유사한 페이지 - 노트에 저장하기

All Blogs by Date

- [ 이 페이지 번역하기 BETA ]

HKCU/Software/Microsoft/Home/Keys/113/IconOffset. Personally I changed it to launch \Windows\Gridview.exe which I believe is the default application launcher used by Microsoft on the Start button. I was actually going to put this on the ...
toblogornottoblog.co.uk/blog/latest/1/full.php?order=d&page=1&mode=f - 54k - 저장된 페이지 - 유사한 페이지 - 노트에 저장하기

TotW: Change the function of the right soft key - MoDaCo - 오전 9:48

- [ 이 페이지 번역하기 BETA ]

Posts: 4507 Joined: 7th August 2003 From: Legazpi, Philippines Member No.: 12251 Device(s): ASUS P525. Just rename 'Keys' (HKCU\Software\Microsoft\Home\Keys) to say 'KeysX' (IMG:http://www.modaco.com/style_emoticons/default/smile.gif) ...
www.modaco.com/content-page/208536/TotW-Change-the-function-of-the-right-soft-key/page/60/ - 148k - 저장된 페이지 - 유사한 페이지 - 노트에 저장하기

Terminate Program - MoDaCo

- [ 이 페이지 번역하기 BETA ]

I think you can assign it to right softkey (HKCU\Software\Microsoft\Home\Keys\113\Open) Another option would be to do it with Mortscript using the Kill command. On your script you can specify a process or several processes to terminate. ...
www.modaco.com/content/HTC-Tornado-Faraday-Variants-Tornado-MoDaCo-com/263419/Terminate-Program/ - 58k - 저장된 페이지 - 유사한 페이지 - 노트에 저장하기
www.modaco.com 검색결과 더보기 »

smartphone developer Dynamic change of homescreen's softkey - 오전 9:38

- [ 이 페이지 번역하기 BETA ]

On smartphone, this can be hardcoded in registry by setting HKCU/Software/ Microsoft/Home/Keys/112 or 113 for the left and right softkey. On i600 samsung smartphone (windows mobile 5.0), the "carousel" homescreen plugin changes the ...
www.eggheadcafe.com/software/aspnet/30291141/dynamic-change-of-homescr.aspx - 31k - 저장된 페이지 - 유사한 페이지 - 노트에 저장하기

oldSAP Windows Mobile Freeware

- [ 이 페이지 번역하기 BETA ]

HKCU\Software\Microsoft\Home\keys\113\Open and change the string value to value to: \Storage Card\Program Files\Mortscript\RSK.mscr or use GPCarreon's Right Tweaker Just edit the mscr files with a text file editor to suite your taste. ...
oldsap.blogspot.com/2006/09/right-soft-key-menu-script.html - 110k - 저장된 페이지 - 유사한 페이지 - 노트에 저장하기

2007-10-05 - ata3の日記

\Windows\ArcMSG.exeを削除する. ボタンにアプリを割り当て. HKCU\Software\Microsoft\Home\Keys\113:Default=表示名. HKCU\Software\Microsoft\Home\Keys\113:Open="アプリのパス". Voice通常押し:Short_POC.lnk. Voice長押し:Long_POC.lnk ...
d.hatena.ne.jp/ata3/20071005 - 20k - 저장된 페이지 - 유사한 페이지 - 노트에 저장하기

HKCU/Software/ Microsoft/Home/Keys/ - Google 검색

Posted by krsuncom
개발이야기2007. 10. 24. 18:36

재미있는 기능이 많다....아마도 국내 블랙잭엔 안되는게 많을 듯 하다..

원문:

요기

> Tweaks & Hacks For Your Blackjack

Track this topic | Email this topic | Print this topic

blackjacksmartzone

Posted: Nov 25 2006, 12:25 AM

Quote Post

Administrator
****
Group: Admin
Posts: 140
Member No.: 1
Joined: 22-November 06

This section will be dedicated to Tweaks and Hacks for your Blackjack. Tweaks and Hacks are basically modifications to the registry on your Blackjack to improve things like, speed, user workflow and other things....
One thing to remember - When making changes to the registry as listed in any of the items below, you do so at your own risk and BlackjackSmartZone will not be held responsible. Ensure that you have a knowledge of making registry changes or that you have backed up your registry prior to attempting any changes...
Our recommendation is that you use software that has been specifically designed to make these changes without the need for you to edit the registry. The best application for this is
SmartTweaker which provide in exces of 55 tweaks and hacks all programmed into an application that will make these changes automatically, as and when new tweaks are discovered these are automatically added at no extra charge.

If you know of any others, please feel free to add them to this area.
Call Beep - Change the following registry setting to turn off the beep when you first make a call on your Blackjack!
HKEY_CURRENT_USER\ControlPanel\SoundCategories\InCall2
Change String/Value InitVol to 0

Call History - Change the following settings to increase the Call History on your Blackjack.
\HKEY_CURRENT_USER\ControlPanel\Phone
"CallHistoryMax" contains the number of numbers that will be kept in history. I.e. change it to 100 Create the key string and set the value to whatever you like.

Camera Shutter Sound - Change the following Registry settings to turn off the Camera Shutter Sound.
\HKEY_LOCAL_MACHINE\System\Pictures\Camera\OEM\SoundFile
Modify the string/value \windows\shuttersound_02_secs.wav to say \windows\*none* (remember to include the ** around none)

Font Gamma Change - Want to change the brightness of the font that is used on your Blackjack, simply change the registry settings below and you can have a duller font or a brighter font....In the registry simply change the following values -
HKEY_LOCAL_MACHINE\System\GDI\Gamma
Font Weight Change - Want your font thickness to be thinner or thicker???Make the following changes in the registry and Voila! thicker or thinner font!!!
HKEY_LOCAL_MACHINE\System\GWE\Menu\PopFnt
change the wt default value to a lower value to make it thinner or a higher value to make it thicker

List View/Grid View - Change the following registry settings to get a List View or a Grid View in your start Menu:
\HKEY_CURRENT_USER\Software\Microsoft\Shell\StartMenu
Change the GridView value to 0 if you want list view.
Change it to 1 if you want grid view.

Never Miss SMS Again - This tweak will enable you to never miss an SMS message again, it will enable fast blinking mode on new SMS messages that are recieved so you will never miss those important ones!!In the registry simply change the following values -
HKEY_CURRENT_USER\ControlPanel\Sounds\SMS
change the default value to - pf1w99999f0
HKEY_CURRENT_USER\ControlPanel\Sounds\Keypress
Change the default value to - pf0

Password Protection - Change the following registry settings to have password protection for your Data Connections.
\HKEY_LOCAL_MACHINE\COMM\ConnMgr\Providers(7C4B7A38-5FF7-4BC1-80F6-5DA7870BB1AA)Connections
If you want it to require you to put a password in when you login on to the internet do the following: inside the broadband and express folder change requirepw from 0 to 1, it will require u to put in a password. Perform the same action in the following Keys.
\HKEY_LOCAL_MACHINE\COMM\ConnMgr\Providers(EF0974C-4C98FF6-AEF805DC0E8E)VZW BROWSER
HKEY_LOCAL_MACHINE\SOFTWARE\MOTOROLA\MMS\PROFILES\VZW MMS

Program Security Warning Message - Off - This will turn off the security warning message that is displayed when you install non certified software. NOTE: This does open up the possibility of malware becoming installed on your phone, since the warning message will not appear to prompt you. In the registry simply change the following values -
HKEY_LOCAL_MACHINE\Security\Policies\\Policies Folders
change the 0000101a default value to - 1

Memory Defrag - This tweak will enable you to free up memory by doing a memory defrag in realtime!! In the registry simply change the following values -
HKEY_CURRENT_USER\Software\Microsoft\Shell
Create a Key and set the value - NEVERDORKMEMORY

Smaller Scrollbars - Perform the following regustry changes to allows 4 icons on a row in the start menu instead of 3! It also allows more to be viewed on the screen in IE!
1) Go to HKey_LOCAL_MACHINE\SYSTEM\GWE\
2) Adjust the following values
cyHScr : Horizontal Scrollbars
Height in pixels (default is 6, set it to 3)
cxVScr : Vertical Scrollbars
Width in pixels (default is 6, set it to 3)
3) Soft-reset

SMS Message hack - Make the following adjustments to get rid of the "SMS Message Sent" popup that appears after sending a text!
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Inbox
Click on Inbox (make sure the Inbox is highlighted) and select Edit, New Key
Name the New Key as "Settings"
Click on "Settings" (make sure the Settings is highlighted) and select Edit, New String Value
On "Value name:", key in SMSNoSentMsg and in "Value data", key in 1
Soft reset your device and test it with one SMS, and you will notice that the SMS Sent bubble is being disabled.

Speed Increase - The following tweaks greatly improve the Blackjack performance, making it much more responsive. Simply open your Blackjackregistry using your chosen Registry Editor and change the values below.
HKEY_LOCAL_MACHINE\SYSTEM\GDI\GLYPHCACHE\ (Change limit from 16384 to 32768)
HKEY_LOCAL_MACHINE\System\StorageManager\FATFS (Change CacheSize to 4096)

Customization of Start Menu Programs List - Want to reorder the items in your Start Menu?? Make the following changes to update what and how they appear.. In the registry simply change the following values -
HKEY_CURRENT_USER\Software\Microsoft\Shell\StartMenu
Settings.lnk
Accessories
Games
Configurations
Resource Management
Messaging.lnk
Contacts.lnk
Calendar.lnk
mMode.lnk
Internet Explorer.lnk
ActiveSync.lnk
Call History.lnk
MSN Messenger.lnk
Camera.lnk
WMPlayer.lnk
Simply change the order in which they appear in the list and this will also be the new order in which they appear on your Smartphone..

Startup/Boot Sound - Change the following registry setting to have a new startup and shutdown sound play -
\HKEY_CURRENT_USER\ControlPanel\Sounds
At the very bottom of the list of entries, there is an entry called AllSounds
Open that up and you'll see a list of mp3 files.
All you have to do is append your own audio files (mp3, wma, or wav) to the list. Then you have to make sure that you place your new audio clips in the \Windows folder so that they are accessible.
The next time you go to the sounds events page, the drop down menu will contain the new clips you added.
If you want to change the system startup sound, go to:
\HKEY_CURRENT_USER\ControlPanel\Sounds\SystemStart\Sound
Change the hidden wav file, \Windows\Piano.wav to \Windows\YOUR_WAV_GOES_HERE.wav

True SMS Delete - Your SMS Messages are never truly deleted (even though you click delete), this tweak will make possible a true SMS delete, the Delete folder will remain empty. Awesome if someone looks at your phone (your SMS will have been truly deleted!!) In the registry simply change the following values -
HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\INBOX\SMSTEXT
change the DWORD MaxDeletedMsgs value to - 0

BlackjackSmartZone (Home) -> Tweaks & Hacks For Your Blackjack

Posted by krsuncom
개발이야기2007. 10. 18. 19:26

원본:요기 

윈도우에서 Physical Drive 직접 읽고 쓰기

  • 드라이브 열기
  1. HANDLE OpenDrive( int iPhysicalDriveNumber )
    {
        HANDLE hDevice;
        char vcDriveName[ 30 ];
  2.     // HDD를 실수로 지우는걸 방지하기 위함

        if( iPhysicalDriveNumber == 0 )
        {
            return INVALID_HANDLE_VALUE;
        }

  3.     // Physical Drive를 연다.
        sprintf( vcDriveName, "\\\\.\\PhysicalDrive%d", iPhysicalDriveNumber );
        hDevice = CreateFile( vcDriveName, GENERIC_READ | GENERIC_WRITE,
            FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL );
        return hDevice;
    }

  • 드라이브 읽기
  1. BOOL ReadSector( HANDLE hDevice, DWORD dwSectorOffset, BYTE* pbBuffer,
                     int iSectorCount )
    {
        DWORD dwLow;
        DWORD dwHigh;
        DWORD dwRet;
        DWORD dwRead;
        DWORD dwErrorCode;
  2.     // 움직일 위치는 byte 단위로 되어야 한다.
        // 결국 dwSectorOffset에 512를 곱해줘야 한다.
        dwLow = ( dwSectorOffset << 9 );
        dwHigh = ( dwSectorOffset >> 23 );
  3.     // File Pointer를 이동한다.
        dwRet = SetFilePointer( hDevice, dwLow, &dwHigh, FILE_BEGIN );
        if( dwRet == INVALID_SET_FILE_POINTER )
        {
            return FALSE;
        }
  4.     // Sector를 읽는다.
        if( ReadFile( hDevice, pbBuffer, iSectorCount * SECTORSIZE, &dwRead,
            NULL ) == FALSE )
        {
            dwErrorCode = GetLastError();
            return FALSE;
        }
  5.     return TRUE;
    }
  • 드라이브 쓰기
  1. BOOL WriteSector( HANDLE hDevice, DWORD dwSectorOffset, BYTE* pbBuffer,
                     int iSectorCount )
    {
        DWORD dwLow;
        DWORD dwHigh;
        DWORD dwRet;
        DWORD dwWrite;
        DWORD dwErrorCode;
  2.     // 움직일 위치는 byte 단위로 되어야 한다.
        // 결국 dwSectorOffset에 512를 곱해줘야 한다.
        dwLow = ( dwSectorOffset << 9 );
        dwHigh = ( dwSectorOffset >> 23 );
  3.     // File Pointer를 이동한다.
        dwRet = SetFilePointer( hDevice, dwLow, &dwHigh, FILE_BEGIN );
        if( dwRet == INVALID_SET_FILE_POINTER )
        {
            return FALSE;
        }
  4.     // Sector를 쓴다.
        if( WriteFile( hDevice, pbBuffer, iSectorCount * SECTORSIZE, &dwWrite,
            NULL ) == FALSE )
        {
            dwErrorCode = GetLastError();
            return FALSE;
        }
  5.     gs_dwTotalWriteSectorCount += iSectorCount;
        return TRUE;
    }
  • 드라이브 닫기
  1. void CloseDrive( HANDLE hDevice )
    {
        CloseHandle( hDevice );
    }

Drive의 Geometry 읽기

Geometry정보에는 CHS 값이 들어있기 때문에 유용하게 쓸 수 있다.

  1. BOOL GetDriveGeometry( int iPhysicalDriveNumber, GEOMETRY* pstGeometry )
    {
        HANDLE hDevice;
        BOOL bRet;
        DWORD dwOutBytes;
        char vcDriveName[ 30 ];
        DISK_GEOMETRY stWindowGeometry;
  2.     // Physical Drive Number를 저장한다.
        sprintf( vcDriveName, "\\\\.\\PhysicalDrive%d", iPhysicalDriveNumber );
  3.     hDevice = CreateFile( vcDriveName, 0, FILE_SHARE_READ |
            FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL );
  4.     if( hDevice == INVALID_HANDLE_VALUE )
        {
            return FALSE;
        }
  5.     bRet = DeviceIoControl( hDevice, IOCTL_DISK_GET_DRIVE_GEOMETRY,
            NULL, 0, &stWindowGeometry, sizeof( DISK_GEOMETRY ), &dwOutBytes,
            NULL );
  6.     CloseHandle( hDevice );
  7.     // 지금은 윈도우 Geometry와 같은 Geometry를 사용한다.
        memcpy( pstGeometry, &stWindowGeometry, sizeof( DISK_GEOMETRY ) );
  8.     return bRet;
    }

Drive Descriptor 얻기

Descriptor에 보면 해당 드라이브의 제품명과 리비전 번호 같은 걸 알 수 있다.

  1. BOOL GetDeviceDescriptor( char* pcDevice, PSTORAGE_DEVICE_DESCRIPTOR pstDesc )
    {
        HANDLE hDevice;
        STORAGE_PROPERTY_QUERY  stQuery;
        DWORD dwOut;
        BOOL bRet;
  2.     memset( pstDesc, 0, sizeof(STORAGE_DEVICE_DESCRIPTOR) );
  3.     // Device를 Open한다.
        hDevice = CreateFile( pcDevice, GENERIC_READ, FILE_SHARE_READ |
            FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL );
        if( hDevice == INVALID_HANDLE_VALUE )
        {
            return FALSE;
        }
  4.     pstDesc->Size = sizeof( STORAGE_DEVICE_DESCRIPTOR );
  5.     // Device Io Control을 호출한다.
        stQuery.PropertyId = StorageDeviceProperty;
        stQuery.QueryType = PropertyStandardQuery;
  6.     bRet = DeviceIoControl( hDevice, IOCTL_STORAGE_QUERY_PROPERTY,
                &stQuery, sizeof( STORAGE_PROPERTY_QUERY ),
                pstDesc, pstDesc->Size, &dwOut, NULL);                
        if( bRet == FALSE )
        {
            return FALSE;
        }
  7.     CloseHandle( hDevice );
        return TRUE;
    }

Drive 문자로 Physical Index 얻기

드라이브 문자로 Physical Index를 얻는 방법은 VOLUME 정보를 이용하면 된다.

  1. int GetPhysicalDriveNumber( char cDriveName )
    {
        HANDLE hDevice;
        DWORD dwOut;
        BOOL bRet;
        char vcDriveName[ 40 ];
        VOLUME_DISK_EXTENTS* pstVolumeData;
        int iDiskNumber;
  2.     // 메모리를 할당한다.
        pstVolumeData = ( VOLUME_DISK_EXTENTS* ) malloc( VOLUMEDISKSIZE );
        if( pstVolumeData == NULL )
        {
            return -1;
        }
  3.     // 해당 Drive의 정보를 얻는다.
        sprintf( vcDriveName, "\\\\?\\%c:", cDriveName );
        // Device를 Open한다.
        hDevice = CreateFile( vcDriveName, GENERIC_READ, FILE_SHARE_READ |
            FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL );
        if( hDevice == INVALID_HANDLE_VALUE )
        {
            return -1;
        }
  4.     // Device Io Control을 호출한다.
        bRet = DeviceIoControl( hDevice, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,
                NULL, 0, pstVolumeData, VOLUMEDISKSIZE, &dwOut, NULL );
        if( bRet == FALSE )
        {
            free( pstVolumeData );
            return -1;
        }
        CloseHandle( hDevice );
  5.     // Disk 정보가 1보다 작으면 실패
        if( pstVolumeData->NumberOfDiskExtents < 1 )
        {
            free( pstVolumeData );
            return -1;
        }
  6.     iDiskNumber = pstVolumeData->Extents[ 0 ].DiskNumber;
        free( pstVolumeData );
  7.     return iDiskNumber;
    }


Logical Drive와 Physical Drive 간의 매치방법

1. 일단 Logical Drive를 검색한다.
-> GetDriveType() 함수를 이용
2. 해당 Drvie를 열어서 Volume 정보를 얻음
-> "\\?\c" 와 같은 형태로 CreateFile() 호출
-> IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS를 날려서 Physical Drive 정보를 얻음
-> 리더기에 데이터가 연결되어있지 않으면 DeviceIoControl에서 문제 발생

00 Window I/O 관련

Posted by krsuncom
개발이야기2007. 10. 10. 09:57

원문이라네 : 요기

Tweaks and Hacks

Post registry and software hacks to make your TyTN do even more here.
(Obviously none of these will be supported by either HTC or your local phone service provider. Use these at your own risk.)
Registry Editors:
Mobile Registry Editor
Works with Mobile 5 though developed for older

Change Bluetooth Name Without Changing Owner Name
Normally the name of your device which is displayed when using bluetooth is the owner name.
To change this use a registry editor and browse to
\HCKU\Software\Microsoft\Bluetooth\Settings\Local Name
And change the value of the local name key to what ever you want.
THIS HAS ONLY BEEN TESTED ON MY DEVICE: IMATE JASJAM RUNNING WINDOWS MOBILE 5.0 (build 14955.2.3.0) AKU 2.3
Internet Explorer Navigation
The default behaviour for your device's four-way direction button in Pocket Internet Explorer (PIE) is to jump between hyperlinks/form fields on a web page. To change this behaviour so that the button scrolls the page left, right, up and down, use the following tweak:
\HKLM\Software\Microsoft\Internet Explorer\Navigation\4-Way Nav = 0 (DWORD decimal)
And to re-enable hyperlink/form field navigation:
\HKLM\Software\Microsoft\Internet Explorer\Navigation\4-Way Nav = 1 (DWORD decimal)
NB: You may still jump between links using Tab and Shift-Tab if your device has a built-in hardware keyboard.
WM5: Increase Performance and Speed

Boost Windows Mobile 5 performance by makeing the following changes in the registry...
[HKLM\System\StorageManager\FATFS] CacheSize = 4096 EnableCache = 1
[HKLM\System\StorageManager\Filters\fsreplxfilt] ReplStoreCacheSize = 4096
Default values for all keys are 0. Soft reset for changes to take effect.
Disable Menu Animation

Navigate to HKEY_LOCAL_MACHINE\SYSTEM\GWE\Menu, then change the value of "AniType" from 6 (default) to 0.
This disables the menu animation which helps in speeding up your PocketPC.
Change the Tap and Hold Dots Colours

1) Go to the HKLM\SOFTWARE\Microsoft\Color\ key.
2) Add a Binary value called "40" if it does not already exist.
3) Set the value to "rr gg bb 00" (RGB hex values 00 to FF so "FF 00 000 00" is Red)
SMS Settings

SMS Notification Always On
[HKEY_CURRENT_USER\Software\Microsoft\Inbox\Settings]
"SMSDeliveryNotify"=dword:00000001 ->0 to disable, 1 to enable.
Disable SMS Sent Notification
[HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Settings]
"SMSNoSentMsg"=dword:00000001 ->0 to enable, 1 to disable.
Bottom tray icons

Remove the Battery Icon:
[HKEY_LOCAL_MACHINE\Services\Power]
"ShowIcon"=dword:00000000
Remove the Wireless Manager Icon:
[HKEY_LOCAL_MACHINE\Services\WirelessMgr]
"Keep"=dword:00000000
Restore local language support for sliding keyboard after upgrade to a different language ROM

This has been reported not to work, see below for another hack
You need to create Registry value of name "Locale" and type of "String" and data of "Localization ID" within [HKEY_CURRENT_USER\ControlPanel\Keybd]
Localization IDs:
French = 040c
German = 0407
Italian = 0410
Japanese = 0411
Kazakh = 043f
Russian = 0419
Other IDs can be found here: Tweaks and Hacks - htcwikihttp://www.microsoft.com/globaldev/reference/winxp/xp-lcid.mspx.
Some versions of the OS seem to be case sensitive on this value, and if it does not work, try upper case letters. Registry example for say russian kbd:
[HKEY_CURRENT_USER\ControlPanel\Keybd]
"Locale"="0419"
Modification to keyboard hack. The above solution does not work for the Hermes the following new settings are required.

Goto the following registry entry
[HKEY_LOCAL_MACHINE\Software\Oem\Qwerty]
There is a key called 'Layout' and it is in Decimal.
The default value of English ROM is 20409, and Chinese ROM is 20404 (both are in hexadecimal).
The suitable value for German Hermes keyboard is 20407 (132103 in decimal).
Probably Hermes use 20+country ID (409=WWE, 407=German, 404=Trad. Chinese, etc...) format for keyboard layout value.

The above settings does not work with the latest Hermes firmware, the following is required.

[HKEY_CURRENT_USER\keyboard layout\Preload]
"Default"="e0010414"
[HKEY_CURRENT_USER\keyboard layout\Preload\1]
"Default"="e0010414"
[HKEY_LOCAL_MACHINE\Software\Oem\Qwerty]
"Layout"="132116"
The last setting is the same as in the above solution
These settings are for Norwegian keyboard, country code : 0414
Tested on fw. 1.31.502.1
Improve BT A2DP sound quality

[HKLM/Software/Microsoft/Bluetooth/A2DP/Settings]
Add new dword, Value name=BitPool; Value data=48 (Decimal)
Modify, Value name=UseJointStereo; Value data=0 (Decimal, Originally 1)
For BitPool:
Microsoft suggests the following bitpool values for optimal buffer sizes.
30 - Low audio quality
40 - Medium audio quality
48 - High audio quality
58 - Excellent audio quality
Chose one you like. I think 48 is good enough.
For UseJointStereo: use 0 instead of 1, then you got the real stereo.
Show Network Operator Name in today screen

Restoring Today Item: WiFi, BT and Phone Connection Status
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Today\Items] Create "Wireless" use Key "Flags"=dword:00000000
"Options"=dword:00000000
"DLL"="netui.dll"
"Order"=dword:00000000
"Enabled"=dword:00000001
"Type"=dword:00000004
  • Enable clicking on the today plugin above open Comm Manager
[HKEY_LOCAL_MACHINE\ControlPanel\WrlsMgr] Create key "Redirect" "Redirect"= "\Windows\CommManager.exe"
Restore clock on top bar

[HKLM\Software\Microsoft\Shell\]
"ShowTitleBarClock"=1 (enable)
"ShowTitleBarClock"=0 (disable)
PocketIE Cache in storage card

Create these folders:
\Storage Card\Pocket IE\Temporary Internet Files
\Storage Card\Pocket IE\Cookies
\Storage Card\Pocket IE\History
Add the following registry keys, string data type:
[HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"Cache"="\Storage Card\Pocket IE\Temporary Internet Files"
"Cookies"="\Storage Card\Pocket IE\Cookies"
"History"="\Storage Card\Pocket IE\History"
Disable flashing service LEDs

[HKLM\Drivers\BuiltIn\AllLEDMgr]
"Index"=0 Note! Disables vibrating.
Adding disconnect GPRS/UMTS button

To add Disconnect button and a timer display showing how long GRPS is in use for the session: HKLM\ControlPanel\Phone\Flags2 = 16 (DWORD decimal) To have only Disconnect button: HKLM\ControlPanel\Phone\Flags2 = 8 (DWORD decimal) To disable both the Disconnect button and the timer: HKLM\ControlPanel\Phone\Flags2 = 0 (DWORD decimal)
Disable annoying beeps when changing in-call volume

There are actually 3 different sounds in play here: the one at the bottom end of the slider (quietest), the one in the middle posisitions (standard), and the one at the top end of the slider (loudest). These are handled by 3 registry keys: HKCU\ControlPanel\Sounds\LoudestInCallVolume
HKCU\ControlPanel\Sounds\QuietestInCallVolume
HKCU\ControlPanel\Sounds\StandardInCallVolume Within each of these keys the default 'Script' value is 'p' for 'play', change the 'Script' value to blank (erase the 'p').
Change ringtone/vibrate/LED flash characteristics

If you would like more control over how your device rings/vibrates/flashes its LEDs on events, you can can change the Script values of these events.
For example, for an incoming call performing 'activate device, play ringtone, wait 3 seconds, repeat':
HKCU\ControlPanel\Sounds\RingTone0\Script = "apw3r" (REG_SZ string, no quotes)
For performing 'active device, set volume to 33%, play ringtone, set volume to 67%, play ringtone, set volume to 100%, play ringtone (no repeat)':
HKCU\ControlPanel\Sounds\RingTone0\Script = "ac33pc67pc100p" (REG_SZ string, no quotes)
The following are the full codes available to you.
Please note that all the codes are executed simultaneously except after a ringtone play / wait code. E.g. 'v1p' will vibrate and play at the same time, while vibrating for 1 second. But 'pv1' will play the ringtone through all the way first, then start vibrating for 1 second. a = activate device
cN = set volume to N in percentage max volume
fN = flash notification LED for N seconds
p = play ringtone. Note that this will play the ringtone all the way through before continuing with the next code.
r = repeat. Note that this should be the last code in your Script string, if used at all. The repeat will be from the most recent a. So: v3apr will vibrate once then repeat the ring signal.
vN = vibrate for N seconds
wN = wait for N seconds. Note that the device will wait this long before continuing with the next code.

Tweaks and Hacks - htc

Posted by krsuncom
개발이야기2007. 8. 30. 15:36

엄청나게 많은 정보다. 원본은 요기 :HTC UNIVERSAL HACK COLLECTION POOL! - xda-developers

HTC UNIVERSAL HACK COLLECTION POOL!


Dear Friends,
As an one month owner of Htc Universal, i searched the internet a lot and found lots of information. Also this great forum is really helpfull for me to do the rom updates or hacks provided by the experienced members... But i am thinking to open a topic to share what i found with all description... So i want to upload all the cabs and hacks i found, in an ordinary way... Probably most of the hacks which i uploaded here may be given a time ago in these forum or somewhere else... So this topic is aimed to be a collection pool of all the hacks for newbies like me and i will try to update the topic frequently... Any help to me is really great and for any mistake of mine, please forgive me...
Regards and thanks...

HTC UNIVERSAL HACK COLLECTION POOL!
**** NONE OF THE HACKS, UPLOADED IN THIS TOPIC, BELONG TO ME...I HAVE COLLECTED ALL OF THEM FROM THE INTERNET... THANKS GO TO THEIR PROGRAMMERS AND FOUNDERS....
*** AFTER APPLYING HACKS, PLEASE POWER OFF THE PHONE AND WAIT FOR 5 SECONDS AND THEN SOFT RESET...
HARD RESET:
PLEASE DONT FORGET TO BACKUP YOUR IMPORTANT DATA.
PRESS BOTH SOFT KEYS ON THE KEYBOARD AND RESET HOLE WITH STYLUS AT THE SAME TIME TO DO A HARD RESET...
BOOT LOADER MODE(USB/SERIAL):
FIRST DEATTACH SIM AND SD/MMC MEMORY CARD.
DISCONNECT USB CABLE.
PRESS BACKLIGHT BUTTON + POWER BUTTON + RESET HOLE AT THE SAME TIME.
YOU WILL SEE " SERIAL " ON THE SCREEN.
NOW CONNECT USB CABLE TO ENTER " USB " MODE.
PHONE KEYS VIBRATION EFFECT:
With this hack, you can feel the vibrate effect while pressing phone keys...
PHONE KEYS SOUND EFFECT:
With this hack, you can go back to default settings after phone keys vibration effect hack...
SHOW CONTACTS FIRST NAME SURNAME ORDER:
With this hack, you can change the view style of contacts to first name surname. After installation, tap and hold any contact and slect the file as option from the menu...
CHANGE BACKLIGHT KEY COMMAND:
With this hack, you can change the command of back light button to any program other than backlight function...
CLEARTYPE ON FOR PORTRAIT AND LANDSCAPE MODES:
With this hack, you can activate clear type both for portrait and landscape modes...
ACTIVATE PHONE SKIN WITH 3D BUTTONS:
With this hack, you can activate phone skin with 3d buttons in the expense of some memory and speed..
BLUETOOTH VOICE DIAL COMMAND OFF:
With this hack, you can deactivate the launching of voice command program and get opportunity to transfer the playing music directly to bluetooth headset by pressing the voice call button on the bluetooth headset (must be supported by bluetooth headset)...
BLUETOOTH VOICE DIAL COMMAND ON:
With this hack, you can reactivate voice call function over bluetooth headset...
DISABLE SECURITY:
With this hack, you can disable security procedures just after a clean hard reset without extented rom installations...
PERFORMANCE TWEAK HIGH RESOURCES:
With this hack, you will change the all storage caches,audio prioty,soft keyboard sensivity,font cache,glyph cache,deactivate start menu and windows animations with high amount of memory allocations...
PERFORMANCE TWEAK LOW RESOURCES:
With this hack, you will change the all storage caches,audio prioty,soft keyboard sensivity,font cache,glyph cache,deactivate start menu and windows animations with low amount of memory allocations...
WIFI G MODE ON:
With this hack, you can activate the mode for connecting wifi networks only for g protocol but be advised that there is no significant speed improvement over b mode...
WIFI SCAN INTERVAL LOW:
With this hack, you can consume some battery power while wifi is on by lowering the scan interval of wifi networks...
POCKET IE TWEAKS:
With this hack, you can change the parameters of pocket ie.the changes are make fit,zoom to small,search page as google,max request and max connections,cleartype on for ie,pocket ie as msie6.0 ...
ENHANCED FILE DIALOG:
With this Hack, you can enhance the builtin file dialog applet to browse whole the phone easily in the dalog window.just copy all the files in the archive to windows dir and soft reset.After run the file dialog applet from control panel and check the option Exchange standart File Dialog.
SOFT KEY APPLET:
With this hack, you can change the soft key commands.Just copy the file in the archive to windows dir and soft reset.After run the applet from control panel...
DSP ENHANCER -BASS&TREBLE SETTINGS:
With this hack, you can set the level of bass and treble easily via applet in the control panel. Especially you can feel the basss and treble changes by headset... ( Removed! Reported to be not working with Htc Universal )
UNLOCK EXTENDED ROM:
With this hack, you can get extra 10 mb free space in the new mounted storage area called ExtendedROM...Simply after installing cab, just run the ExtROMUNLOCKER from start menu - programs and soft reset.After you can add or delete any file in this new storage space or organize it with the cabs which you want to automatically be installed after hard reset...
HIDE ROTATE ICON FROM TRAY BAR:
With this hack, you can hide rotate icon from tray bar...
SHOW ROTATE ICON ON TRAY BAR:
With this hack, you can show rotate icon on tray bar...
HIDE WIRELESS MANAGER ICON FROM TRAY BAR:
With this hack, you can hide wireless manager icon from tray bar...
SHOW WIRELESS MANAGER ICON ON TRAY BAR:
With this hack, you can show wireless manager icon on tray bar...
HIDE BATTERY ICON FROM TRAY BAR BATTERY:
With this hack, you can hide the battery icon from tray bar...
SHOW BATTERY ICON ON TRAY BAR:
With this hack, you can show the battery icon on the tray bar...
ACTIVATE TRUE VGA MODE:
With this hack, you can activate true vga mode (96 dpi instead of 192 dpi). Installation information included.
WM5 NEW MENU
With this hack, you can change one of the soft keys as a new menu like in windows mobile 2003...
DISABLE GPRS AUTO CONNECT
With this hack, you can disable gprs autoconnect and then connect manually whenever you want...
BLUETOOTH ICON ON TRAY BAR
With this hack, you can see and change the status of bluetooth from tray icon.
***UPDATE: 03.03.2006***
TUNE CLEAR TYPE LEVEL:
With this hack, you can tune the level of clear type from high to low or from low to high. Very usefull when using true vga mode. Install and run the program from start menu...
POCKETIE BLANK HOME PAGE
With this hack, pocketie will start with a blank home page...
DATE+TIME ON TITLE BAR
With this hack, date and time is available on the title bar...

HTC UNIVERSAL HACK COLLECTION POOL! - xda-developers

Posted by krsuncom
개발이야기2007. 8. 30. 15:32

Source: http://www.ppcsg.com/index.php?showtopic=49904 

Just fiddled with my mini's registry and found that the GPRS can be disabled. This would be pretty useful if u:
1) have absolutely no use for GPRS.
2) have no intention to use GPRS.
3) have been chalking up huge bills for GPRS.
Anyway, if u wanna rid urself of GPRS:
1) Open ur registry editor
2) Go to the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ConnMgr\Providers\
{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections
\IDEAS Internet (GPRS)\Enabled
3) Edit the key 'Enabled' by double-tapping or otherwise.
4) Change its DWORD Data from '1' to '0'.
5) Go to the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ConnMgr\Providers\
{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections
\IDEAS WAP (GPRS)\Enabled
6) Edit the key 'Enabled' by double-tapping or otherwise.
7) Change its DWORD Data from '1' to '0'.
8) Soft-reset.
If u really really hate GPRS, u might as well rid urself of the MMS function as well:
1) Open ur registry editor
2) Go to the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ConnMgr\Providers\
{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections
\IDEAS MMS\Enabled
3) Edit the key 'Enabled' by double-tapping or otherwise.
4) Change its DWORD Data from '1' to '0'.
5) Soft-reset.

PPCSG -> How to disable GPRS and MMS

Posted by krsuncom
개발이야기2007. 8. 30. 15:20

아주 주의를 요하는 작업이다  SKT 블랙잭의 경우 Connectios의 값에

SKT IE GPRS/SKT WAP GPRS 이 있는데 Enabled 를 수정하면 접속을 막을 수도 있을거 같다.

 
HKEY_LOCAL_MACHINE\Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections\SKT IE GPRS\Enabled
 

HKEY_LOCAL_MACHINE\Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections\SKT WAP GPRS\Enabled
 
기타내용은 아래 참조...

Universal_Registry

Registry Settings

Changing the registry can be a dangerous thing to do - do not make these changes below unless you know what you are doing and that you have a way to revert the changes if they do not do what you expect.

If any of the changes listed below do not work then do a soft reset of your phone. Many programs only pick up their registry settings when they start up and do not notice changes whle they are running, so a soft reset ensures that every program restarts and picks up any changes that have been made.


People, awesome registry hack forum here with downloadable hacks to make it easier.

http://forum.xda-developers.com/viewtopic.php?t=41968&highlight=

All credits to Protochip for the hardwork in compiling it.


To change the softkeys on the Today screen
  • The left-hand softkey settings are at 'HKEY_CURRENT_USER\Software\Microsoft\Today\Keys\112', the right-hand softkey settings are at 'HKEY_CURRENT_USER\Software\Microsoft\Today\Keys\113'
  • The 'Default' string value can be changed to whatever text you wish to have displayed
  • The 'Open' string value can be changed to the program you wish to run when the softkey is pressed

For example, to change the left-hand softkey to start Pocket Excel you would set

  • HKEY_CURRENT_USER\Software\Microsoft\Today\Keys\112\(Default) = Pocket Excel
  • HKEY_CURRENT_USER\Software\Microsoft\Today\Keys\112\Open = \windows\pxl.exe

If you want to change the left-hand softkey to start Messaging you would set

  • HKEY_CURRENT_USER\Software\Microsoft\Today\Keys\112\(Default) = Messages
  • HKEY_CURRENT_USER\Software\Microsoft\Today\Keys\112\Open = \Windows\tmail.lnk

If you want to change the right-hand softkey to start Contacts you would set

  • HKEY_CURRENT_USER\Software\Microsoft\Today\Keys\113\(Default) = Contacts
  • HKEY_CURRENT_USER\Software\Microsoft\Today\Keys\113\Open = \Windows\?AppButtons\Contacts.lnk

To set or remove the operator phone skin
  • The setting is at 'HKEY_LOCAL_MACHINE\Security\Phone\Skin'
  • The 'Enabled' DWORD value can be set to '1' to show the operator skin or '0' to show the default skin

For example, to show the default skin

  • HKEY_LOCAL_MACHINE\Security\Phone\Skin\Enabled = 0

To hide or show the GPS connection in the connections panel
  • The settings are at 'HKEY_LOCAL_MACHINE\ControlPanel\GPS Settings'
  • The 'Hide' DWORD value should be set to '0' or deleted to show the panel and to '1' to hide the panel
  • The 'Group' DWORD value should be set to '2' to show the panel and deleted to hide the panel

For example, to show the GPS connection in the connectionss panel

  • HKEY_LOCAL_MACHINE\ControlPanel\GPS Settings\Hide = 0
  • HKEY_LOCAL_MACHINE\ControlPanel\GPS Settings\Group = 2

To change the ability to receive files via Bluetooth (OBEX)
  • The setting is at 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Obex'
  • The 'IsEnabled' DWORD value should be set to '1' to enable OBEX and '0' to disable OBEX.

For example, to enable the ability to receive fles via Bluetooth

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Obex\IsEnabled = 1

To set the data connection to remain permanently on
  • The setting is at 'HKEY_LOCAL_MACHINE\Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections\(GPRS connection name)'

    • (GRPS connection name) is the name of your connection to the outside world
  • The 'AlwaysOn' DWORD value can be set to '1' to remain on permanently or '0' to turn on and off as required

For example, to set the data connection always on for a T-Mobile MDA Pro

  • HKEY_LOCAL_MACHINE\Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections\T-Mobile Internet\AlwaysOn = 1

To change the display of the screen rotation icon in the system tray
  • The setting is at 'HKEY_LOCAL_MACHINE\System\GDI\ROTATION'
  • The 'HideOrientationUI' DWORD value can be set to '1' to hide the icon or '0' to show the icon

For example, to hide the screen rotation icon

  • HKEY_LOCAL_MACHINE\System\GDI\ROTATION\HideOrientationUI = 1

MS Voice Command activation from BT headset:

Now this one is sweet and makes the JASJAR the daddy for voice commands.

  • Install Voice Command to the default location.
  • Fire up a registry editor
  • Go to: HKEY_LOCAL_MACHINE\SOFTWARE\OEM\VoiceCommand
  • Modify the string marked "path" from the default \Windows\SDDialer.exe to \Program Files\Voice Command\?VoiceCMD.exe
  • Now, when you press your BT headset connect button, MS Voice command will fire up and take commands through the headset. It's reponses will be played through the headset too.

Edit 18/11/06 by mikechad The new version (1.6) does not create the "path" Add a path then add the registry as above- works fine on my Orange spv M5000


How to Disable the Start Menu Animation

  • Go to the HKEY_LOCAL_MACHINE\SYSTEM\GWE\Menu key.
  • Set the "AniType" value data to 0 (Set to 6 to return to full animation).
  • Soft reset.

How to Enable Window Animation

  • Go to the HKEY_LOCAL_MACHINE\SYSTEM\GWE key.
  • Set the "Animate" value data to 1 (Set to 0 to return to no animation).
  • Soft reset.

Change Pocket IE to IE Version 5.5 (For Secured Sites)

  • Go to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent\ key.
  • Set the default value to "Mozilla/4.0" (Default is "Mozilla/2.0").
  • Set the "Version" value to "MSIE 5.5" (Default is "MSIE 3.02").
  • Set the "Platform" value to "Windows NT 5.0" (Default is "Windows CE").

This will only work on some secure sites that check version number rather than perform a check for support of secured transactions.

This registry hack will make Pocket Internet Explorer identify itself as IE 5.5 on Windows 2000. However it will prevent web sites that provide Pocket PC specific content to be able to know you're actually using a Pocket PC.


--Universal can't connect to Windows Server 2003--

Cant map to a Windows 2003 Server share? Is it also a Domain Controller? Check the server for
  • start / programs / administraton tools / Domain Controller Security Policy
  • Then check Local Policies / Security Options :
  • Microsoft Network Server: Digitally sign communications (always)
  • change to disabled

Allow the unsigned app from installing for everything.

  • HKEY_LOCAL_MACHINE\Security\Policies\Policies] Change value 0000101a from 0 to 1

Do a soft reset.


The next few tweaks are covered in more detail in posts under the Universal forum. Search for the key if u need details


Change the date in the Titlebar

?HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell "TBOpt"=hex:\

13,00,00,00

Change 3 as follows: 0:blank 1:time only 2:date only 3:date & time

Can someone figure out how to stop date line from being bold.

Combine this with follwoing to get a date that fits:


Set short date format to something other than the limited list provided under settings>regional

?HKEY_LOCAL_MACHINE\nls\overrides "SSDte"="d.M "

This gives 1-10 format with a space behind so that date is not cut off by OK button


Change fonts

Popup fonts:

?HKEY_LOCAL_MACHINE\System\GWE\Menu\PopFnt "Ht"dword:00000384 <-change this using a decimal editor. "Wt"=dword:000002bc "HtInPts"=dword:00000001 "CS"=dword:00000000 "It"=dword:00000000 "Nm""Tahoma"

Menubar fonts:

?HKEY_LOCAL_MACHINE\System\GWE\Menu\BarFnt "Ht"dword:00000384 "HtInPts"=dword:00000001 "CS"=dword:00000000 "Wt"=dword:000002bc "It"=dword:00000000 "Nm""Tahoma"

Change the Ht value. In a decimal editor the default is 900, and 700 works very nicely


Change system font

?HKEY_LOCAL_MACHINE\System\GDI\SYSFNT "Ht"dword:00000384 "HtInPts"=dword:00000001 "CS"=dword:00000000 "Wt"=dword:00000190 "It"=dword:00000000 "Nm""Tahoma"

As above, decimal default is 900, I find anything less actually causes some poor layout in some apps - not worth playing with too much


Ringtone settings. Best to just export ur own settings and keep the .reg file. Read BA hacks for info on what the script decodes to

?HKEY_CURRENT_USER\ControlPanel\Sounds\RingTone0 "Sound""\\Windows\\?OldPhone .wma" "?SavedSound""\\Windows\\?OldPhone .wma" "Category""Ring" "Script""apw3r"


Glyph cache size - changes refresh speed

?HKEY_LOCAL_MACHINE\System\GDI\GLYPHCACHE "limit"=dword:00002000

Change to 4000 to double default


Terminal services cache size - makes a HUGE difference to black blocks

Default state: ?HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client "Keyboard Layout"="00000409" "BitmapPersistCacheSize"=dword:00000001 "BitmapCacheSize"=dword:00000015

Set to MS recommended: ?HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client "BitmapPersistCacheSize"dword:0000000a "BitmapCacheSize"=dword:000005dc "Keyboard Layout""00000409"


Change the Dialler Skin to a pic you want!

HKLM\Security\Phone\Skin\PROGRESS\portrait\other HKLM\Security\Phone\Skin\PROGRESS\landscape\other

HKLM\Security\Phone\Skin\DIALER\portrait\other HKLM\Security\Phone\Skin\DIALER\landscape\other

value bmpNormal \Windows\BKGND_Port.bmp value bmpNormal \Windows\Bkgnd_Land.bmp

I resized the pic to the correct size and changed the keys to BKGND_Port1.bmp, rebooted.

Simple to do, and keeps your dialler in with your today screen


How can you change the home-page on your web hardware button? Simply use this key and set your favourite home-page:

?HKEY_LOCAL_MACHINE\HARDWARE\OEM\KEYBD


How long would you like the Universal keyboard to shine? 10 seconds is too short?, change the value of this key and it will shine so long as you wish! (or until the battery dies!)

?HKEY_CURRENT_USER\ControlPanel\Backlight\QKeyLedTimeout


How can I stop Active Sync from always turning-on even when it is not connected to my PC?

Go to menu->add server source->write down any server address (fake)->complete procedure then menu->schedule->switch to manually (at the top of the list)


Remove Icons from the Taskbar

To Remove Battery:

HKLM\services\power\?ShowIcon === change from 1 to 0 (zero).

NOTE: Delete the following key if it exists... if you don't, you will also lose the Power icon if you remove the ?WirelessMgr icon.
HKLM\services\power\?WaitEvent "Services/?WirelessMgr"

To Remove Screen Rotation:

HKLM\services\screenrotate\?ShowIcon === change from 1 to 0 (zero)

To Remove the Wireless connection manager

HKEY_LOCAL_MACHINE\Services\?WirelessMgr\keep and change the DWORD Keep to 0, soft-reset

If you remove all three icons, taskbar will be removed and more space on today screen.


To be able to edit the Messenger notifications you should add this keys:

?HKEY_CURRENT_USER\ControlPanel\Notifications\{A877D65E-239C-47a7-9304-0D347F580408}

"Options"=dword:00000008

Default="Messenger: Contact Online"

"Wave"="notify"

"Duration"=dword:00000000

?HKEY_CURRENT_USER\ControlPanel\Notifications\{A877D65F-239C-47a7-9304-0D347F580408}

"Options"=dword:00000008

Default="Messenger: New Message"

"Wave"="notify"

"Duration"=dword:00000000

After adding these you can go to the Sound and Notifications control panel and customize the notification behavior.


To remove the 'You are about to go online' box whenever you open PIE:

go to HKEY_LOCAL_MACHINE/SOFTWARE/HTC here you see the key: PIEplug. just rename or delete this entire key.

Restart your device, and PIE no longer asks if you want to go online. and just goes directly to the page you want

XDADeveloperWiki - Universal_Registry

Posted by krsuncom
개발이야기2007. 8. 30. 15:15

원본은 요기

SmartPhone Tips

Source: http://67.122.16.97/lars/misc/smartphone/smartphonetips.txt

Disable Guest Mode
On the PC to disable guest mode
Open up regedit..
Start-Run-Regedit and click OK.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services

and change the value of GuestOnly registery to 0 or delete it..
-----------------------------------------

Good Software
  • A registry editor like PHMregedit or Resco's
  • Westek ClearVue suite for viewing Word, Excel, PDF, Powerpoint and Images.
  • Zsoft PTab spreadsheet program. This is a full Excel spreadsheet program.
  • O]ios ToDo List replaces the worthless task functionality with a real Outlook-like version.
  • Resco Explorer is a better file explorer
  • Orneta Notepad. A really good text editor. See also Orneta ftp.
  • TCPMP with the AAC plugin a truly amazing media player
  • FoneDB from Syware. Not currently working on the Q but an ODBC customizable database with two way sync. Data can be read by MSAccess.
  • PDASyncserver Set it up to Sync files/folders between the smartphone and PC. Unfortunately it requires a manual key press to initiate the sync after connecting the phone.

Useful registry entries/locations:

\hkey_current_user\security LockTimeout Allows you to set custom timeouts beyond 60min.
One minute is 60000. So 10 hours is 36,000,000. Long enough to lock overnight but
not be bothersome during the day.
\hkey_current_user\controlpanel Lockedtimeout Sets the amount of time the screen stays on
when the phone is locked. Default is a short 2 seconds. Browse around the Control
Panel section for lots of other useful ones.

\hkey_classes_root is where the file associations are. Look for entries like
\hkey_classes_root\xlsfile\shell\open\command or opendoc. See the existing entries and
it will be obvious how to modify them. Some programs like "%1" param.
Others just %1. Ignore .xls entries as they refer to xlsfile

No Startup Sound
\HKEY_CURRENT_USER\ControlPanel\Sounds\SystemStart \Sound
Change
\Windows\Piano.wav to \Windows\*none*

No Camera Click Sound
\HKEY_LOCAL_MACHINE\System\Pictures\Camera\OEM\Sou ndFile
Change the string/value:
\windows\shuttersound_02_secs.wav
to say:
\windows\*none*

Making the scrollbars smaller (Vert. and Horz.)

1) Go to HKey_LOCAL_MACHINE\SYSTEM\GWE\
2) Adjust the following values
cyHScr : Horizontal Scrollbars
Height in pixels (default is 6, set it to 3)
cxVScr : Vertical Scrollbars
Width in pixels (default is 6, set it to 3)
3) Soft-reset

Speed hack

1) Navigate to HKEY_LOCAL_MACHINE\SYSTEM\GDI\GLYPHCACHE
-> change limit from 16384 to 32768

2) Navigate to HKEY_LOCAL_MACHINE\SYSTEM\STORAGEMANAGER\FATFS
-> change cachesize to 4096

To free up memory

To free up a bunch of memory on your phone perform the following to move the Cache, Cookies, and History to your storage card. After doing so, you must use that storage card when using Pocket Inernet Explorer. You can however create the same folders on each memory card that you use.
Step 1.
Using File Explorer in ActiveSync or the File Manager on your smartphone, create the following folders on the root of your Storage Card.

\ietemp\cache
\ietemp\cookies
\ietemp\history

Step 2.
Fire up the registry editor on your phone and navigate to the following key.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

You will need to edit the following values.

Cache Change Value Data to \Storage Card\ietemp\cache
Cookies Change Value Data to \Storage Card\ietemp\cookies
History Change Value Data to \Storage Card\ietemp\history

Reboot your phone.

Step 2.
Next, fire up your File Manager and navigate to \Windows\Profiles\Guest and delete the \cache, \cookies, and\history, folders.

If they do not delete then double check your regedits. To verify that it is working, visit a website with PIE and then check your new folders on the storage card for contents.


Move Email and Attachments to Storage Card

Written by Tony Leone
Monday, 16 January 2006
You can free up even more memory on your phone by moving all of your downloaded mail and attachments to your Storage Card.
Step 1.
Using the file manager in activesync, create the following folders on your Storage Card.

\MAPI
\MAPI\ATTACHMENTS
(You can actually name them whatever you want, "Inbox" for example.)

Step 2. Now browse to \Windows\Messaging (SmartPhone) or \Windows\MAPI (PocketPC)
If you want to save all of your existing mail, move everything in this directory to the new ones on your Storage Card.

Step 3. Now fire up your registry editor and navigate to the following.

[ HKEY_CURRENT_USER\Software\Microsoft\MAPI ]
Then create the following keys.
"AttachPath" (Value)= \Storage Card\MAPI\Attachments
"PropertyPath" (Value)= \Storage Card\MAPI
Step 4. Reboot your phone and then goto your inbox. If you can see all of your mail then mission accomplished. Double check your attachments as well.


Page Up and Page Down in IE

Key mapping for "Page Up" and "Page Down" in Internet Explorer

1. Open your favorite registry editor then navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer

2. Create a new key 'KeyMaps' (without the quotes)

3. Under KeyMaps, create 2 new DWORD values:

50 with a value data 1 (this will make key "2" Page Up)

56 with a value data 2 (this will make key "8" Page Down)

I created 2 more DWORD values:

52 with a value date 5 (this will make key "4" Page Left)

54 with a value date 6 (this will make key "6" Page Right)

The key name is the keycode you want. 50 = Key 2, 56 = Key 8, 52 = Key4, and 54 = Key 6.

Other DWORD values available are:

1 - Page Up
2 - Page Down
3 - Top
4 - Bottom
5 - Left
6 - Page Rignt
7 - Horizontal Top
8 - Horizontal Down
9 - Default Layout
10 - Desktop Layout
11 - One Column Layout
12 - Full Screen Toggle
13 - Show Pictures Toggle

Keycodes Values for 0-9: 48='0', 49='1', 50='2', 51='3', 52='4', 53='5', 54='6', 55='7', 56='8', 57='9'.

4. Exit registry editor once you have mapped it to your favorite keys.
I use:
49 3, 50 1, 52 5, 54 6, 55 4, 56 2, 69 1, 70 6, 83 5, 87 3, 88 2, 90 4

CREDIT: Gadget & the fine people at modaco.com forums

69 with a value data 1 (this will make key "E or 2" Page Up)

70 with a value data 6 (this will make key "F or 6" Page Right)

83 with a value date 5 (this will make key "S or 4" Page Left)

88 with a value date 2 (this will make key "X or 8" Page Down)

Adding Password Protection Before Using Data Connection

\HKEY_LOCAL_MACHINE\COMM\ConnMgr\Providers(7C4B7A38-5FF7-4BC1-80F6-5DA7870BB1AA)Connections

If you want it to require you to put a password in when you login on to the internet d the following: inside the broadband and express folder change requirepw from 0 to 1, it will require u to put in a password. Perform the same action in the following Keys.

&
\HKEY_LOCAL_MACHINE\COMM\ConnMgr\Providers(EF0974C-4C98FF6-AEF805DC0E8E)VZW BROWSER
&
HKEY_LOCAL_MACHINE\SOFTWARE\MOTOROLA\MMS\PROFILES\VZW MMS

CREDIT: grigsby1

SmartPhone Tips

Posted by krsuncom
개발이야기2007. 8. 30. 14:43

원본 : 요기

USE SD Card as My Documents Folder

This hack isn't very practical for people which swaps SD cards on and off frequently.

Open the key HKLM\System\?StorageManager\Profiles\SDMemory and change the value of the string "Folder" to "My documents". Be sure to close all documents and copy the original My Documents content to the SD card. Remove or rename the Old 'My Documents' out of the way and soft-reset. It might happen that another 'My Documents' folder is created and the SD shows up as 'My Documents 2'. just delete the just created 'My Documents', and remove and reinsert the SD card.

XDADeveloperWiki - BA_Hacks_WM5

Posted by krsuncom
개발이야기2007. 8. 30. 14:37

유용한 정보가 될것같다 : 원본은 요기

Popular Reg Tweaks


Here's a list of some of the more popular reg tweaks taken from my Longhrn 4015 theme:

Quote:

[RegData] ; registry key list
HKLM,Software\Microsoft\Splash Screen, CarrierBitmap,, \Storage\Longhorn\boot2.gif
HKLM,Software\Microsoft\Splash Screen, CarrierShutdownBitmap,, \Storage\Longhorn\boot2.gif
HKLM,Software\Microsoft\Splash Screen, MSBitmap,, \Storage\Longhorn\boot1.gif
HKLM,Software\Microsoft\Splash Screen, MSShutdownBitmap,, \Storage\Longhorn\boot1.gif
HKLM,Software\Microsoft\Windows Media Player\Parameters,SkinDir,,"\Storage\WMP\"
HKLM,Software\Microsoft\Windows Media Player\Parameters,SkinFile,,wmplayer.skn
HKLM,Software\Microsoft\Shell\Rai\:CallAlert, BKBitmapFile,,\Storage\Longhorn\call.gif
HKLM,Software\Microsoft\Shell\Rai\:ErrorBox, BKBitmapFile,, \Storage\Longhorn\exclamation.gif
HKLM,Software\Microsoft\Shell\Rai\:ExclamationBox, BKBitmapFile,, \Storage\Longhorn\exclamation.gif
HKLM,Software\Microsoft\Shell\Rai\:InformationBox, BKBitmapFile,, \Storage\Longhorn\information.gif
HKLM,Software\Microsoft\Shell\Rai\:QuestionBox, BKBitmapFile,, \Storage\Longhorn\question.gif
HKLM,Software\Microsoft\Shell\Rai\:VolDlg, BKBitmapFile,, \Storage\Longhorn\volume.gif
HKLM,Software\Microsoft\Shell\Rai\:MSCPROG, BannerImage,, \Storage\Longhorn\incall.gif
HKLM,Software\Microsoft\Shell\Rai\:MSCPROG, BKBitmapFile,, \Storage\Longhorn\startmenu.gif
HKLM,Software\Microsoft\Shell\Rai\:MSCdial, BannerImage,, \Storage\Longhorn\dial.gif
HKLM,Software\Microsoft\Shell\Rai\:MSCdial, BKBitmapFile,, \Storage\Longhorn\startmenu.gif
HKLM,Software\Microsoft\Shell\Rai\:MSClog, BKBitmapFile,, \Storage\Longhorn\startmenu.gif
HKLM,Software\Microsoft\Shell\Rai\:MSStart, BKBitmapFile,, \Storage\Longhorn\startmenu.gif
HKLM,Software\Microsoft\Shell\Rai\:MSCONTACTS, BKBitmapFile,, \Storage\Longhorn\contacts.gif
HKLM,Software\Microsoft\Shell\Rai\:MSSYNCAPP, BKBitmapFile,, \Storage\Longhorn\async.gif
HKCU,ControlPanel\Home, BgImage,, ""
HKCU,ControlPanel\Home, ColorScheme,, ""
HKCU,ControlPanel\Home, Scheme,, \Storage\Application Data\Home\LH2.home.xml
HKCU,ControlPanel\Sounds\SystemStart, Sound,, \Storage\Application Data\Sounds\start.wav
HKCU,ControlPanel\Sounds\SystemStart, Script,, ap
HKCU,ControlPanel\Sounds\MenuCommand, Script,, av0p
HKCU,ControlPanel\Sounds\MenuPopup, Script,, av0p
HKCU,ControlPanel\Sounds\Ringtone0, Script,, av0pr
HKCU,ControlPanel\Sounds\Ringtone0, Sound,, \Storage\Application Data\Sounds\GiveMeAReason.wav
HKCU,ControlPanel\Sounds\E-mail, Script,, av0p
HKCU,ControlPanel\Sounds\E-mail, Sound,, \Storage\Application Data\Sounds\gotmail10.wav
HKCU,ControlPanel\Sounds\SMS, Script,, av0p
HKCU,ControlPanel\Sounds\SMS, Sound,, \Storage\Application Data\Sounds\gotmail10.wav
HKCU,ControlPanel\Sounds\VoiceMail, Script,, av0p
HKCU,ControlPanel\Sounds\VoiceMail, Sound,, \Storage\Application Data\Sounds\gotmail10.wav
HKCU,ControlPanel\Sounds\SystemQuestion, Script,, av0p
HKCU,ControlPanel\Sounds\SystemQuestion, Sound,, \Storage\Application Data\Sounds\confirm.wav
HKCU,ControlPanel\Sounds\SystemHand, Script,, av0p
HKCU,ControlPanel\Sounds\SystemHand, Sound,, \Storage\Application Data\Sounds\BreakYourself.wav
HKCU,ControlPanel\Sounds\SystemExclamation, Script,, av0p
HKCU,ControlPanel\Sounds\SystemExclamation, Sound,, \Storage\Application Data\Sounds\BreakYourself.wav
HKCU,ControlPanel\Sounds\SystemAsterisk, Script,, av0p
HKCU,ControlPanel\Sounds\SystemAsterisk, Sound,, \Storage\Application Data\Sounds\kick_a.wav
HKCU,ControlPanel\Sounds\SystemDefault, Script,, av0p
HKCU,ControlPanel\Sounds\SystemDefault, Sound,, \Storage\Application Data\Sounds\kick_a.wav
HKCU,ControlPanel\Sounds\Warning, Sound,, \Storage\Application Data\Sounds\BreakYourself.wav
HKCU,ControlPanel\Sounds\Reminder, Script,, av0pr
HKCU,ControlPanel\Sounds\Reminder, Sound,, \Storage\Application Data\Sounds\alarm.wav
HKCU,ControlPanel\Sounds\Clock, Script,, av0pr
HKCU,ControlPanel\Sounds\Clock, Sound,, \Storage\Application Data\Sounds\alarm.wav
HKLM,SOFTWARE\Microsoft\RIL\OperatorNames, 23410,, Longhorn
HKLM,SOFTWARE\Microsoft\RIL\OperatorNames, 23433,, Longhorn
HKLM,Ident, Name,, Longhorn
HKCR,exefile,editflags,0x00010001,65536
HKLM,SOFTWARE\Microsoft\FontPath, FontPath,, \Storage\Windows\Fonts

Popular Reg Tweaks - SPV-Developers Forums

Posted by krsuncom
개발이야기2007. 8. 30. 14:24

원본: weaks and Hacks - htc

Tweaks and Hacks

Post registry and software hacks to make your TyTN do even more here.
(Obviously none of these will be supported by either HTC or your local phone service provider. Use these at your own risk.)
Registry Editors:
Mobile Registry Editor
Works with Mobile 5 though developed for older

Change Bluetooth Name Without Changing Owner Name
Normally the name of your device which is displayed when using bluetooth is the owner name.
To change this use a registry editor and browse to
\HCKU\Software\Microsoft\Bluetooth\Settings\Local Name
And change the value of the local name key to what ever you want.
THIS HAS ONLY BEEN TESTED ON MY DEVICE: IMATE JASJAM RUNNING WINDOWS MOBILE 5.0 (build 14955.2.3.0) AKU 2.3
Internet Explorer Navigation
The default behaviour for your device's four-way direction button in Pocket Internet Explorer (PIE) is to jump between hyperlinks/form fields on a web page. To change this behaviour so that the button scrolls the page left, right, up and down, use the following tweak:
\HKLM\Software\Microsoft\Internet Explorer\Navigation\4-Way Nav = 0 (DWORD decimal)
And to re-enable hyperlink/form field navigation:
\HKLM\Software\Microsoft\Internet Explorer\Navigation\4-Way Nav = 1 (DWORD decimal)
NB: You may still jump between links using Tab and Shift-Tab if your device has a built-in hardware keyboard.
WM5: Increase Performance and Speed

Boost Windows Mobile 5 performance by makeing the following changes in the registry...
[HKLM\System\StorageManager\FATFS] CacheSize = 4096 EnableCache = 1
[HKLM\System\StorageManager\Filters\fsreplxfilt] ReplStoreCacheSize = 4096
Default values for all keys are 0. Soft reset for changes to take effect.
Disable Menu Animation

Navigate to HKEY_LOCAL_MACHINE\SYSTEM\GWE\Menu, then change the value of "AniType" from 6 (default) to 0.
This disables the menu animation which helps in speeding up your PocketPC.
Change the Tap and Hold Dots Colours

1) Go to the HKLM\SOFTWARE\Microsoft\Color\ key.
2) Add a Binary value called "40" if it does not already exist.
3) Set the value to "rr gg bb 00" (RGB hex values 00 to FF so "FF 00 000 00" is Red)
SMS Settings

SMS Notification Always On
[HKEY_CURRENT_USER\Software\Microsoft\Inbox\Settings]
"SMSDeliveryNotify"=dword:00000001 ->0 to disable, 1 to enable.
Disable SMS Sent Notification
[HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Settings]
"SMSNoSentMsg"=dword:00000001 ->0 to enable, 1 to disable.
Bottom tray icons

Remove the Battery Icon:
[HKEY_LOCAL_MACHINE\Services\Power]
"ShowIcon"=dword:00000000
Remove the Wireless Manager Icon:
[HKEY_LOCAL_MACHINE\Services\WirelessMgr]
"Keep"=dword:00000000
Restore local language support for sliding keyboard after upgrade to a different language ROM

This has been reported not to work, see below for another hack
You need to create Registry value of name "Locale" and type of "String" and data of "Localization ID" within [HKEY_CURRENT_USER\ControlPanel\Keybd]
Localization IDs:
French = 040c
German = 0407
Italian = 0410
Japanese = 0411
Kazakh = 043f
Russian = 0419
Other IDs can be found here: Tweaks and Hacks - htcwikihttp://www.microsoft.com/globaldev/reference/winxp/xp-lcid.mspx.
Some versions of the OS seem to be case sensitive on this value, and if it does not work, try upper case letters. Registry example for say russian kbd:
[HKEY_CURRENT_USER\ControlPanel\Keybd]
"Locale"="0419"
Modification to keyboard hack. The above solution does not work for the Hermes the following new settings are required.

Goto the following registry entry
[HKEY_LOCAL_MACHINE\Software\Oem\Qwerty]
There is a key called 'Layout' and it is in Decimal.
The default value of English ROM is 20409, and Chinese ROM is 20404 (both are in hexadecimal).
The suitable value for German Hermes keyboard is 20407 (132103 in decimal).
Probably Hermes use 20+country ID (409=WWE, 407=German, 404=Trad. Chinese, etc...) format for keyboard layout value.

The above settings does not work with the latest Hermes firmware, the following is required.

[HKEY_CURRENT_USER\keyboard layout\Preload]
"Default"="e0010414"
[HKEY_CURRENT_USER\keyboard layout\Preload\1]
"Default"="e0010414"
[HKEY_LOCAL_MACHINE\Software\Oem\Qwerty]
"Layout"="132116"
The last setting is the same as in the above solution
These settings are for Norwegian keyboard, country code : 0414
Tested on fw. 1.31.502.1
Improve BT A2DP sound quality

[HKLM/Software/Microsoft/Bluetooth/A2DP/Settings]
Add new dword, Value name=BitPool; Value data=48 (Decimal)
Modify, Value name=UseJointStereo; Value data=0 (Decimal, Originally 1)
For BitPool:
Microsoft suggests the following bitpool values for optimal buffer sizes.
30 - Low audio quality
40 - Medium audio quality
48 - High audio quality
58 - Excellent audio quality
Chose one you like. I think 48 is good enough.
For UseJointStereo: use 0 instead of 1, then you got the real stereo.
Show Network Operator Name in today screen

Restoring Today Item: WiFi, BT and Phone Connection Status
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Today\Items] Create "Wireless" use Key "Flags"=dword:00000000
"Options"=dword:00000000
"DLL"="netui.dll"
"Order"=dword:00000000
"Enabled"=dword:00000001
"Type"=dword:00000004
  • Enable clicking on the today plugin above open Comm Manager
[HKEY_LOCAL_MACHINE\ControlPanel\WrlsMgr] Create key "Redirect" "Redirect"= "\Windows\CommManager.exe"
Restore clock on top bar

[HKLM\Software\Microsoft\Shell\]
"ShowTitleBarClock"=1 (enable)
"ShowTitleBarClock"=0 (disable)
PocketIE Cache in storage card

Create these folders:
\Storage Card\Pocket IE\Temporary Internet Files
\Storage Card\Pocket IE\Cookies
\Storage Card\Pocket IE\History
Add the following registry keys, string data type:
[HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"Cache"="\Storage Card\Pocket IE\Temporary Internet Files"
"Cookies"="\Storage Card\Pocket IE\Cookies"
"History"="\Storage Card\Pocket IE\History"
Disable flashing service LEDs

[HKLM\Drivers\BuiltIn\AllLEDMgr]
"Index"=0 Note! Disables vibrating.
Adding disconnect GPRS/UMTS button

To add Disconnect button and a timer display showing how long GRPS is in use for the session: HKLM\ControlPanel\Phone\Flags2 = 16 (DWORD decimal) To have only Disconnect button: HKLM\ControlPanel\Phone\Flags2 = 8 (DWORD decimal) To disable both the Disconnect button and the timer: HKLM\ControlPanel\Phone\Flags2 = 0 (DWORD decimal)
Disable annoying beeps when changing in-call volume

There are actually 3 different sounds in play here: the one at the bottom end of the slider (quietest), the one in the middle posisitions (standard), and the one at the top end of the slider (loudest). These are handled by 3 registry keys: HKCU\ControlPanel\Sounds\LoudestInCallVolume
HKCU\ControlPanel\Sounds\QuietestInCallVolume
HKCU\ControlPanel\Sounds\StandardInCallVolume Within each of these keys the default 'Script' value is 'p' for 'play', change the 'Script' value to blank (erase the 'p').
Change ringtone/vibrate/LED flash characteristics

If you would like more control over how your device rings/vibrates/flashes its LEDs on events, you can can change the Script values of these events.
For example, for an incoming call performing 'activate device, play ringtone, wait 3 seconds, repeat':
HKCU\ControlPanel\Sounds\RingTone0\Script = "apw3r" (REG_SZ string, no quotes)
For performing 'active device, set volume to 33%, play ringtone, set volume to 67%, play ringtone, set volume to 100%, play ringtone (no repeat)':
HKCU\ControlPanel\Sounds\RingTone0\Script = "ac33pc67pc100p" (REG_SZ string, no quotes)
The following are the full codes available to you.
Please note that all the codes are executed simultaneously except after a ringtone play / wait code. E.g. 'v1p' will vibrate and play at the same time, while vibrating for 1 second. But 'pv1' will play the ringtone through all the way first, then start vibrating for 1 second. a = activate device
cN = set volume to N in percentage max volume
fN = flash notification LED for N seconds
p = play ringtone. Note that this will play the ringtone all the way through before continuing with the next code.
r = repeat. Note that this should be the last code in your Script string, if used at all. The repeat will be from the most recent a. So: v3apr will vibrate once then repeat the ring signal.
vN = vibrate for N seconds
wN = wait for N seconds. Note that the device will wait this long before continuing with the next code.

Tweaks and Hacks - htc

'개발이야기' 카테고리의 다른 글

SmartPhone Tips  (0) 2007.08.30
블랙잭에서 SD를 내문서로 사용하기  (0) 2007.08.30
Popular Reg Tweaks - SPV-Developers Forums  (0) 2007.08.30
Virtual-Key Codes  (4) 2007.08.29
Opera 8.60 for PPC 관련 팁  (0) 2007.08.28
Accessing the Internet by E-mail FAQ  (3) 2007.08.18
Posted by krsuncom
개발이야기2007. 8. 29. 13:45

 

Virtual-Key Codes

Send Feedback

The following table shows the symbolic constant names, hexadecimal values, and keyboard equivalents for the virtual-key codes used by the Microsoft Windows CE operating system. The codes are listed in numeric order. You can combine any of the codes with a modifier key to create a hot key.

Virtual key codes

Symbolic constant
Hexadecimal value
Mouse or keyboard equivalent

VK_LBUTTON
01
Left mouse button

VK_RBUTTON
02
Right mouse button

VK_CANCEL
03
Control-break processing

VK_MBUTTON
04
Middle mouse button on a three-button mouse

0507
Undefined

VK_BACK
08
BACKSPACE key

VK_TAB
09
TAB key

0A0B
Undefined

VK_CLEAR
0C
CLEAR key

VK_RETURN
0D
ENTER key

0E0F
Undefined

VK_SHIFT
10
SHIFT key

VK_CONTROL
11
CTRL key

VK_MENU
12
ALT key

VK_PAUSE
13
PAUSE key

VK_CAPITAL
14
CAPS LOCK key

1519
Reserved for Kanji systems

1A
Undefined

VK_ESCAPE
1B
ESC key

1C1F
Reserved for Kanji systems

VK_SPACE
20
SPACEBAR

VK_PRIOR
21
PAGE UP key

VK_NEXT
22
PAGE DOWN key

VK_END
23
END key

VK_HOME
24
HOME key

VK_LEFT
25
LEFT ARROW key

VK_UP
26
UP ARROW key

VK_RIGHT
27
RIGHT ARROW key

VK_DOWN
28
DOWN ARROW key

VK_SELECT
29
SELECT key

2A
Specific to original equipment manufacturer

VK_EXECUTE
2B
EXECUTE key

VK_SNAPSHOT
2C
PRINT SCREEN key

VK_INSERT
2D
INS key

VK_DELETE
2E
DEL key

VK_HELP
2F
HELP key

3A40
Undefined

VK_LWIN
5B
Left Windows key on a Microsoft Natural Keyboard

VK_RWIN
5C
Right Windows key on a Microsoft Natural Keyboard

VK_APPS
5D
Applications key on a Microsoft Natural Keyboard

5E5F
Undefined

VK_NUMPAD0
60
Numeric keypad 0 key

VK_NUMPAD1
61
Numeric keypad 1 key

VK_NUMPAD2
62
Numeric keypad 2 key

VK_NUMPAD3
63
Numeric keypad 3 key

VK_NUMPAD4
64
Numeric keypad 4 key

VK_NUMPAD5
65
Numeric keypad 5 key

VK_NUMPAD6
66
Numeric keypad 6 key

VK_NUMPAD7
67
Numeric keypad 7 key

VK_NUMPAD8
68
Numeric keypad 8 key

VK_NUMPAD9
69
Numeric keypad 9 key

VK_MULTIPLY
6A
Multiply key

VK_ADD
6B
Add key

VK_SEPARATOR
6C
Separator key

VK_SUBTRACT
6D
Subtract key

VK_DECIMAL
6E
Decimal key

VK_DIVIDE
6F
Divide key

VK_F1
70
F1 key

VK_F2
71
F2 key

VK_F3
72
F3 key

VK_F4
73
F4 key

VK_F5
74
F5 key

VK_F6
75
F6 key

VK_F7
76
F7 key

VK_F8
77
F8 key

VK_F9
78
F9 key

VK_F10
79
F10 key

VK_F11
7A
F11 key

VK_F12
7B
F12 key

VK_F13
7C
F13 key

VK_F14
7D
F14 key

VK_F15
7E
F15 key

VK_F16
7F
F16 key

VK_F17
80H
F17 key

VK_F18
81H
F18 key

VK_F19
82H
F19 key

VK_F20
83H
F20 key

VK_F21
84H
F21 key

VK_F22
85H
F22 key

(PPC only) Key used to lock device.

VK_F23
86H
F23 key

VK_F24
87H
F24 key

888F
Unassigned

VK_NUMLOCK
90
NUM LOCK key

VK_SCROLL
91
SCROLL LOCK key

VK_LSHIFT
0xA0
Left SHIFT

VK_RSHIFT
0xA1
Right SHIFT

VK_LCONTROL
0xA2
Left CTRL

VK_RCONTROL
0xA3
Right CTRL

VK_LMENU
0xA4
Left ALT

VK_RMENU
0xA5
Right ALT

BA-C0
Specific to original equipment manufacturer; reserved. See following tables.

C1-DA
Unassigned

DB-E2
Specific to original equipment manufacturer; reserved. See following tables.

E3 – E4
Specific to original equipment manufacturer

E5
Unassigned

E6
Specific to original equipment manufacturer

VK_PACKET
E7
Used to pass Unicode characters as if they were keystrokes. If VK_PACKET is used with SendInput, then the Unicode character to be delivered should be placed into the lower 16 bits of the scan code. If a keyboard message is removed from the message queue and the virtual key is VK_PACKET, then the Unicode character will be the upper 16 bits of the lparam.

E8
Unassigned

E9-F5
Specific to original equipment manufacturer

VK_ATTN
F6
ATTN key

VK_CRSEL
F7
CRSEL key

VK_EXSEL
F8
EXSEL key

VK_EREOF
F9
Erase EOF key

VK_PLAY
FA
PLAY key

VK_ZOOM
FB
ZOOM key

VK_NONAME
FC
Reserved for future use

VK_PA1
FD
PA1 key

VK_OEM_CLEAR
FE
CLEAR key

VK_KEYLOCK
F22
Key used to lock device

Original equipment manufacturers should make special note of the VK key ranges reserved for specific original equipment manufacturer use: 2A, DBE4, E6, and E9F5.

In addition to the VK key assignments in the previous table, Microsoft has assigned the following specific original equipment manufacturer VK keys.

Symbolic constant
Hexadecimal value
Mouse or keyboard equivalent

VK_OEM_SCROLL
0x91
None

VK_OEM_1
0xBA
";:" for US

VK_OEM_PLUS
0xBB
"+" any country/region

VK_OEM_COMMA
0xBC
"," any country/region

VK_OEM_MINUS
0xBD
"-" any country/region

VK_OEM_PERIOD
0xBE
"." any country/region

VK_OEM_2
0xBF
"/?" for US

VK_OEM_3
0xC0
"`~" for US

VK_OEM_4
0xDB
"[{" for US

VK_OEM_5
0xDC
"\|" for US

VK_OEM_6
0xDD
"]}" for US

VK_OEM_7
0xDE
"'"" for US

VK_OEM_8
0xDF
None

VK_OEM_AX
0xE1
AX key on Japanese AX keyboard

VK_OEM_102
0xE2
"<>" or "\|" on RT 102-key keyboard

For East Asian Input Method Editors (IMEs) the following additional virtual keyboard definitions must be observed.

Symbolic constant
Hexadecimal value
Description

VK_DBE_ALPHANUMERIC
0x0f0
Changes the mode to alphanumeric.

VK_DBE_KATAKANA
0x0f1
Changes the mode to Katakana.

VK_DBE_HIRAGANA
0x0f2
Changes the mode to Hiragana.

VK_DBE_SBCSCHAR
0x0f3
Changes the mode to single-byte characters.

VK_DBE_DBCSCHAR
0x0f4
Changes the mode to double-byte characters.

VK_DBE_ROMAN
0x0f5
Changes the mode to Roman characters.

VK_DBE_NOROMAN
0x0f6
Changes the mode to non-Roman characters.

VK_DBE_ENTERWORDREGISTERMODE
0x0f7
Activates the word registration dialog box.

VK_DBE_ENTERIMECONFIGMODE
0x0f8
Activates a dialog box for setting up an IME environment.

VK_DBE_FLUSHSTRING
0x0f9
Deletes the undetermined string without determining it.

VK_DBE_CODEINPUT
0x0fa
Changes the mode to code input.

VK_DBE_NOCODEINPUT
0x0fb
Changes the mode to no-code input.

Original equipment manufacturers should not use the unassigned portions of the VK mapping tables. Microsoft will assign these values in the future. If manufacturers require additional VK mappings, they should reuse some of the current manufacturer-specific and vendor-specific assignments.

See Also

Using Virtual-Key Codes | Manufacturer-specific Virtual-Key Codes

Virtual-Key Codes

Posted by krsuncom
개발이야기2007. 8. 28. 12:47

원본 : Opera 8.60 for PPC 

Guide for Opera for Pocket PC by ResearchWizard

your web, your choice

goto index

[logo]

View with Opera!

Guide for Opera 8.60 for Windows Mobile, Pocket PC


collected by ResearchWizard

[logo]

Change log

11. September 2006 - Version 1: initial version

content

  1. introduction
  2. general
  3. view modes and screen width
  4. transfer bookmarks
  5. customize Opera Mobile
  6. Opera files and main memory
  7. links
  8. off topic: free software for PPC

introduction

[logo]

This is my collection of tips and hints towards Opera 8.60 for Windows Mobile, Pocket PC (in the following text called Opera Mobile).

Please provide feedback towards the tips and additional solutions with a post in the >>> forum thread ... <<< For general feedback not related to the tips (smilies, praise, resentment, pagedesign etc) please leave a >>> comment in my blog  <<<

If you have a problem not related to the tips in this guide please search the >>> Forum for Opera Mobile <<< and start your own post if it is a new topic. Or you can provide feedback in this >>> thread for Opera Mobile 8.6 <<<

This presentation is based on a template generated with Opera Show Generator 1.0. I added the content as XHTML using the German (X)HTML-text-editor Scribe! and I tweaked the CSS a little bit. Choose Opera, press F11 and enjoy :-)

The text should be well readable in any browser, but only Opera is capable of all the goodies. Besides projection especially print layout is really nice in Opera. Firefox manages at least the numbering. Don't ask about stupid IE (but it should be no problem to just read the text).

General

  • Help pages are on the lower half of the start page
  • Edit your startpage (start.html) to get fast access to top links
  • There is no menu Edit but context menus (click and hold) and default Windows shortcuts on (virtual) keyboard work as well
  • Exit Opera: Menu-Tools-Exit, STRG+Q on (virtual) keyboard, automatically by Windows Mobile, via task manager, with reset

General

  • Opera:cache (in the adress-bar) shows the content of the cache, Opera:history the links in history (Action - Go to - History is displayed different) and Opera:about shows the version
  • Save images (yet there is not built in feature): View the images in \Application Data\Opera\cache4 with an image viewer and copy files with a file explorer (easier with cleared cache).
  • There are some bookmarklets working with Opera Mobile, e.g. disable external CSS, see Mayo Kyomoto's (borbis) blog
  • There is no Flash support yet, but there is hope

View modes

Fit to width on Opera Mobile is an automatic mode switching between Small Screen Rendering (SSR, Shift+F11 on Desktop Opera) and Medium Screen Rendering (MSR, Fit to width on Desktop Opera) depending on screen width.

  • QVGA(320x240px)-Portrait + Fit to width =SSR=One Column View
  • Landscape or VGA(640x480px)-Portrait + Fit to width = MSR
  • Menu - Display - Desktop = Desktop Screen Rendering
    (with horizontal scrollbars)
  • Menu - Display - One Column forces Small Screen Rendering

Using Zoom can change the behaviour of fit to width. An explicit media=handheld CSS with the page will probably switch to SSR.

With the setting Fit to width on my iPAQ (QVGA 320*240px) in portrait mode SSR is used (I could force Desktop view with the setting View - Desktop) and switching to landscape mode MSR is used (I could force SSR with the setting View - One Column).

Transfer Bookmarks

Opera Mobile and Desktop Opera use almost the same bookmark format. Import and export work fluently with one visible difference:

(Re-)Importing bookmarks into Desktop Opera will lead to "=" in front of the bookmarks name: "=Opera homepage" instead of "Opera homepage". Opera Mobile makes "==" out of a single "=".

Exporting bookmarks from Desktop Opera and use them in Opera Mobile works without drawbacks. You can export (all or selected, see 3+4 on next slide) bookmarks from Desktop Opera and replace opera6.adr in \Application Data\Opera\

You can try third party tools like the Bookmark Manager or Bookmarkbridge, but there are more difficulties besides "==": no direct file-access via ActiveSync, Opera Mobile has to be closed and there are no entries for icon and last visited.

How to import bookmarks from Pocket IE

  1. Copy [mobile device]\Windows\Favorites to a desktop folder
  2. Import this folder to Desktop Opera (optional: organizing)
  3. Menu: Bookmarks - Manage bookmarks - (select bookmarks) - right click: File - Save selected as
  4. Copy the generated opera6.adr to \Application Data\opera\

The procedure should be pretty similar to import bookmarks from other browsers.

Step by step instructions are in the handout to this slide (not visible in projection mode).

Step by step instructions to transfer bookmarks from PIE

All following steps use Desktop Windows, with access to the mobile device in Windows Explorer with Active Sync:

  1. Windows Explorer: copy the folder with the Favorites from PIE [mobile device]\Windows\Favorites to any place on your Desktop PC (you have to remember it, for example you can copy it to the Desktop)
    Alternative: if you synchronize your Favorites you can skip 1 and instead look for the place they are stored on the desktop (something like c:\documents and settings\[your user name]\favorites\mobile favorites)
  2. Desktop Opera: File - Import and Export - Import Internet Explorer Favorites - (select the folder with the PIE favorites from step 1) - OK
    Info: The bookmarks are imported into a new folder with the name "Internet Explorer Favorites" (the new folder is most probable a subfolder of the folder you have been before, e.g. in bookmark panel) and the number given is number of bookmarks + number of folders including the generated one, so if there is only one bookmark the number is 2 (one bookmark and one generated folder "Internet Explorer Favorites").
  3. Desktop Opera: Open Bookmarks Panel (e.g. Strg+2) OR Manage Bookmarks View (Menu Bookmarks - Manage Bookmarks) select the files in the imported folder "Internet Explorer Favorites" (or select all the bookmarks and folders you like to have for your Opera Mobile). Right click - file - save selected as ... (choose a place to save, keep the name opera6.adr)
    Info: If you right click directly on the folder "Internet Explorer Favorites" this folder will be an useless subfolder on your Opera Mobile (Action - Go to - Bookmarks - ("Internet Explorer Favorites" -) your bookmarks)
    Tip: Before exporting you can organize your bookmarks in Desktop Opera, import additional bookmarks from IE, Netscape/Firefox, Konqueror or another Opera installation (e.g. [mobile device]\application data\opera\opera6.adr from Opera Mobile) the same way or copy additional bookmarks from your Desktop Opera into this bookmark folder).
  4. Windows Explorer: Make a backup of your original opera6.adr on [mobile device]\application data\opera\ and copy the exported opera6.adr into this folder while Opera Mobile is closed

Index of customizations

Customizing your Opera Mobile is similar (but more limited) to customizing Desktop Opera.

Easy: Settings

  • Some important settings are in Menu - Tools - Settings
  • Help is in Menu - Tools - Help - Using the browser - Settings and History and on the default Opera Mobile startpage: Opera help - Using the browser - Settings and History (both display the same file)
  • ...

Edit your startpage

Even without knowledge of HTML you can add your favorite links to your startpage.

  • location: [mobile device]\Application Data\Opera\startpage\home.html
  • syntax: <li><a href="[link adress]">[shown name]</a></li>
  • example: <li><a href="http://mobile.opera.com/">Opera Portal</a></li>

Open home.html with an text editor (either on the PPC or copy it to your desktop computer and use e.g. notepad) and replace [link adress] (copy and paste from browser adress bar) and [shown name]. For additional links just duplicate a whole line.

Of course you can change the content and design of the whole page.

Edit the skin

You can change the icons in the skin-file like on Desktop Opera. I haven't managed to change the color for the toolbars. The colors are controlled by Windows Mobile (at least on WM2003SE) and I have no idea why there are colors defined in default skin.ini at all.

  • location: [mobile device]\Application Data\Opera\skin\ standard_skin.zip

To make your own skin see the guide for Desktop Opera. The buttons can be smaller to spare room or bigger for easier use without stylus.

More proof of concept than beautiful you can download my gray-scale_standard_skin.zip. Instructions: download and copy the file to \Application Data\Opera\skin, backup the default standard_skin and rename the new file to standard_skin.zip

Edit input.ini (1) - syntax and buttons

The input.ini of Opera Mobile is similar to keyboard.ini on Desktop Opera. The actions are defined in several sections like [Browser Widget] for actions on the web page and [WinCE Application] for actions on browser level.

  • syntax: [button OR key] = [action]
  • example: Left = Navigate left

For most PocketPCs the most useful buttons are the ones on the D-PAD: Left, Right, Up, Down and Enter. Other keys (1...9, A...Z, Tab, Space etc.) can be accessed with virtual or real (external) keyboard.

All default sections are in the handout to this slide (not visible in projection mode).

Sections in input.ini:

[Browser Widget]
for actions on web pages (page has to have focus)
Examples: Navigate down, Scroll up, Page down, Focus form
[WinCE Application]
for actions with the Opera Mobile browser application
Examples: Cycle to next window, Enter fullscreen, Open url
[Widget Container]
for actions in dialog boxes (dialog has to have focus)
Examples: Focus next radio widget, Focus previous widget
[Form]
for actions in form fields (form has to have focus)
Examples: Focus form
[Button Widget]
for actions on buttons (button has to have focus e.g. by clicking on it)
Examples: Click button
[Radiobutton Widget]
for actions on radio buttons (radio button has to have focus)
Examples: Click button
[Checkbox Widget]
for actions on checkboxes (checkbox has to have focus)
Examples: Check item
[Dropdown Widget]
for actions on dropdown lists (dropdown has to have focus)
Examples: Next item, Click button, Unfocus form
[List Widget]
for actions on lists (list has to have focus)
Examples: Next item, Click button, Unfocus form
[Edit Widget]
for actions on editable input fields (input field has to have focus)
Examples: Next character, Next line, Unfocus form

Edit input.ini (2) - actions on the page

section [Browser Widget]

  • Spacial navigation (default for D-PAD): Navigate {left|right|up|down}
  • Scrolling: Scroll {left|right|up|down}
  • Scroll Pages: Page {left|right|up|down}
  • Quick navigation on page: Go to start, Go to end
  • Quick jump to and between buttons, lists, forms etc: Focus next widget, Focus previous widget

Explanation of the syntax used here:

This is a normal notation, just for the case you don't know it:

{required}: within the braces "{" and "}" are required arguments for the function. Actually I use this notation only when there is a choice:

{either use this|or this}: the vertical bar "|" seperates two or more possible values. You can choose which one you like. Within braces you have to select one.

[optional] OR [ini-section] within the square brackets "[" and "]" are usually optional arguments. If you don't need it you just can leave it away, even if there are multiple choices (seperated by the vertical bar "|").
However with editing ini files from the Opera browser there is another meaning of the square brackets. They define sections inside the ini-files to build groups of related settings.

Edit input.ini (3) - actions for the browser

section [WinCE Application]

  • Usefull when Fit to width is active: Left=Back and Right=Forward to browse history with left and right on D-PAD
  • View modes: {Enable|Disable} {mediumscreen mode|handheld mode}, {Enter|Leave} fullscreen
  • Navigation through multiple windows (tabs): Cycle to {next window|previous window}

There are a lot of examples from Munk on aximsite (mirror on joshuateoh.com). For further actions (not all work in Opera Mobile) see this this list of commands in a forum post.

Some keyboard-settings do not work although they should, e.g.
[WinCE Application]
+ = Zoom in, 10
Enter = Enter fullscreen | Leave fullscreen

Very similar things do work like:
Z = Zoom in, 10
- = Zoom out, 10
* = Zoom to, 100.

I have no idea whether this is a bug in Opera or a limitation of Win CE (Windows Mobile).

Edit the language file

It is possible to change the language. I had success to change single words of the menu. Yesterday I didn't manage to have a complete German translation - Opera refused to start with it (I merged lng files from Opera8.54 and Opera Mobile via csv>Calc>Base>Calc>csv and translated the remaining entrys). I will search the bug and put a guide here - and of course the German language file.

  • location: [mobile device]\Application Data\Opera\english.lng

Silvio Iaccarino posted a German language file (he claims it's quick & dirty).

Advanced preferences - edit opera.ini

Some of the settings in opera.ini for Desktop Opera work in Opera Mobile. See Opera's Settings File Explained (for Desktop Opera9).

Maybe you like the suggestions from Joshua Teoh (Munk) in (1) = (2):

  • Location: \Application Data\Opera\opera.ini
  • Change in the section [User Prefs] the number of the entry Max Direct History Lines=10 to your preferred drop-down list size of the adress bar.
  • Change in the section [User Prefs] the number of the path of the entry Download Directory=\My Documents to your preferred download-path first displayed in the download window.

Index of memory topics

The more saving main memory the more tweaking is necessary.

Files (by default installed in main memory)

  • folder Application Data/Opera
    • profile files near 1 MB
      (certificates, help, ini-files, language file, skin, start page, styles, Unicode tables)
    • user files >90 kB, depending on usage
      (bookmarks, cookies, history, visited links)
    • cache default 2 MB
  • folder Program files/Opera
    • opera.exe + dll's > 5 MB

There is a description of the files used by Opera on opera.com.

Alternative storage devices for (Opera) files

internal memory card (iPAQ file store etc)

  • if corrupted they can make your whole PDA unusable
  • have limited write cycles and limited memory size

external storage cards (SD / CF etc)

  • mostly huge amount of memory (compared to built in memorys)
  • can get lost or forgotten & can be replaced easily
  • have limited write cycles

Some thoughts about flash memory are in the handout to this slide (not visible in projection mode).

Some thoughts about flash memory

Internal memory - good for exe+dlls

Internal memory like iPAQ file store is very good for opera.exe + dll's, because it couldn't get lost and its not in danger to get a lot of write cycles. Startup time will be slower compared to fast external storage cards and main memory.

Don't use build in Flash memory for cache if you want to browse on a regular basis. At least I wouldn't risk it anymore after my iPAQ main board was exchanged because of a corrupted (read only) iPAQ File Store.

External memory cards - use it for Opera's cache

Already cheap SD cards should be fast enough for most purposes. Backups and other important data is not very save on external storage devices (neither tiny storage cards nor USB-sticks) - as they easily could get lost.

External cards should be good for big cache (big reduces write cycles to the same memory cells). With slow internet connections it should be even faster than with small cache in main memory. Additionally full main memory and especially a lot of files in main memory will slow down your whole PDA - for Opera and for other applications.

With heavy usage of Opera I advice to have big enough cache and of course enough free memory for this (memory is not reserved by Opera Mobile and some applications including Opera and the OS may run into trouble when trying to write on a full memory card).

Opera Mobile with cache on a storage card and fast internet connection may be somewhat slower for surfing (you'll probably not really notice it).

About write cycles reducing live of flash memory

The granted number of write cycles on flash memory is increasing far above the former 10.000. Additionally there is a better memory management, using the least used memory cells for next write operations (I wouldn't rely too much on this, not only because of Murphy's laws. If there is only little free memory left the write cycles have to be on the reduced number of memory cells). Reaching 10.000 write cycles will take a lot of time - storage cards will be (much) bigger, faster and cheaper then (just for the case).

Where to put the Application Data files (besides cache)

The right storage of Application Data stuff depends on individual usage. There are write cycles in history and maybe cookies etc. for every (new) page visited.

On a fast storage card the data gets lost easier. In main memory on WM2003 not backuped data can be at risk due to an empty battery.

My advise
  1. If you have enough main memory it is the easiest to have Opera in the default location. I'd recommend only to move the cache to an external storage card.
  2. If you have really limited main memory and there is no other more appropriate application to uninstall from main memory I'd advice to install Opera to internal (or external) memory card and relocate the cache to an external memory card. If you want to use Opera as default browser (open local files and links from other applications in Opera) you have to edit the registry.

If you don't need to open local files and links from other applications in Opera number 2 is an about equal choice to 1.

Links

There is a very comprehensive description about optimizing storage card speed and another thread about Installing programs on Storage Card that can further guide your decision where you want to have your Opera (and other applications) store its files.

Easy: Cache settings

Reduce cache size

  • Automatic clear cache on exit (still storing files while running): Menu - Tools - Settings - History - Cache size: 1

Relocate cache (to external memory card)

  • Add in \Application Data\Opera\opera.ini under the section [User Prefs] the line Cache Directory4=[path]

On a storage card you should use a cache size much bigger than the default 2000 (2 MB) to reduce write cycles.

Drawbacks of relocating cache: 1) with a big cache the startup time of Opera Mobile may increase. 2) Do not remove the storage card with the cache while Opera Mobile is running as this may or will require a soft reset.

Starting Opera browser with cache relocated to memory card while there is no memory card in the PDA caused no trouble for me.

I couldn't find the place where the files are stored (please give me a note when you discover it).

Install program files on memory-card

It is pretty easy to install Opera Mobile outside main memory but it causes some problems:

Drawback: if you want to use Opera Mobile as standard browser on your PDA you have to fix the wrong registry entrys. Opera will probably need longer time to startup.

HowTo: 1) Download the MSI version and install it with your connected PDA via ActiveSync - just answer the question "install in default location" with selecting your storage card. Or 2) Download the CAB version and install it directly on your PDA with CabInst where you choose a path for installation on your storage card.

Install Opera completly outside Main memory (nearly)

Besides the steps from the former page you can relocate nearly the complete folder Application Data\Opera by manually moving the files and editing the paths in opera.ini

See guide from Werner Ruotsalainen (Menneisyys) to completely relocate Opera Mobile or just move the complete folder \Application Data\Opera except english.lng, input.ini and the (empty) skins subdirectory to a (subfolder on a) storage card and edit the paths in opera.ini from \Application Data\Opera\ to the new path.

Drawback: you have to do this manually with every reinstall or update of Opera Mobile. Opera may be slower.

Fix registry when Opera is installed outside main memory

Opera Mobile installer has a bug: if it is installed outside main memory there are wrong entries in the registry and you can not open local files and links from other applications in Opera (Opera as default browser).

HowTo: 1) Post with a list of the registry entrys or 2) Guide to completely relocate Opera Mobile (same as on previous page) or 3) After setting Opera as standard browser you can use (free) PHM Registry Editor, search for the string "Opera" and replace the paths (and images).

Tip: you can also reassign PIE bookmarks towards Opera by changing the urlfile entries in the registry.

Caution: you can completly mess your PDA (requires Hard Reset).

Because it is supposed to be only a small change in the installer this behaviour should be changed in the next minor update of Opera Mobile.

Links

official links for Opera Mobile

reviews & comparisons

Free Software for PPC - (I)

Software I use on my iPAQ rx3715 running Windows mobile 2003SE

Hint for the Games Warring States, Viking Saga and Cities: on localized versions the start links are also installed into Windows/Start Menu - you have to move it manually to the proper folder, e.g. German: Windows/Startmenü)

Free Software for PPC - (II) Tools

Opera 8.60 for PPC

Posted by krsuncom
개발이야기2007. 8. 18. 10:37

원문:  http://www.faqs.org/faqs/internet-services/access-via-email/ 

Accessing the Internet by E-mail FAQ

There are reader questions on this topic!
Help others by sharing your knowledge


Message-ID: <internet-services/access-via-email_1084363323@rtfm.mit.edu>
X-Last-Updated: 2002/04/16
From: Gerald E. Boyd <gboyd@expita.com>
Newsgroups: alt.internet.services, alt.online-service, alt.bbs.internet, 
comp.mail.misc, news.newusers.questions
Subject: Accessing the Internet by E-mail FAQ
Summary: This guide will show you how to explore the World Wide Web,
          retrieve files from FTP sites, and even access Usenet
          newsgroups using E-MAIL AS YOUR ONLY TOOL.
Date: 12 May 2004 12:03:01 GMT

Archive-name: internet-services/access-via-email
Posting-Frequency: weekly
Last-modified: 2002/04/04
Version: 10.2

         +--------------------------------------------------+
         |         Accessing The Internet By E-mail         |
         |         Guide to Offline Internet Access         |
         |          Version 10.2 - April 04, 2002           |
         +--------------------------------------------------+

               Copyright (c) 1999-2002, Gerald E. Boyd
                          gboyd@expita.com

       All rights reserved. Permission is granted to duplicate and
       distribute copies of this document provided the copyright
       notice and this permission notice are preserved on all copies.


A Brief History
---------------

Accessing The Internet By E-mail or originally known as "Doctor Bob's
Guide to Offline Internet Access" was the brainchild of Bob Rankin (a
great net guy) who started it up in 1994.  He kept it up about 5 years
before passing it to me in January 1999, when it became apparent he was
too busy with other projects (Internet Tourbus, writing, etc.) to
continue maintaining it.

In October 1997 I had taken over the moderator duties of the ACCMAIL
mailing list (which is used to further develop ideas expressed in this
FAQ) and started a web page based on this FAQ. I guess he figured I was
the logical person to take over the FAQ. Hmmm!

So there you go.


How to Access Internet Services by E-mail
-----------------------------------------

If you don't have direct access to the Internet through your BBS or
online service, you're not alone.  Many of the world's countries with
Internet connections have only e-mail access to this world-wide network
of networks.

But if you think that sounds limiting, read on.  You can access almost
any Internet resource using e-mail.  Maybe you've heard of FTP, Gopher,
Jughead, Usenet, Finger, Whois, Nslookup, Traceroute, and the World-Wide
Web but thought they were out of your reach because you don't have a
direct connection.

Not so!  You can use simple e-mail commands to do all of this and much
more on the Internet.  And even if you do have full Internet access,
using e-mail services can save you time and money.  If you can send a
note to an Internet address, you're in the game.

I encourage you to read this entire document first and then go back and
try out the techniques that are covered.  This way, you will gain a
broader perspective of the information resources that are available, an
introduction to the tools you can work with, and the best methods for
finding the information you want.


Recent Changes To This Document
-------------------------------

10.2 web2mail signup address changed,ISPs be e-mail web page changed,
      Webster dictionary lookup address changed,
      ADD PDF CONVERSIONS BY EMAIL,
      wwwfmail_pro@wwwfetch.com DEFUNCT, jiscmail address change,
      translate@leo.org (German - English translation service) DEFUNCT
      mailandnews.com DEFUNCT as of 28Feb02,
      query@ncbi.nlm.nih.gov DEFUNCT as of 15Apr02,
      Revised FTP upload by e-mail help addresses,
      Geocities mirror DEFUNCT
10.1 revised finger; coke@cs.cmu.edu and copi@oddjob.uchicago.edu
      DEFUNCT, revised GAMES BY EMAIL win@yoyo.com DEFUNCT,
      added NUMBER SEQUENCES. MICROSOFT KNOWLEDGE BASE defunct by
      e-mail methods Mar01, mail2news@zedz.net now mail2news@dizum.com,
      GENE SPLICING AND SEQUENCE ANALYSIS via grail@ornl.gov DEFUNCT,
      BABEL revised retrieval intructions
      grabpage.com is now grabpage.org

Finding the Latest Version
--------------------------

This document is now available from several automated mail servers.
To get the latest edition, send e-mail to one of the addresses below.

To: mail-server@rtfm.mit.edu (for US, Canada & South America)
Enter only this line in the BODY of the note:
    send usenet/news.answers/internet-services/access-via-email

To: jiscmail@jiscmail.ac.uk (for Europe, Asia, etc.)
Enter only this line in the BODY of the note:
    get lis-iis\e-access-inet.txt

You can also use this autoresponder address, send blank e-mail
To: accmail-faq@expita.com

You can also get the file by anonymous FTP at one of these sites:

Site: rtfm.mit.edu
    get pub/usenet/news.answers/internet-services/access-via-email
Site: ftp.mailbase.ac.uk
    get pub/lists/lis-iis/files/e-access-inet.txt

Or on  he Web in HTML format at:
    http://www.faqs.org/faqs/internet-services/access-via-email/

Much of the material in this FAQ is covered in more detail on the
following web pages:
    http://www.expita.com/howto1.html
    http://www.expita.com/howto2.html
    http://www.expita.com/howto3.html


Before You Write...
-------------------

Please make sure you have the latest version of this guide before
writing to the author with questions and updates.  Don't give up too
quickly on the busy e-mail servers, and if you get an error message, try
your request again on a different day or time.  If you'd like to keep up
with the latest updates and announcements of new versions, send the
command:

    SUBSCRIBE ACCMAIL Firstname Lastname

in the BODY of a message to the address "LISTSERV@LISTSERV.AOL.COM".  In
fact, the ACCMAIL list is a great place to ask any questions you have
about this guide.  You're likely to get a quicker response from one of
the list subscribers, because the author gets several hundred messages
per day!


Other Translations of This Document
-----------------------------------

Several readers have graciously volunteered to translate this text into
languages other than English.  Please contact the author if you would
like to assist in the translation of this document into another
language.  The list below shows the status of the translation work that
has been done or is in progress.  To obtain any of the completed texts,
send e-mail

To: accmail.xx@expita.com (autoresponder address)
    (where "xx" is the country as shown below)

NOTE: All translations earlier than Version 8 have been deleted due
       to them being too far out of date.

  Translation             Filename     Translation             Filename
  ----------------------- ----------   ----------------------- ----------
  Chinese GB (8th Ed.)    accmail.gb   Italian (8th Ed.)       accmail.it
  Dutch (8th Ed.)         accmail.nl   Romanian (8th Ed.)      accmail.ro
  Farsi (8th Ed.)         accmail.ir   Russian (10th Ed.)      accmail.ru
  German (9th Ed.)        accmail.de   Spanish  (8th Ed.)      accmail.sp
  Hungarian (10th Ed.)    accmail.hu   Swedish (9th Ed.)       accmail.se
  Indonesian (8th Ed.)    accmail.id   Urdu (8th Ed.)          accmail.pk

NOTE: Your "accmail.xx@expita.com" request MUST be in the ADDRESS line!


Acknowledgements
----------------

This document is continually expanding and improving as a result of the
daily flood of comments and questions received by the author.  The
following individuals are hereby recognized for their work in
translating "Accessing" to various languages.  (If I forgot anyone, let
me know and I'll gladly add you to the list.)

   Bulgarian - Kolcho Kovachev          Italian - cromatis@ecn.org
   Catalan - Ricard Forner              Japanese - Komatsu Toshiki
   Chinese Big5 - Ju-En Teng            Lithuanian - Darius Matuliauskas
   Chinese GB - Li Ying                 Norwegian - Vidar Sarvik
   Croatian - Zvonko Springer           Polish - Ewa Poskrobko
   Croatian - Nikola Borojevic          Polish - Krzysztof Buniewicz
   Czech - Martin Slunecko              Portuguese - Joao Neves
   Danish - Christian Schou             Romanian - Mihai Jalobeanu
   Dutch - Berry Van Hombeeck           Russian - Sergey Ivanov
   Esperanto - Martin Weichert          Serbian - Brankica Kranjac
   Farsi - Mansour Dehestani Monfared   Serbian - Ivan Stamenkovic
   Farsi - Zahra Sheik                  Slovakian - Stanislav Ponca
   Finnish - Paavo Juntunen             Somali - Yassin Ismail Ali
   French - Pierre Couillard            Spanish - Bellanet Org
   German - Marc Loehrwald              Swedish - Staffan S�lve
   Greek - Grigoris Miliaresis          Thai - Boonyakiat Saengwan
   Hebrew - Ron Barak                   Ukranian - Dmitry V. Bisikalo
   Hungarian - Lajos Toldy              Urdu - M. Shahid Khaki
   Indonesian - Yohanes Nugroho


A Short Aside... "What is the Internet?"
----------------------------------------

If you're the type that wants to skip the preliminaries and just dig in,
you've come to the right place.  I'm not going to bore you with
details.  Instead, I'll just offer up my simple condensed definition of
the Internet, and encourage you to find out more as you gain skill at
using the tools described herein.

Internet (noun) - A world-wide collection of computer networks,
connecting government, military, educational and commercial
institutions, as well as private citizens to a wide range of computer
services, resources, data and information.  A set of network conventions
and common tools are employed to give the appearance of a single large
network, even though the computers that are linked together use many
different hardware and software platforms.


The Rules of The Game
---------------------

This document is meant to be both tutorial and practical, so there are
lots of actual commands and internet addresses listed herein.  You'll
notice that when these are included in the text they are indented by
several spaces for clarity.  Don't include the leading spaces when you
try these commands on your own!

You'll also see things like "<file>" or "<name>" appearing in this
document.  Think of these as place holders or variables which must be
replaced with an appropriate value.  Do NOT include the quotes or
brackets in your value unless specifically directed to do so.

Most e-mail servers understand only a small set of commands and are not
very forgiving if you deviate from what they expect.  So include ONLY
the specified commands in the Subject or body of your note, leaving off
any extraneous lines such as your signature, etc.

Unless otherwise specified, you can leave the Subject and/or body of the
note empty.  If your mail software insists on a Subject or body, just
type "XYZZY" or something equally non-sensical.

You should also ensure that you have one blank line between the note
headers and the body of your note.  And do pay attention to upper/lower
case in directory and file names when using e-mail servers.  It's almost
always important.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
SPECIAL NOTE:  The e-mail servers listed in this guide are for the most
part operated by kind-hearted volunteers at companies or universities.
If you abuse (or over-use) the servers, there's a very good chance they
will be shut down permanently.  This actually happened to several of the
e-mail servers recently, so treat them with respect.

If you have direct Internet access, let others who are less fortunate
use the e-mail servers.  Try to limit your data transfers to one
megabyte per day.  Don't swamp the servers with many requests at a
time.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


                              FTP BY EMAIL
                              ------------

FTP stands for "file transfer protocol", and is a means of accessing
files that are stored on remote computer systems (sites). Files at FTP
sites are typically stored in a tree-like set of directories (or nested
folders for Mac fans), each of which pertains to a different subject.

When visiting an FTP site using a "live" internet connection, one would
specify the name of the site, login with a userid & password, navigate
to the desired directory and select one or more files to be transferred
back to their local system.

Using FTP by e-mail is very similar, except that the desired site is
reached through a special "ftpmail server" which logs in to the remote
site and returns the requested files to you in response to a set of
commands in an e-mail message.

Using FTP by e-mail can be nice even for those with full Internet
access, because some popular FTP sites are heavily loaded and
interactive response can be very sluggish.  So it makes sense not to
waste time and connect charges in these cases.

To use FTP by e-mail, you first need a list of FTP "sites" which are the
addresses of the remote computer systems that allow you to retrieve
files anonymously (without having a userid and password on that
system).

There are some popular sites listed later in this guide, but you can get
a comprehensive list of hundreds of anonymous FTP sites by sending an
e-mail message to the internet address:

   mail-server@rtfm.mit.edu

and include these lines in the BODY of the note.

   send usenet/news.answers/ftp-list/sitelist/part1
   ... (21 lines omitted for brevity) ...
   send usenet/news.answers/ftp-list/sitelist/part23

You will then receive (by e-mail) 23 files which comprise the "FTP Site
List".  Note that these files are each about 60K, so the whole lot will
total over a megabyte!  These files haven't been updated since Nov97 but
they are still a valuable resource for FTP sites world-wide.

Another file you might want to get is "FTP Frequently Asked Questions"
which contains lots more info on using FTP services, so add this line to
your note as well:

   send usenet/news.answers/ftp-list/faq

After you receive the site list you'll see dozens of entries like this,
which tell you the site name, location and the kind of files that are
stored there.

   Site   : ftp.cs.wisc.edu
   Country: USA
   GMT    : -6
   Date   : 23-Jul-95
   Source : mail
   Alias  : fyvie.cs.wisc.edu
   Admin  : ftp@cs.wisc.edu
   Organ  : University of Wisconsin, Madison, Wisconsin, CS dept.
   Server :
   System : Unix
   URL    : ftp://ftp.cs.wisc.edu/
   Comment: server can (de)compress, tar files and directories; RoadMap
            contains list of directories; files from shorty.cs.wisc.edu
   Files  : 007; afs-tools; AIX; Approximation Theory; bolo; CDIFF;
            computer-vision; condor; connectivity table; coral; Exodus; galileo;
            ghost; goodman; HP; list-archives; machine learning; markhill;
            math prog; mcplib; Novell; par-distr-sys; paradise; shore; sohi;
            spim; spimsal; swartz; tech-reports; Ultimate Frisbee files; UW;
            warts; wisc; wwt; X; xunet

If you find an interesting FTP site in the list, send e-mail to one of
these ftpmail servers:

   ftpmail@academ.com             (United States)
   ftpmail@btoy1.rochester.ny.us  (United States)
   ftpmail@cnd.caravan.ru         (Russia) - SLOW
   ftpmail@dna.affrc.go.jp        (Japan)
   ftpmail@ftp.sunet.se           (Sweden)
   ftpmail@ftp.uni-stuttgart.de   (Germany)
   ftpmail@gu.net                 (Ukraine)
   ftpmail@ml.imasy.or.jp         (Japan)
   ftpmail@mail.iif.hu            (Hungary)
   ftpmail@mercure.umh.ac.be      (Belgium)
   ftpmail@uar.net                (Ukraine)

Note: There are other restricted-use FTPMAIL servers listed at
       http://www.expita.com/servers.html
       See the "WWW By E-mail" section for help retrieving this file.

It doesn't really matter which one you choose, but a server that is
geographically close may respond quicker.  (Please DON'T use the first
one in the list just because it's there!)  In the body of the note,
include these lines:

    open <site>
    dir
    quit

This will return to you a list of the files stored in the root directory
at that site.  See the figure below for an example of the output when
using "ftp.simtel.net" for the site name.

  +---------------------------------------------------------------------+
    total 20
    drwxr-xr-x   9 root     sys         1024 Oct 29  1999 .
    drwxr-xr-x   9 root     sys         1024 Oct 29  1999 ..
    -rw-r--r--   1 root     sys         1431 Oct 18  1999 .welcome
    -rw-r--r--   1 root     sys          731 Oct 26  1995 README.mirroring
    d--x--x--x   2 root     sys           96 Oct 27  1999 bin
    d--x--x--x   2 root     sys           96 Oct 27  1999 etc
    drwxr-xr-x   5 root     other       8192 Nov 10  1999 mir01
    drwxr-xr-x   8 root     other       8192 Jul 27  1999 mir02
    drwxr-xr-x   5 root     other       8192 Jul 27  1999 mir03
    drwxr-xr-x   6 root     other       8192 Jul 29  1999 mir04
    drwxr-xr-x   3 root     users       1024 Oct 27  1999 pub
  +---------------------------------------------------------------------+

In your next e-mail message you can navigate to other directories by
inserting (for example)

    cd pub                           (use "chdir" if "cd" doesn't work)

before the "dir" command.  (The "cd" means "change directory" and "pub"
is a common (public) directory name, usually a good place to start.)
Once you determine the name of a file you want to retrieve, use:

    get <name of file>

in the following note instead of the "dir" command.  If the file you
want to retrieve is plain text, this will suffice.  If it's a binary
file (an executable program, compressed file, etc.) you'll need to
insert the command:

    binary

in your note before the "get" command.

Tip:  Many directories at FTP sites contain a file called 00-index.txt,
README, or something similarly named which gives a description of the
files found there.  If you're just exploring and your "dir" reveals one
of these filenames, do a "get" on the file and save yourself some time.

OK, let's grab the text of The Magna Carta.  Here's the message you send
to an ftpmail server:

    open wiretap.area.com            (The name of the FTP site)
    chdir /Gov/World/                (Directory where the file lives)
    get magna.txt                    (Sign here please, John)
    quit                             (Bring it on home)

Here are the commands you would send to to get a file from the Simtel
Software Repository that was mentioned earlier.

    open ftp.simtel.net              (mirrored at other world-wide sites)
    cd pub/simtelnet/msdos/disasm/
    binary                           (Because we're getting a ZIP file)
    get bubble.zip
    quit

Some other interesting FTP sites you may want to "visit" are listed
below.  (Use these site names on the "open" command and the suggested
directory name on your "chdir" command, as in the previous examples.)

    rtfm.mit.edu        Try: pub/usenet/news.answers for USENET info
    ftp.simtel.net      Try: pub/simtelnet a huge DOS/WIN software library
    gatekeeper.dec.com  Try: pub/recipes for a cooking & recipe archive

Remember that you can't just send e-mail to ftpmail@<anysite>, rather
you send the "open <site>" command to one of the known ftpmail servers.

Notes:
- The ftpmail servers tend to be quite busy. Your reply may not arrive
   for several minutes, hours, or days.
- Some large files may be split into smaller pieces and returned to you
   as multiple messages.  You can control this (and also override the
   return e-mail address) using special ftpmail commands.
- The commands are not the same on every server - send the "help"
   command to find out how FTPMAIL works on the server you are using!
- Often the ftpmail servers keep local archives. Open the local archives
   by not specifying a site on the "open" line. Using the local archives
   gives your request priority so it will be processed before all outside
   requests.

If the file that is returned to you ends up looking something like what
you see below, (the word "begin" with a number and the filename on one
line, followed by a bunch of 61-character lines) it most likely is a
binary file that has been "uuencoded" by the sender.  (This is required
in order to reliably transmit binary files by e-mail.)

     begin 666 answer2.zip
     M4$L#!`H`!@`.`/6H?18.$-Z$F@P```@?```,````5$5,25@S,34N5%A480I[
     M!P8;!KL,2P,)!PL).PD'%@.(!@4.!P8%-@.6%PL*!@@*.P4.%00.%P4*.`4.

You'll need to scrounge up a version of the "uudecode" program for your
operating system (DOS, OS/2, Unix, Mac, etc.) in order to reconstruct
the file.  Most likely you'll find a copy already at your site or in
your service provider's download library, but if not you can use the
instructions in the next section to find out how to search FTP sites for
a copy.


                             ARCHIE BY EMAIL
                             ---------------

Let's say you know the name of a file, but you have no idea at which FTP
site it might be lurking.  Or maybe you're curious to know if files
matching a certain naming criteria are available via FTP.  Archie is the
tool you can use to find out.

Archie servers can be thought of as a database of all the anonymous FTP
sites in the world, allowing you to find the site and/or name of a file
to be retrieved.  And using Archie by e-mail can be convenient because
some Archie searches take a LONG time to complete, leaving you to tap
your toes in the meantime.

To use Archie by e-mail, simply send an e-mail message to this address:

    archie@archie.icm.edu.pl           (Poland)

To obtain detailed help for using Archie by mail, put the word

    help

in the subject of the note and just send it off.  You'll receive e-mail
explaining how to use archie services.  If you're the "just do it" type,
then enter the command:

    find <file>

where "<file>" is the name of the file to search for, in the BODY (not
the subject) of the note. This will search for files that match your
criteria exactly.  If you want to find files that contain your search
criteria anywhere in their name, insert the line

    set search sub

before the "find" command.  Some other useful archie commands you might
want to use are:

    set maxhits 20             (limit output, default is 100 files)
    set match_domain usa       (restrict output to FTP sites in USA)
    set output_format terse    (return output in condensed form)

When you get the results from your Archie query, it will contain the
names of various sites at which the desired file is located.  Use one of
these site names and the directory/filename listed for your next FTP
file retrieval request.

Now you've learned enough to locate that UUDECODE utility mentioned in
the last section.  Let's send e-mail to archie@archie.icm.edu.pl and
include the following lines in the message:

    set search sub             (looking for a substring match...)
    find uudecode              (must contain this string...)

Note: You'll be looking for the uudecode source code, not the executable
version, which would of course be a binary file and would arrive
uuencoded - a Catch 22!  The output of your archie query will contain
lots of information like this:

Host sunsite.cnlab-switch.ch    (195.176.255.9)
Last updated 14:30 14 Dec 1999

     Location: /mirror/NetBSD/NetBSD-release/src/usr.bin/uudecode
       FILE    -rw-rw-r--          5832  02:00 23 Mar 1999  uudecode.c

Host helka.iif.hu       (193.225.12.48)
Last updated 14:30 16 Dec 1999

     Location: /pub/mirror_hosts/ftp.simtel.net/pub/simtelnet/msdos/00_start
       FILE    -rw-r--r--          5567  02:00 23 Feb 1999  uudecode.bas
       FILE    -rw-r--r--          5349  02:00 23 Feb 1999  uudecode.c

Now you can use an ftpmail server to request "uudecode.bas" (if you have
BASIC available) or "uudecode.c" (if you have a C compiler) from the
helka.iif.hu site.

SPECIAL NOTE:  For DOS users, there is an EXECUTABLE ASCII version of
the UUDECODE.COM program available.  This is a rare exception to the
rule that executable files must be encoded to survive e-mail
transmission.  You can receive it via e-mail and execute it "as is".  To
get a copy, send e-mail

   To: gboyd@expita.com
   Subject: send uudecode.com  (must be lowercase).

For further info on using uudecode, send e-mail

   To: gboyd@expita.com
   Subject: send uudecode.how  (must be lowercase).


                           FTP SEARCH BY EMAIL
                           -------------------

Archie servers could be thought of as a database of all the anonymous
FTP sites in the world, allowing you to find the site and/or name of a
file to be retrieved. This function has been taken over by a web-based
FTP search engine.

To use FTP Search by e-mail, simply send an e-mail message to one of the
webmail servers (see WWW section) with this line in the message
BODY:

   send http://ftpsearch.lycos.com/cgi-bin/search?form=lycosnet\
     &query=[file name or keyword]&filetype=All+files

Now you've learned enough to locate that UUDECODE utility mentioned in
the last section. Replace [file name or keyword] with uudecode.bas to
find Basic source code, so our e-mail request looks like this:

   send http://ftpsearch.lycos.com/cgi-bin/search?form=lycosnet\
     &query=uudecode.bas&filetype=All+files

Note: You'll be looking for the uudecode Basic source code, not the
executable version, which would of course be a binary file and would
arrive uuencoded - a Catch 22!  The output of your ftp query will
contain lots of information like this:

    2 /.2/simtelnet/msdos/00_start/uudecode.bas
      5.4K - 1996 Feb 24 00:00
      FTP Site: ftp.cdrom.com

    3 /.3/msdos/00_start/uudecode.bas
      5.4K - 1996 Feb 24 00:00
      FTP Site: ftp.eunet.cz

    4 /.4/cpm/starter-kit/uudecode.bas
      1.9K - 1986 Oct 11 00:32
      FTP Site: ftp.southcom.com.au

Now you can use an ftpmail server to request "uudecode.bas" (if you have
BASIC available) from the ftp.cdrom.com site or one of the others.


                             GOPHER BY EMAIL
                             ---------------

Gopher is a tool for exploring the Internet and is one way to find a
resource if you know what you want, but not where to find it.  Gopher
systems are menu-based, and provide a user-friendly front end to
Internet resources, searches and information retrieval.

When visiting a Gopher site using a "live" Internet connection, one
would specify the name of the site, navigate through a series of
hierarchical menus to a desired resource, and then either read or
transfer the information back to their home system.

Using Gopher by e-mail is very similar, except that the desired site is
reached through a special "gophermail server" which gophers to the
remote site on your behalf and and returns the requested menu, submenu
or file to you in response to a set of commands in an e-mail message.

NOTE: In recent years, Gopher has fallen in popularity and most of the
   gophermail servers have closed down.  But still there is quite a
   bit of information available on gopher servers, and a few working
   gophermail servers.

Although not every item on every menu will be accessible by
"gophermail", you'll still find plenty of interesting things using this
technique.  Down to brass tacks...  let's send e-mail to one of these
addresses:

    gopher@dna.affrc.go.jp          Japan
    gopher@ncc.go.jp                Japan

You can optionally specify the address of a known gopher site on the
Subject line to get the main menu for that site instead.

    gopher.tc.umn.edu            (home of gopher)

Let's be bold and skip the HELP stuff for now.  Send off a note to one
of the gophermail servers and specify

    Subject: gopher.tc.umn.edu

You'll get a message back from the server that looks something like the
text in the figure below.

  +--------------------------------------------------------------------+
   This is response to your request with Subject: gopher.tc.umn.edu
   Mail this file back to gopher with an X before the menu items that
   you want.  If you don't mark any items, gopher will send all of them.

       1.  Information About Gopher/
       2.  Computer Information/
       3.  Discussion Groups/
       4.  Fun & Games/
       5.  Internet file server (ftp) sites/
       6.  Libraries/
       7.  News/
       8.  Other Gopher and Information Servers/
       9.  Phone Books/
       10. Search Gopherspace with Veronica-2 /
       11. Search lots of places at the University of Minnesota  <?> (Send keywords in Subject:)
       12. University of Minnesota Campus Information/


    You may edit the following two numbers to set the maximum sizes after
    which GopherMail should send output as multiple e-mail messages:

    Split=64K bytes/message <- For text, bin, HQX messages (0 = No split)
    Menu=100 items/message <- For menus and query responses (0 = No split)

    #
    Name=Information About Gopher
    Numb=1
    Type=1
    Port=70
    Path=1/Information About Gopher
    Host=gopher.tc.umn.edu
    #
    # ... (62 lines deleted) ...
    #
    Name=Search Gopherspace with Veronica-2
    Numb=10
    Type=1
    Port=70
    Path=/v2
    Host=gopher.ptloma.edu
    #
    Name=Search lots of places at the University of Minnesota
    Numb=11
    Type=7
    Port=70
    Path=mindex:/lotsoplaces
    Host=spinaltap.micro.umn.edu
    #
    Name=University of Minnesota Campus Information
    Numb=12
    Type=1
    Port=70
    Path=1/uofm
    Host=gopher.tc.umn.edu
  +--------------------------------------------------------------------+

To proceed to a selection on the returned menu just e-mail the whole
text of the note (from the menu downwards) back to the gopher server,
placing an "x" next to the items(s) you want to explore.  You'll then
receive the next level of the gopher menu by e-mail.  Some menu choices
lead to other menus, some lead to text files, and some lead to searches.
In the example above, let's select

    x 8. Other Gophers & Info Resources

and mail the whole thing right back to the gophermail server. You should
then get a menu with a number of interesting selections including "All
the Gopher Servers in the World".  You'll find that many of the gopher
servers have closed down but still there are quite a few remaining.

If a menu item is labelled "Search" you used to be able to select that
item with an "x" and supply your search words in the Subject: of your
reply.  However, the Veronica searches are all DEFUNCT. The few
remaining Jughead searches are listed in the next section.

Note: You needn't actually return the entire gopher menu and all the
routing info that follows it each time you reply to the gophermail
server.  If you want to minimize the size of your query, you can strip
out the "menu" portion at the top and include only the portion below
that pertains to the menu selection you want.

Just remember that if you use this approach, you must specify "get all"
on the Subject line.  (Exception: for searching, specify only the search
terms on the Subject line.)  The example below is equivalent to
selecting "option 8" as we did earlier.

    Split=0
    Menu=0
    #
    Name=Other Gopher and Information Servers
    Numb=8
    Type=1
    Port=70
    Path=1/Other Gopher and Information Servers
    Host=gopher.tc.umn.edu

If this looks like nonsense to you, here's a human translation:

    Connect to PORT 70 of the HOST (computer) at "gopher.tc.umn.edu",
    retrieve the sub-menu "Other Gophers", and send it to me in
    ONE PIECE, regardless of its size.

Note: Sometimes gophermail requests return a blank menu or message.
This is most likely because the server failed to connect to the host
from which you were trying to get your information.  Send your request
again later and it'll probably work.


                           VERONICA BY EMAIL
                           -----------------

Speaking of searches, this is a good time to mention Veronica.  Just as
Archie provides a searchable index of FTP sites, Veronica provides this
function for "gopherspace".  Veronica will ask you what you want to look
for (your search words) and then display another menu listing all the
gopher menu items that match your search.  In typical gopher fashion,
you can then select one of these items and "go-pher it"!

All the Veronica servers were shutdown. However, a new Veronica-2
server operated by gopher.floodgap.com is available.

A Gophermail Shortcut:
----------------------

The path to some resources, files or databases can be a bit tedious,
requiring several e-mail messages to the gophermail server.  But here's
the good news...  If you've done it once, you can re-use any of the
e-mail messages previously sent in, changing it to suit your current
needs.  As an example, here's a clipping from the Veronica menu you
would get by following the previous instructions.  You can send these
lines to any gophermail server to run a Veronica search.

    Split=64K bytes/message <- For text, bin, HQX messages (0 = No split)
    Menu=100 items/message <- For menus and query responses (0 = No split)
    #
    Name=Search Veronica-2
    Numb=23
    Type=7
    Port=70
    Path=/v2/vs
    Host=gopher.floodgap.com

Specify the search words in the Subject line and see what turns up!  You
can use boolean expressions in Veronica searches.  For a guide to
composing Veronica searches, send these lines to a gophermail server:

    Split=0
    Menu=0
    #
    Name=Search tips and how to effectively use the database
    Numb=5
    Type=0
    Port=70
    Path=/v2/help/search
    Host=gopher.floodgap.com
    #
    Name=Help! I didn't find anything!
    Numb=6
    Type=0
    Port=70
    Path=/v2/help/noluck
    Host=gopher.floodgap.com
    #
    Name=Accuracy of returned responses
    Numb=7
    Type=0
    Port=70
    Path=/v2/help/acc
    Host=gopher.floodgap.com


                            JUGHEAD BY EMAIL
                            ----------------

Speaking of searches, this is a good time to mention Jughead.  Just as
Archie provides a searchable index of FTP sites, Jughead provides this
function for "gopherspace".  Jughead will use the Subject:  to look for
(your search words) and then display another menu listing all the gopher
menu items that match your search.

Jughead like Veronica and Gopher is almost entirely non-existant.

You can send these lines to any gophermail server to run a Jughead
search. Remember, the Subject line must contain your search words.

The following two Jughead servers only search in their respective
sites. The Marvel site contains the most information.

    Split=0                       Split=0
    Menu=0                        Menu=0
    #                             #
    Name=Marvel Jughead Search    Name=Oswego Jughead Search
    Type=7                        Type=7
    Port=2069                     Port=3000
    Path=                         Path=
    Host=marvel.loc.gov           Host=gopher.oswego.edu


                             USENET BY EMAIL
                             ----------------

Usenet is a collection of over 52000 discussion groups on every topic
imaginable.  In order to get a proper start and avoid embarrasing
yourself needlessly, you must read the Usenet new users intro document,
which can be obtained by sending e-mail to:

    mail-server@rtfm.mit.edu

and include this line in the BODY of the note:

    send usenet/news.answers/news-newusers-intro

To get a listing of Usenet newsgroups, add these commands to your note:

    send usenet/news.answers/active-newsgroups/part1  (also get part2 & part3)
    send usenet/news.answers/alt-hierarchies/part1    (also get part2 & part3)

To get the FAQ (Frequently Asked Questions) file(s) for a given
newsgroup, try a command like this:

    index usenet/<newsgroupname>

(Substitute dots for dashes if they appear in the newsgroup name.) If
any FAQ files are available, they will be listed in the returned info,
and you can request them with a command like:

    send usenet/<newsgroupname>/<faqfilename>


Reading Usenet Newsgroups
-------------------------

Gophermail methods for reading Usenet newsgroups are non-existant as
of the year 2001.

NOTE: You can also get Usenet postings from several webmail servers
listed in the WORLD-WIDE WEB BY EMAIL section later in this document.
There are four approaches:

1) Look for an Agora server with a "Y" in the "Usenet Access" column and
    send a command like this in the message body: send news:<newsgroup>

2) Use a webmail server to retrieve specified web pages to search at
    Google (was Deja.com) which archives Usenet groups daily.
      Search Newsgroups --  http://groups.google.com/
      Usenet Advanced Search -- http://groups.google.com/advanced_group_search

3) Use a webmail server to retrieve specified web pages to read Usenet
    at Mailgate -- http://www.mailgate.org/

4) Use the Relcom Usenet News mailserver. Send the word "help" in the
    body of a message to newsserv@litech.net

Note: See the "WWW By E-mail" section below for a list of "getweb"
       "agora" and "www4mail" servers.

With a little luck, you'll get a list of recent postings to the
newsgroup, and then you can retrieve the individual postings by replying
to the message from the Agora server.  Make sure not to change the
subject line of the reply message, and just put the number of the
posting you want in the message BODY.

Posting In Usenet Newsgroups
----------------------------

If you decide to make a post of your own, here are two methods to try:

METHOD 1: Mail the text of your post to:

    mail2news-YYYYMMDD-group.name@anon.lcs.mit.edu
    mail2news_nospam-YYYYMMDD-group.name@anon.lcs.mit.edu

    group.name@berlioz.crs4.it                 <internal use only>
    group.name@comlab.ox.ac.uk                 <internal use only>
    group.name@pubnews.demon.co.uk             <access controlled>
    outnews+netnews.group.name@andrew.cmu.edu  <local use only>
    no.group.name@news.uninett.no              <Norwegian news only>

So to post to news.newusers.questions, you might send your message to:

    mail2news-YYYYMMDD-news.newusers.questions@anon.lcs.mit.edu

Be sure to include an appropriate Subject: line, and include your real
name and e-mail address at the close of your note.

Substitute today's date instead of YYMMDD and the newsgroup name instead
of "group.name" in the address.  For more information, send to
mail2news@anon.lcs.mit.edu with Subject: help

METHOD 2: Mail the text of your anonymous post to:

    mail2news@anon.lcs.mit.edu     - Subject: help
    mail2news@nym.alias.net        - different name for above
    mail2news@dizum.com            - Subject: help
    mail2news@mixmaster.shinn.net  - Subject: help

Searching For Usenet Newsgroups
-------------------------------

Don't know the name of the newsgroup?  To search for Usenet groups about
"pets", for example, send e-mail to an Agora or www4mail server (see WWW
section) with this line in the message BODY:

    send http://alabanza.com/kabacoff/Inter-Links/cgi/news.cgi?pets


                       WORLD-WIDE WEB (WWW) BY EMAIL
                       -----------------------------

The World-Wide Web is the premier Internet navigational tool - a
hypertext and multimedia system that lets you hop around the Net, read
documents, and access images & sounds linked to a source.

Have you ever heard someone say, "Wow, check out the cool stuff at
http://www.somewhere.com/blah.html" and wondered what in the world they
were talking about?  Now you can retrieve WWW documents by e-mail using
an Agora server.

All you need to know is the Uniform Resource Locator (or URL, that long
ugly string starting with "http:", "gopher:", or "ftp:") which defines
the address of the document, and you can retrieve it by sending e-mail
to one of:

    Agora Server Address         Location             Usenet Access?
    ---------------------------  -------------------- --------------
    agora@dna.affrc.go.jp        (Japan)               Y
    agora@kamakura.mss.co.jp     (Japan)               Y
    agora@www.eng.dmu.ac.uk      (DMU.UK users ONLY)
    agora@uit.no                 (Norwegian users ONLY)
    agora@mx.nsu.nsk.su          (NSU.RU users ONLY)

In the body of your note include one of these lines, replacing "<URL>"
with the actual URL specification.

    send <URL>
    rsend <return-address> <URL>  (to override your return address)

This will send you back the document you requested, with a list of all
the documents referenced within, so that you may make further requests.

To try WWW by e-mail send the following commands to an Agora server:

    help
    send http://www.w3.org

In a few minutes you should receive the Agora help file and the "W3C WWW
Welcome Consortium Page" which will include references to other Web
documents you'll want to explore.  Please read the Agora help file, as
it contains answers to many commonly asked questions!

THERE ARE SOME OTHER webmail servers listed below, which run software
other than Agora.  They work pretty much the same, but it's a good idea
to request the help file for the server you decide to use.

Note: The GetWeb servers below can handle web pages which contain fill-in
forms.  Other webmail servers do not provide this ability.

    Address                      Syntax     Comments
    -----------------------      ---------- ----------------------------
    data@downloadslave.com       <URL> in body
    getweb@emailfetch.com        GET <URL> intermittent since Mar99
    getweb@usa.healthnet.org     GET <URL>
    page@grabpage.org            URL: <URL> in Subject
    text@pagegetter.com          <URL> in body returns text
    web@pagegetter.com           <URL> in body returns graphic page
    webgate@vancouver-webpages.com GET <URL> or DUMP <URL> in body
    webmail@www.ucc.ie           SEND <URL> or GET <URL> in body
    www@web2mail.com             URL of page (omit http://) in Subject

Note: The webmail servers are sometimes unavailable for days (or weeks)
at a time without explanation.  If you get an error or no reply, please
try another address or retry in a day or so.

THE NEW WWW4MAIL servers (combine functions of agora, getweb, and new
browser e-mail integration):

   Address                        Comments
   -----------------------------  ------------------------------
   www4mail@collaborium.org       send help in body of a message
   www4mail@ftp.uni-stuttgart.de  send help in body of a message
   www4mail@kabissa.org           send help in body of a message
   www4mail@unganisha.idrc.ca     send help in body of a message
   www4mail@web.bellanet.org      send help in body of a message
   www4mail@wm.ictp.trieste.it    send help in body of a message

If you want an up-to-date listing, then look at:
http://www.expita.com/servers.html


                            WWW SEARCH BY EMAIL
                            -------------------

There's a lot of great stuff out on the Web, but how do you find it?
Well, just like Archie and Veronica help you search FTP and gopher
sites, there are several search engines that have been developed to
search for information on the Web.  But until now, you had to have
direct Internet access to use them.

After a bit of research, I have found that it is possible to use several
WWW search mechanisms by e-mail.  Here are some sample queries that you
can use to search via Lycos and WebCrawler.  Any of these lines can be
sent to an Agora server (see above) to perform a search.  If you're not
interested in frogs, then by all means feel free to use your own
keywords.

For Lycos searches you must separate words with a "+" sign.  All
searches are exact.

    http://www.lycos.com/srch/?lpv=1&loc=searchhp&query=frog+dissection

For WebCrawler searches you must separate words with a "+" sign.  All
searches are exact.

    http://www.webcrawler.com/cgi-bin/WebQuery?searchText=frog+dissection

Another way to access search engines is to send a message to one of the
GETWEB servers (see list above) with a line like this in the message
body:

    SEARCH <engine> <keywords>

Replace "engine" with YAHOO, ALTAVISTA, or INFOSEEK, and use your own
search words.  Here's an example:

    SEARCH YAHOO consumer protection


                              MAILING LISTS
                              -------------

There are literally thousands of discussion groups that stay in touch
using e-mail based systems known as "mailing lists".  People interested
in a topic "subscribe" to a "list" and then send and receive postings by
e-mail.  For information concerning new lists, send e-mail to:

    LISTSERV@HYPATIA.CS.WISC.EDU

In the body of your note include only this command:

    INFO NEW-LIST

Finding a Mailing List
----------------------

To find out about mailing lists that are relevant to your interests,
send e-mail to an webmail server and retrieve this web page:

    http://www.liszt.com/

New in These Parts?
-------------------

If you're new to the Internet, I suggest you subscribe to the HELP-NET
list where you're likely to find answers to your questions.  Send the
command:

    SUBSCRIBE HELP-NET <Firstname Lastname>

in the BODY of a note to LISTSERV@CRCVMS.UNL.EDU, then e-mail your
questions to the list address:

    HELP-NET@CRCVMS.UNL.EDU


                             FINGER BY EMAIL
                             ---------------

"Finger" is a utility that returns information about another user.
Usually it's just boring stuff like last logon, etc., but sometimes
people put fun or useful information in their finger replies.  To try
out finger, send this line (in the message BODY) to a webmail server:

    send http://www.mit.edu:8001/finger?<user@site>

Use one of the e-mail addresses below instead of <user@site> ...

    nasanews@space.mit.edu      quake@gldfs.cr.usgs.gov


                      "DIRECTORY ASSISTANCE" BY EMAIL
                      --------------------------------

There is an e-mail address lookup database at MIT which keeps tabs on
everyone who has posted a message on Usenet.  Send e-mail to
mail-server@rtfm.mit.edu and enter only this line in the BODY of the
note:
    send usenet-addresses/<name>

Specify as much information as you can about the person (lastname,
firstname, userid, site, etc.) to limit the amount of information that
is returned to you.  Here's a sample query to find the address of
someone you think may be at Harvard University:

    send usenet-addresses/Jane Doe Harvard


                             WHOIS BY EMAIL
                             --------------
WHOIS is another tool that can be used to Search for domain name; NIC
handle; host IP or lastname, firstname.

The default action for Whois, unless directed otherwise with a keyword
(e.g. "domain root"), is to do a very broad search, looking for matches
in many fields: handle, name, or hostname and finding all record types.

Let's say we want to find someone named Gerald Boyd (a noted e-mail
personality). Our Whois query will be addressed to a webmail server and
will contain only this one long line:

    http://www.networksolutions.com/cgi-bin/whois/whois?
      STRING=name+boyd%2C+gerald&STRING=Search

Whois then shows the results in one of two ways: as a full, detailed
display for a single match (with possible subdisplay), or as one- or
two-line summaries for multiple matches.

Boyd, Gerald ([11]GBL149)               gboyd@PF1HELP.COM               (770) 4
13-9456
Boyd, Gerald ([12]GBY218)               geboyd@EARTHLINK.NET            1-818-8
46-2478
Boyd, Gerald ([13]GB8307)               gerald@PF1HELP.COM                770-4
13-9456

To single out one record, look it up with "!xxx", where xxx is the
handle, shown in parenthesis following the name, which comes first.


                             TELNET BY EMAIL
                             ---------------

Sorry, there is no way to access TELNET sites by e-mail.


                            A FEW NET-GOODIES
                            -----------------

Here are some other interesting things you can do by e-mail. (Some of
them are accessible only by e-mail!)

* 100 THINGS TO DO BY EMAIL
Get instant answers amd information on almost 100 topics by e-mail.
Dictonary, encyclopedia, airfares, almanac, airports, currency
conversion, distance between two points, etc. etc.  Send a blank e-mail
message to: topics@halibot.com  Also try msnbcnow@msnbc.com

* ANONYMOUS EMAIL
An "anon server" provides a front for sending mail messages and posting
to Usenet newsgroups anonymously, should the need ever arise.  To get
instructions send e-mail to remailer@gacracker.org with a Subject:
remailer-help

* ASK DR. MATH
Have a math question?  Dr. Math answers questions from K-12 students and
their teachers about Mathematics.  Write to dr.math@forum.swarthmore.edu

* ASK-A-GEOLOGIST
Send your earth-shattering questions to
ask-a-geologist@octopus.wr.usgs.gov and a US Geological Service
scientist will try to help.

* ASK-A-TECH
Send your computer hardware or software support questions to
helpdesk@ask-a-tech.org and this non-profit organization will try to
answer your question.

* BIBLE SEARCH
Search the King James version of the Bible.  Examples below can be sent
to an Agora server.  Use "+" to specify multiple words; prefix proper
names with "%23"; add "&PHRASE=ON" to find a phrase.
   send http://estragon.uchicago.edu/cgi-bin/KJV?title=&word=angel+%23Mary
   send http://estragon.uchicago.edu/cgi-bin/KJV?title=&word=fig+tree&PHRASE=ON

* CANCER DATABASE
To access the National Cancer Institute's database, send e-mail to
cancernet@icicb.nci.nih.gov with "help" or "spanish" in the message
body.

* CHECK YOUR EMAIL CONNECTION
The following are all autoresponder addresses that you can use to test
if your e-mail is working. You send a blank message to the address shown
and in a few minutes an autoresponse is received.
   echo@seattlelab.com               test-courrier@sogi.com (in French)
   echo@telcomplus.net               test@alphanet.ch
   echo@tu-berlin.de                 test@mega.bw
   internet@gurus.com                test@netsydney.com
   ping@stamper.itconsult.co.uk      echo@tu-chemnitz.de

* COUNTRY CODES
The International E-mail accessibility FAQ is retrievable by e-mail.
Send e-mail to mail-server@rtfm.mit.edu and enter only this line in the
BODY of the note:
   send usenet/news.answers/mail/country-codes
   Web site: http://www.nsrc.org/oclb

Stumped by those 2-letter country codes in Internet addresses?  Send
e-mail to address-codes@GetResponse.com for an explanation.

* CURRENCY CONVERSION
You can get foreign exchange rates for the U.S. dollar and other
currencies by sending this URL to an Agora or www4mail server:
   send http://cnnfn.com/markets/currencies.html

* EMAIL TO SNAIL-MAIL
Need to get a message to someone in Britain who doesn't have e-mail?
Send it to PaperMail!  For full details on this fee-based service, send
e-mail to info@papermail.win-uk.net

* EMOTIONAL SUPPORT
There's a suicide helpline accessible by e-mail.  Send your message to
jo@samaritans.org -- No syntax, they have humans!  Also any mail to
care@netservs.com returns a listing of hundreds of emotional support
resources on the Internet.

* FINANCIAL AID FAQ
A comprehensive guide to higher education financial aid.  Send blank
e-mail to send-faq@finaid.org OR query@finaid.org

* FINDING EMAIL ADDRESSES
For a guide to finding someone's e-mail addresses.  Send e-mail to
mail-server@rtfm.mit.edu and enter only this line in the BODY of the
note:
    send usenet/news.answers/finding-addresses

* FREE HOME PAGE BY EMAIL (For German residents only)
InetWire offers free non-commercial homepages with up to 500KB of
space.  Make a zip file with index.htm being the home page, put a URL
something like "http://inetw.com/home/myname" in the Subject line and
then send your zip file as an ATTACHMENT to attach@inetw.com.  (If your
e-mail program doesn't support file attachments, you're out of luck.)

* FTP UPLOAD VIA EMAIL
The first free publicly accessible FTP service that allows uploading via
e-mail has instructions available at: http://mail2ftp.hypermart.net/
You can also send the word "HELP" in the body of a message to
mail2ftp@rootshell.be or mail2ftp@treelife.org.ua

* FTPMAIL/WEBMAIL SERVER STATUS
Is your favorite FTPmail/Agora/GetWeb site overloaded or down?  Find out
by sending the "get file stats.txt" command to mailserv@netservs.com

* INTERNET MOVIE DATABASE
Get tons of info on movies, actors, and directors. Send e-mail to
movie@imdb.com with HELP in the subject line.

* INTERNET TIMELINE
To learn the history of the Internet from 1950 to 1998, send blank e-mail
to timeline@hobbes.mitre.org

* THE INTERNET TOURBUS
Take a virtual tour of the Internet - hop on The Internet TourBus!
You'll receive a short mailing twice a week highlighting fun and
interesting sites on the Internet.  It's absolutely free, and you can
join 80,000 others by sending SUBSCRIBE TOURBUS Firstname Lastname in
the BODY of a message to "LISTSERV@LISTSERV.AOL.COM".

* ISPs BY AREA CODE
For a list of Internet Service Providers in your area code, send this
line to an Agora server: http://thelist.iworld.com/areacode/XXX/
(where XXX=your area code)

* LANGUAGE TRANSLATION BY EMAIL
Send an e-mail as usual to a foreign language colleague in your native
tongue.  In the "Cc:" line, send a carbon copy of the message to the
Universal T-mail Translator.  The way you format the address will
determine how the message is translated.
Cc: (Original language)-(Final translation)@t-mail.com
English (en or an), French (fr), German (ge or de), Italian (it),
Spanish (sp or es), Portuguese (pt or po)
So English to French translation would be en-fr@t-mail.com

* LEARN TO SPEAK GEEK
Get BABEL, a glossary of computer abbreviations and acronyms. Use a
web-to-mail server to retrieve this file.
http://www.geocities.com/ikind_babel/babel/babel.html     [214K]

* MEDICAL INFORMATION BY EMAIL
Send a blank e-mail message to hnet@usa.healthnet.org to receive a FAQ
which lists locations for medical information that can be accessed by
e-mail methods.

* MORE WORD FUN!
The wordserver at wsmith@wordsmith.org will serve up A.Word.A.Day,
Dictionary by Mail, Thesaurus by Mail, Acronym by Mail and Anagram by
Mail. Send blank e-mail for the help file.

Merriam-Webster dictionary offers the word of the day -- To subscribe,
send mail to LISTSERV@LISTSERV.WEBSTER.M-W.COM with the command
SUBSCRIBE MW-WOD [your name].

* MORTGAGE/LOAN CALCULATOR
To calculate your monthly loan payment, send this line to an Agora
server:
http://www.interest.com/hugh/calc/simple.cgi?amt=100000&int=8.00&yrs=30
(Change the values for principle, interest and term as appropriate.)

* NUMBER SEQUENCES
To find out how a number sequence continues (such as 2 3 5 7 11 ..., the
prime numbers), send e-mail to sequences@research.att.com with the
following in the message body: lookup 2 3 5 7 11. For help on
this service, send e-mail with a body of "help" to the same address.

* PDF CONVERSIONS BY EMAIL
You can convert PDF documents to text or HTML via e-mail. For internet
files put the URL in the body of an e-mail message to
pdf2txt@adobe.com (for plain text) or to pdf2html@adobe.com (for HTML).
If the file is on your PC then include as a MIME attachment and send
to the same addresses depending uopn whter you want text or HTML.

* PLAY GAMES BY EMAIL
You can play games via the PBeM Server, for info, send e-mail to
pbmserv@gamerz.net with Subject: help tutorial

* RFCS BY EMAIL
Details on obtaining RFCs via FTP or EMAIL may be obtained by sending
an EMAIL message To: rfc-info@ISI.EDU with help: ways_to_get_rfcs in
the message body.

* SCOUT REPORT
...is a weekly featuring announcements of new and interesting resources
on the Internet.  To subscribe, send e-mail to listserv@cs.wisc.edu with
"Subscribe scout-report Your Name" in the body.

* SENDING A FAX BY EMAIL
The TPC.INT "Remote Printing Experiment" is the grandfather of Internet
faxing services.  Send e-mail to tpcfaq@info.tpc.int with no subject and
"help" in the body.  For a list of country phone numbers served by this
service, send e-mail to tpccover@info.tpc.int with no subject and nothing
in the body.

You can also get the FAX FAQ via electronic mail. Send e-mail to
mail-server@rtfm.mit.edu and enter only this line in the BODY of the
note:
    send usenet/news.answers/internet-services/fax-faq

* SENDING MAIL TO VARIOUS NETWORKS
For a guide to communicating with people on the various networks that
make up the Internet, send e-mail to mail-server@rtfm.mit.edu and enter
only this line in the BODY of the note:
    send usenet/news.answers/mail/inter-network-guide

* STATLIB
A system for distributing statistical software, datasets, and
information by electronic mail, FTP, and WWW.  To get the index, send
e-mail to statlib@lib.stat.cmu.edu with the one line message "send
index".

* STOCK MARKET QUOTE
To get a stock market quote, send this line to an Agora server:
http://finance.yahoo.com/q?d=t&s=xxxx where xxxx is the stock market
symbol.

* TRACK UPS PACKAGES
You can track your UPS packages now thru e-mail.  Send an e-mail to
totaltrack@ups.com and in the subject or the body place the complete
tracking number.

* THE USENET ORACLE
A cooperative, anonymous and humorous exchange of questions and
answers.  Send e-mail to oracle@cs.indiana.edu for more information.

* U.S. CONGRESS AND THE WHITE HOUSE
You can contact the President (president@whitehouse.gov) or Vice
President (vice_president@whitehouse.gov).

* OTHER SOURCES OF US GOV'T INFO:
Send e-mail to mail-server@rtfm.mit.edu and enter only these lines in
the BODY of the note:
    send usenet/news.answers/us-govt-net-pointers/part1
    send usenet/news.answers/us-govt-net-pointers/part2

* VIRTUAL PIZZA!
Order an electronic pizza by e-mail.  Send e-mail to
"pizza@ecst.csuchico.edu" with a subject of "pizza help" for details.

* VIRUS PROTECTION SOFTWARE
F-Prot, one of the top PC virus scanners can be requested by e-mail. To
get the current version (uuencoded) send e-mail to
f-prot-update@complex.is with this message body:
   send-as:  uue

* WEB PAGES BY EMAIL
Use web2mail to have your favorite web pages delivered by e-mail whenever
they change.

The basic subscription form is at this web page:
   http://www.web2mail.com/signup.php

* WEBSTER DICTIONARY LOOKUP
To retrieve the definition of a word, send either of these lines to an
Agora type server:
   send http://www.britannica.com/dictionary?book=Dictionary&va=whatever
   send www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=whatever

* FOR FURTHER READING
For more details on using web search engines by e-mail use a web-to-mail
server to get this file
   send ftp://ftp.expita.com/wsintro.faq



                            SOMETHING MISSING?
                            ------------------

This file should be somewhere between 1300 and 1500 lines of text, and
about 58KB in size.  If the file you have is much smaller, or says
something like "part 2 of 2" near the top, you're missing something.
Most likely, that's because your mail system has file size quotas that
prevented part 1 from reaching you.  Here's the solution:

To get the file in multiple chunks, send to mail-server@rtfm.mit.edu and
enter only these lines in the BODY of the note:

size 25000
send usenet/news.answers/internet-services/access-via-email

The mail server will break up the file into chunks of 25000 bytes and
send them in separate messages.  You can change "25000" to another
number if it suits your needs.


                           CONTACTING THE AUTHOR
                           ---------------------

I welcome your feedback on this guide and can be reached at the
following addresses.  Send corrections, ideas, suggestions and comments
by e-mail.  I'll try to include any new services in future editions of
this guide.

E-mail  :  gboyd@expita.com
Web     :  http://www.expita.com/

--------------------------------------------------------------------------

               Copyright (c) 1999-2002, Gerald E. Boyd
                          gboyd@expita.com

       All rights reserved. Permission is granted to duplicate and
       distribute copies of this document provided the copyright
       notice and this permission notice are preserved on all copies.

-------------------------------------------------------------------------- 

Accessing the Internet by E-mail FAQ

Posted by krsuncom
개발이야기2007. 8. 18. 09:51

원문:Download details: Windows Mobile Developer Power Toys

 

Windows Mobile Developer Power Toys

Brief Description

Developer Power Toys for the Windows Mobile platform

On This Page

Quick Details

Overview

System Requirements

Instructions

Related Resources

What Others Are Downloading

Download files below

Quick Details

Version:
12Dec2006

Date Published:
9/18/2003

Language:
English

Download Size:
1.2 MB - 19.7 MB*

*Download size depends on selected download components.

Overview

The Windows Mobile Developer Power Toys help you develop and test your Windows Mobile applications. N.B. These Power Toys are NOT supported..
The Power Toys include:

  • Emulator ActiveSync Connection Tool - Allows Activesync to connect to your Emulator session from Visual Studio .NET 2003.
  • ActiveSync Remote Display - Display Pocket PC applications on your desktop or laptop without needing any device side configuration.
  • CECopy - Command line tool for copying files to the device currently connected to desktop ActiveSync.
  • Convert PPC DAT to SP XML - Command line tool for generating Smartphone CABWizSP XML docs from existing Pocket PC CAB files.
  • Hopper - User input stress simulator.
  • JShell - UI version of the Platform Builder Target Control Window.
  • PPC Command Shell - Command shell for the Pocket PC 2003 device.
  • RAPI Debug - Displays detailed information about currently running processes.
  • RAPI Start - Command line tool to remotely start an application on your Pocket PC from your desktop.
  • TypeIt - Send characters/strings to the Smartphone 2003 Emulator via ActiveSync.

Top of page

System Requirements
  • Supported Operating Systems: Windows 2000 Service Pack 3; Windows Server 2003; Windows XP
  • Windows Mobile 2003 based Pocket PCs
  • Windows Mobile 2003 based Smartphones
  • Windows Mobile 2002 based Pocket PCs
  • Windows Mobile 2002 based Smartphones

Not all tools are supported on all listed platforms.

Top of page

Instructions

There are two packages to download. The Emulator Activesync Connection Tool comes as one package. The remaining tools come in a second package.
Emulator Activesync Connection Tool

  1. Start Visual Studio .NET 2003.
  2. Click "Connect Emulator with ActiveSync" on the Tools menu.
  3. From the "Connect Emulator with ActiveSync" dialog, select an Emulator image from
    the dropdown list.
  4. Ensure the selected emulator is not running yet.
  5. Click the Connect button. The emulator will be started and an ActiveSync
    connection will be established with it.
  6. Once the connection is ready, it is OK to close the tool by clicking Exit
    from the menu.

Remaining Power Toys
All the other Power Toys are installed by the second installation package. A shortcut called Windows Mobile Developer Power Toys is created on the Start Menu which will allow you to access the Power Toys. The readme file for each toy explains how the Power Toy is used.

Top of page

Download details: Windows Mobile Developer Power Toys

Posted by krsuncom
개발이야기2007. 8. 14. 11:02

 

How to develop and test device drivers in Windows CE 5.0

by Mike Hall (Oct. 25, 2005)
Foreword: This article by Mike Hall, a technical product manager on Microsoft's Windows CE team, provides an introduction to developing and testing a Windows CE 5.0 device driver. It provides step-by-step instructions for creating a stream driver, creating a custom Windows CE Test Kit (CETK) test, and writing an application to test the driver. It will take approximately 60 minutes to complete.
Note: before beginning, download Windows CE 5.0 Embedded Development Labs.msi from the Microsoft Download Center.


Part 1: Setting Up a Device Driver



In this exercise, you will use Platform Builder to add a project that will act as a device driver.
Before you begin the process of writing drivers, you should understand the purpose of a device driver. Drivers abstract the underlying hardware from the operating system, and better still from an application developer. An application developer shouldn't need to know the specifics of your display hardware or your serial hardware -- for example, whether a serial device is implemented in a Universal Asynchronous Receiver/Transmitter (UART) or a field-programmable gate array (FPGA). For the most part, it makes no sense for an application developer to need to know how the hardware is implemented.

Microsoft Windows exposes application programming interfaces (APIs) for a developer to call into the hardware without needing to know what the physical hardware is. For example, to write to a serial port, an application developer simply calls CreateFile( ) on COMx (where x donates the serial port number you want to open, for example COM1 for serial port 1), calls WriteFile( ) to write some bytes of data to the serial port, and then calls CloseHandle( ) to close the serial port. The same sequence of APIs works no matter what the underlying serial hardware is (or which Windows operating system you are running).
The same is also true of other APIs: If you want to write to a line to the display surface, you would simply call PolyLine( ), MoveToEx( ), or LineTo( ). As an application developer, for the most part, you don't need to know what the display hardware is. There are APIs to call that will return the dimensions of the display surface, the color depth, and so on.
The good news is that developers have a consistent, well-known set of APIs to call. These APIs abstract their application from the underlying hardware. This is crucial because an application developer has no way of knowing whether the application will run on a laptop, Tablet PC, or desktop computer. Whether the computer is running at 1024x768 or 1600x1200, the application developer can query the screen resolution and color depth at run time and therefore doesn't need to build the application to run only on specific hardware.
A driver is simply a dynamic-link library (DLL). DLLs 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 its parent process through a call to LoadLibrary( ) or LoadDriver( ). LoadDriver not only loads the DLL into the parent process address space, but also makes sure the DLL isn't paged out.
How does a calling process know which APIs or functions are exposed from your DLL or driver? The parent process calls GetProcAddress( ), which takes the name of a function and the hInstance of the loaded DLL. The call returns a pointer to the function, if it exists, or NULL if the function is not exposed from the DLL.
Stream drivers expose a well-known set of functions. For a stream driver, you want to be able to write a stream of bytes to the device, or read a stream of bytes from the device. Therefore, in the serial port example used earlier, you would expect the following set of functions to be exposed from your driver: Open, Close, Read, and Write. Stream drivers expose some additional functions: PowerUp, PowerDown, IOControl, Init, and DeInit.
You can use an existing operating system image for the emulator platform (the Basic Lab MyPlatform platform is ideal). You can then add your DLL/driver project to the platform.
After the platform is built and downloaded (this shows that the operating system starts and runs well), you need to create your skeleton driver. You can use Platform Builder New Project or File command on the File menu to create a Microsoft Windows CE DLL. There is no difference between creating a DLL to expose functions or resources and creating a DLL to be used as a driver; the only difference is which functions the DLL exposes, and how the DLL is registered or used on the platform.
As an aside, one way to create internationalized applications is to create a base application that contains one set of core language strings, dialog boxes, and resources, and then create a number of external DLLs, each of which contains the dialog boxes, strings, and resources for a specific locale. The application can then load the appropriate language resources on the fly. You can add languages to the application by simply adding DLL files. This and other interesting topics are described in the book Developing International Software available on the Microsoft Press Web site.
To add a project that will act as the device driver

  1. Use Platform Builder to open the existing MyPlatform workspace.
  2. On the File menu, click New Project or File.
  3. Select WCE Dynamic-Link Library, give it an appropriate name (for example, StreamDrv), and then click OK, as shown in the following illustration.

  4. On the page shown in the following illustration, fill in as much or as little information as you want, and then click Next.

  5. Click A simple Windows CE DLL project, as shown in the following illustration.

  6. Click Finish to complete the wizard.
    At this point, the DLL contains only an empty DllMain function. You can expose functions to be called by an application, expose resources (perhaps to make this part of a language/culture-aware application), or make this into a device driver. In this article, you'll use the Windows CE Stream Driver Wizard to create your skeleton stream driver.
    In Windows CE, stream drivers are opened just like files, and are opened by means of a unique three-letter prefix (for example, COM).
  7. Choose a unique three-letter identifier for your driver. In the Location box, type the full path for the stream driver that you created previously. Or, use the browse button to browse to the PBWorkspaces directory in your Platform Builder installation, find the platform that you created previously, and then find the name of the stream driver (in the earlier example, this was PBWorkspaces\TuxPlat\StreamDrv).
  8. In the Driver Filename box, type a name for the driver. As shown in the following illustration, use the same name that you used earlier (StreamDrv) to ensure that the original file created in Platform Builder is overwritten.

  9. Press Go, and the stream driver source will be generated.

Part 2: Testing the Stream Driver Test Code



You have now written the basic code for a custom stream driver for Windows CE. At the moment, the driver isn't connected to any hardware.
After the driver is written, you need to provide a way for developers to test it. Windows CE ships with a Windows CE Test Kit (CETK), which provides driver tests for a range of driver types, including networking, Bluetooth, serial, and display. The driver that you wrote is a custom stream driver that doesn't expose the same functionality as existing driver tests, so you need to write a custom test for the driver. Although you could just write an application to exercise the driver, it's perhaps better to provide a CETK module that can be used during development and shipped to customers to test the driver on shipping hardware.
In this part of the exercise, you will perform the following procedures:
  • Create a skeleton Tux module
  • Add test code for a custom driver to the Tux DLL
  • Rebuild an operating system
  • Set a breakpoint
To create a skeleton Tux module
  1. In Platform Builder, on the File menu, click New Project or File.
  2. Select WCE TUX Dynamic-Link Library, type TuxTest as the project name, enter a location, click Workspace Project, and then click OK, as shown in the following illustration. (In practice, you can choose either project type; for this article, click Workspace Project).

  3. On the page shown in the following illustration, fill in as much or as little information as you want, and then click Next.

  4. Read the information on the screen shown in the following illustration, and then click Next.

  5. On the final page, you can optionally select CETK under Release Type, as shown in the following illustration. This option turns off optimizations for retail binaries to increase debugging productivity. Click Finish.

  6. Click View | File View, and then expand the Projects tree to show the tux source, as shown in the following illustration.

    The important files to note in the preceding illustration are:

    • ft.h -- This file contains the function table used by the tux DLL.
    • test.cpp -- This file contains the test procedures called from the function table.
    • TuxStreamTest.cpp -- This file contains DLLMain and ShellProc, the latter of which is called from Tux.exe.

To add the custom driver test code to the Tux DLL
  1. Open the source Test.cpp.
  2. Use CodeClip to get the Tux_Custom_Test | TuxCode source.
  3. Replace the contents of the function TestProc with the code from CodeClip.
    You will notice that the code in Test.cpp loads a driver called Demo.dll. For this article, you created a driver called StreamDrv. You will need to modify the source to load your StreamDrv.dll driver.
  4. Locate the source in Test.cpp that calls LoadLibrary, and then modify the name of the driver being loaded from Demo.dll to StreamDrv.dll.
  5. In the Platform Builder File View, right-click the TuxTest project, and then click Build Current Project.
    You also need to add the Windows CE Test Kit component from the catalog.
  6. Under Device Drivers, locate the Windows CE Test Kit component in the catalog, and then select Add the Windows CE Test Kit to add the component to your platform.
Note Adding the component to your platform doesn't add any files to the final operating system image; it adds the Clientside files to the build release folder. From Platform Builder, you can download the Clientside application and run the application on your target device.
To rebuild your operating system
  • In Platform Builder, select Build OS | Sysgen.
    The build process will take approximately five minutes to complete.
It would be useful to set a breakpoint in the entry point of the stream driver to see when the driver is loaded.
To set a breakpoint
  1. Click File View, open the StreamDrv project, and then open Source files.
  2. Locate and open StreamDrv.cpp.
  3. Locate DllMain, and then locate and click the switch statement.
  4. Set a breakpoint by pressing F9.
  5. Download the operating system to the emulation environment by clicking Target | Attach.
    You will see the following debug output, and the breakpoint will fire. Note that this happens long before the user interface (UI) of the operating system has loaded.
    4294780036 PID:23f767b6 TID:23f767e6 0x83fa6800: >>> 
    Loading module streamdrv.dll at address 0x01ED0000-0x01ED5000
    Loaded symbols for
    'C:\WINCE500\PBWORKSPACES\DRVDEMO\RELDIR\EMULATOR_X86_DEBUG\
    STREAMDRV.DLL'
  6. Disable the breakpoint by clicking the switch statement, and then pressing F9.
  7. Allow the operating system to continue loading by pressing F5.
You've now built a Windows CE 5.0 operating system that contains a custom stream driver, and you've seen the driver load during the boot sequence of the operating system.

Part 3: Examining the Driver



In this exercise, you will perform the following procedures:
  • Use a command-line tool to look at the exposed functions from the driver
  • Use the Remote System Information tool to examine the driver
  • Determine that the driver is loaded
The first way to examine the device driver that you created is to look at the exposed functions from the driver. There is a command-line tool that ships with Windows CE called Dumpbin, which you can use to examine the imports to an application or module, or to examine the exports from a DLL (or driver).
To use the command-line tool to look at the exposed functions from the driver
  1. In Platform Builder, click Build OS | Open Release Directory. This action opens a Command Prompt window in the build release folder for your current workspace.
  2. Type dumpbin 뻛xports StreamDrv.dll
    The following illustration shows how the output looks. You can see that all of the expected stream driver functions are exposed from the driver; functions are exposed from a DLL through the project's .def file.

  3. Close the Command Prompt window by typing Exit
    The contents of the StreamDrv.def file are as follows.
    LIBRARY DemoDriver
    EXPORTS
    DEM_Init
    DEM_Deinit
    DEM_Open
    DEM_Close
    DEM_IOControl
    DEM_PowerUp
    DEM_PowerDown
    DEM_Read
    DEM_Write
    DEM_Seek
    CustomFunction
    CustomFunctionEx
The second way that you can examine the driver is through the Remote System Information tool.
To examine the driver through the Remote System Information tool
  1. In Platform Builder, click Tools | Remote System Information.
  2. Select Windows CE Default Platform | Default Device, and then click OK, as shown in the following illustration.

    This procedure connects the Remote System Information application to the current active platform being used by Platform Builder. The following illustration shows the result.

You can also use the list of loaded modules to determine that your driver is loaded.
To determine that the driver is loaded

  • In Platform Builder, use the Target Control window (gi mod), or View | Debug Windows | Modules and Symbols.
    The following illustration shows the result of this procedure.


Part 4: Using the Windows CE Test Kit



The Windows CE Test Kit contains a device-side component and a desktop component. The device side component is called Clientside.exe, which you added to your workspace by adding the CETK component from the catalog. Note that adding the Clientside.exe application to the workspace doesn't add any files to the final operating system image, but it does copy the application to the build release folder.
Before running the CETK on the desktop computer, you need to start the Clientside.exe application on the device. The reason the tools are not linked (like a remote tool) is that the CETK will also operate on shipping (retail) devices, such as the Pocket PC.
In this part of the exercise, you will perform the following procedures:
  • Examine the Windows CE Test Kit user interface
  • Run one of the standard tests
To examine the Windows CE Test Kit user interface
  1. In Platform Builder, on the Tools menu, click Windows CE Test Kit.
    This step starts the Windows CE Test Kit application, as shown in the following illustration. Note that this is not a standard remote tool. Most of the remote tools that ship with Windows CE use the Kernel Independent Transport Layer (KITL), a transport that abstracts the tools from the underlying communication hardware so that the tools will run over Ethernet, serial, 1394, USB, or other transports.
    The Windows CE Test Kit typically connects over sockets, although for Windows CE 5.0, the tools have been updated to also support KITL.

  2. In the Windows CE Test Kit, click Connection | Start Client.
    This step displays the Device Connection dialog box, where you can choose whether to connect over sockets or KITL.
  3. Make sure that the Use Windows Sockets for the client/server communication check box is cleared, as shown in the following illustration.

  4. Click Connect.
    In the standard user interface for remote tools (KITL), select Windows CE Default Platform | Default Device, and then click OK, as shown in the following illustration.

    This procedure starts Clientside.exe on the target device and makes a connection to the target. After the connection is made, the CETK enumerates the supported devices on the target platform, and nonsupported devices are disabled in the CETK.
    After the CETK has connected to the target and enumerated devices, the UI looks similar to the following illustration. Notice that certain hardware categories, such as Bluetooth, IR Port, and Modem, are disabled.

Before adding a custom test to the CETK, you can run one of the standard tests to see how the test behaves.
To run a standard test

  1. In the CETK, expand Windows CE (x86).
  2. Locate and expand Serial Port.
  3. Right-click Serial Port Driver Test, and then click Quick Start.
This step runs just this one test without also running the other selected tests. The UI indicates that the test is in progress, as shown in the following illustration.

The CETK provides updates on the progress of the test and the outcome of the test. You can also examine the debug output in Platform Builder to see the progress of the test, as shown in the following example.

405910 PID:83d4ee4a TID:83ea5a8a *** Test Name:      
Set event mask and wait for thread to close comm port handle
405920 PID:83d4ee4a TID:83ea5a8a *** Test ID: 1007
405920 PID:83d4ee4a TID:83ea5a8a *** Library Path: \serdrvbvt.dll
405920 PID:83d4ee4a TID:83ea5a8a *** Command Line:
405920 PID:83d4ee4a TID:83ea5a8a *** Result: Passed
405920 PID:83d4ee4a TID:83ea5a8a *** Random Seed: 15595
405930 PID:83d4ee4a TID:83ea5a8a *** Thread Count: 1
405930 PID:83d4ee4a TID:83ea5a8a *** Execution Time: 0:00:05.110
405930 PID:83d4ee4a TID:83ea5a8a ***
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If the CETK UI indicates that the serial port test has failed on the emulator (as shown in the following illustration), the failure may not be due to a complete failure of every test. It may indicate that only a portion of the overall test suite has failed, which may actually be expected behavior.

  1. Right-click Serial Port Driver Test [Failed], and then click View Results.
    A window like that shown in the following illustration appears.

    Looking at the results shown in the preceding illustration, you can see that 10 individual tests have been run. All of these tests have passed except for Set and verify receive timeout.
    To get more information, you can click the individual test.


Part 5: Creating a Custom CETK Test



By using the Platform Builder User-Defined Test Wizard, you can create a custom CETK test. This test will verify the exported functions from a custom stream driver (which you've also added to the platform).
In this part of the exercise, you will perform the following procedures:
  • List the custom stream driver test in the CETK
  • Run the custom stream driver test
To list the custom stream driver test in the CETK
  1. In the CETK, click Tests | User Defined.
    This step starts the User-Defined Test Wizard. The first page of the wizard is for information only.
  2. Click Next, as shown in the following illustration.

  3. Click Add a New Test, and then click Next, as shown in the following illustration.

  4. Enter the following information, and then click Next:
    • In the Name of Test box, type Custom Stream Driver Test
    • In the Tux Module (DLL) box, browse to
      C:\Wince500\PBWorkspaces\MyPlatform\RelDir\Emulator_x86_Debug,
      and then select either test.dll or TuxTest.dll (this depends on the name of the Tux test you used in Platform Builder).
    • In the Command Line box, leave the default setting for the current test.
    • In the Processor box, type x86
    The following illustration shows how the information appears on the current wizard page.

  5. Click Copy the files to the directory for user-defined tests, and then click Next, as shown in the following illustration.
You want to copy the custom driver test (your DLL) to the folder for user-defined tests. If you were to delete your existing workspace, the custom driver test would still be intact.

  1. Click Next, as shown in the following illustration.

  2. Click Finish, as shown in the following illustration.
    The CETK application doesn't automatically refresh with the new tests. You need to resynchronize the desktop application to view the newly added test.

  3. Right-click Windows CE (x86), and then click Redetect Peripherals.
    This procedure adds a new driver category called User Tests. You've added only one test, so when you expand this item, you will see only Custom Stream Driver Test.
    Note The DLL for the custom stream driver test has been copied to the following location: C:\Program Files\Windows CE Platform Builder\5.00\CEPB\wcetk\user\x86.
To run the custom stream driver test
  1. In the list of available tests, expand User Tests.
  2. Right-click Custom Stream Driver Test, and then click Quick Start.
    Make a note of the following debug information being displayed in Platform Builder.
    1162630 PID:3c92032 TID:3efe3ea *** TEST STARTING
    1162630 PID:3c92032 TID:3efe3ea ***
    1162630 PID:3c92032 TID:3efe3ea *** Test Name: Sample test
    1162630 PID:3c92032 TID:3efe3ea *** Test ID: 1
    1162640 PID:3c92032 TID:3efe3ea *** Library Path: \test.dll
    1162650 PID:3c92032 TID:3efe3ea *** Command Line:
    1162650 PID:3c92032 TID:3efe3ea *** Random Seed: 26648
    1162650 PID:3c92032 TID:3efe3ea *** Thread Count: 0
    1162650 PID:3c92032 TID:3efe3ea ***
    vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    1162660 PID:3c92032 TID:3efe3ea test:
    ShellProc(SPM_BEGIN_TEST, ...) called
    1162660 PID:3c92032 TID:3efe3ea BEGIN TEST:
    "Sample test", Threads=0, Seed=26648
    1162690 PID:3c92032 TID:3efe3ea
    Custom Stream Driver Test Starting
    1162690 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Loading Demo.DLL
    1162710 PID:3c92032 TID:3efe3ea 0x83d3dc28: >>>
    Loading module streamdrv.dll at address 0x01ED0000-0x01ED5000
    1162720 PID:3c92032 TID:3efe3ea StreamDrv - DLL_PROCESS_ATTACH
    1162720 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Loaded Demo.DLL OK
    1162740 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Checking Interfaces...
    1162740 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Checking DEM_Open
    1162740 PID:3c92032 TID:3efe3ea
    Custom Driver Test - DEM_Open OK
    1162740 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Checking DEM_Close
    1162750 PID:3c92032 TID:3efe3ea
    Custom Driver Test - DEM_Close OK
    1162750 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Checking DEM_Read
    1162750 PID:3c92032 TID:3efe3ea
    Custom Driver Test - DEM_Read OK
    1162770 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Checking DEM_Write
    1162790 PID:3c92032 TID:3efe3ea
    Custom Driver Test - DEM_Write OK
    1162790 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Checking DEM_Init
    1162790 PID:3c92032 TID:3efe3ea
    Custom Driver Test - DEM_Init OK
    1162790 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Checking DEM_Deinit
    1162800 PID:3c92032 TID:3efe3ea
    Custom Driver Test - DEM_Deinit OK
    1162800 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Checking DEM_PowerUp
    1162800 PID:3c92032 TID:3efe3ea
    Custom Driver Test - DEM_PowerUp OK
    1162800 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Checking DEM_PowerDown
    1162810 PID:3c92032 TID:3efe3ea
    Custom Driver Test - DEM_PowerDown OK
    1162810 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Checking DEM_IOControl
    1162810 PID:3c92032 TID:3efe3ea
    Custom Driver Test - DEM_IOControl OK
    1162810 PID:3c92032 TID:3efe3ea
    Custom Driver Test - Checking DEM_Seek
    1162820 PID:3c92032 TID:3efe3ea
    Custom Driver Test - DEM_Seek OK
    1162830 PID:3c92032 TID:3efe3ea StreamDrv - DLL_PROCESS_DETACH
    1162840 PID:3c92032 TID:3efe3ea 0x83d3dc28:
    <<< Unloading module streamdrv.dll at address 0x01ED0000-0x01ED5000
    1162870 PID:3c92032 TID:3efe3ea test:
    ShellProc(SPM_END_TEST, ...) called
    1162870 PID:3c92032 TID:3efe3ea END TEST:
    "Sample test", PASSED, Time=0.180
    1162870 PID:3c92032 TID:3efe3ea ***
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    1162870 PID:3c92032 TID:3efe3ea *** TEST COMPLETED
    1162880 PID:3c92032 TID:3efe3ea ***
    1162880 PID:3c92032 TID:3efe3ea *** Test Name: Sample test
    1162880 PID:3c92032 TID:3efe3ea *** Test ID: 1
    1162890 PID:3c92032 TID:3efe3ea *** Library Path: \test.dll
    1162890 PID:3c92032 TID:3efe3ea *** Command Line:
    1162890 PID:3c92032 TID:3efe3ea *** Result: Passed
    1162900 PID:3c92032 TID:3efe3ea *** Random Seed: 26648
    1162910 PID:3c92032 TID:3efe3ea *** Thread Count: 1
    1162910 PID:3c92032 TID:3efe3ea *** Execution Time: 0:00:00.180
    The test completed without any warnings or errors. You can also examine the test results in the client.

Part 6: Determining Who Owns the Stream Driver



So far, you've seen the custom stream driver load through Platform Builder debug messages, through a breakpoint in the driver source, and through a custom CETK test.
In this part of the exercise, you will perform the following procedures:
  • Use the Remote Process Viewer to determine which process is loading the driver
  • Display information
To use the Remote Process Viewer to determine which process is loading the driver
  1. In Platform Builder, click Tool | Remote Process Viewer.
    The Process Viewer application displays a list of all the currently running processes, in addition to the DLLs or modules loaded into each process address space.
  2. Locate and select device.exe.
The following illustration shows the list of DLLs loaded into the Device.exe process address space. Device.exe is the device driver manager for Windows CE.

To display information
By using Platform Builder, write a Microsoft Win32 application that writes data to the custom stream driver and reads back and displays the information. You can use the MessageBox API to do this.
The APIs that you need for this task are:

  • CreateFile
  • WriteFile
  • ReadFile
  • CloseHandle
  • MessageBox

Summary


  • Drivers are simply DLLs.
  • Drivers are mapped into the Device.exe process address space.
  • Drivers expose a known set of interfaces.
  • It's relatively easy to add a device driver to a Windows CE operating system image.
  • The Windows CE Test Kit is available to assist with the development and debugging of a platform.
  • Writing custom CETK tests is fairly easy.


Copyright ?2005 Microsoft Corp. All rights reserved. This article was initially published on Microsoft's MSDN website. Reproduced by WindowsForDevices.com with permission.

Related stories:

How to develop and test device drivers in Windows CE 5.0

Posted by krsuncom
개발이야기2007. 8. 14. 10:10

 

참으로 안타까운 일이다.  설정이 이렇게 독특하다니.  이런건 도데체 누가 알려주는것일까??

어쩄거나 수많은 사람이 쓰는 Gmail 이 설정 가능하다니 다행이긴 하다. 좀전에 해 보았는데 잘 되는듯 보인다.

이건 삼성에서 알려줘야하는건가????  SKT 에서 알려줘야 되는건가???...영 ~~감이 안옴.

Quick Tip: POP Gmail on Blackjack

November 22nd, 2006 by Brandon Steili

Thanks to dre3101 for this — Original post here

Gmail in your inbox … here’s a handy workaround for your Smartphone (and maybe PDA) to have gmail in your inbox… 

  • Setup your Gmail account to allow POP access (this is done in the settings section)
  • Go to Messaging on the Blackjack
  • Click on New Account
  • Select Other POP3/IMAP. Click Next.
  • Enter your Gmail information (name, email address). Click Next.
  • Click Next again to skip the automatic download of settings.
  • Enter your Gmail username like this: recent:username@gmail.com, enter your password. Click next.
  • Click next on the Server Type screen. (POP3 is correct) (You can alternately rename the account name here to make it easy to recognize)   READ ON FOR MORE!!!
  • Type
    in pop.gmail.com for incoming server, smtp.gmail.com for outgoing.
    Make sure that all of the SSL boxes are checked. Click next.
  • On the download the following messages screen, select all messages, and entire message. Click next.
  • Have it check every 15 minutes. Click next.
  • Click finish.
  • Click Yes to confirm.

At
this point, you are good to go. If you use Outlook or the like for an email program, your emails will show up in both places now. Your Blackjack will have the exact same emails.

UNLIMITED DATA IS GOING TO BE IMPORTANT!

Also, just as an FYI - this can run side by side with an Exchange sync!!

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.

Quick Tip: POP Gmail on Blackjack - Just Another Mobile Monday - Mobile News, Views and Reviews

Posted by krsuncom
개발이야기2007. 8. 13. 21:00

 

Other Registry Tweaks

These registry tweaks either need categorizing, or do not fit any of the existing categories.


For further tweaks, see: WM5 Tweaks - Performance and http://www.pocketpctweaks.com/


Note to editors:

When editing, please make sure to disable the "[ ] Use Old Markup" option for display formatting reasons.


EXAMPLE - TRY NOT TO EDIT/DELETE

Tweak to do something

To do this and that, adjust the following registry value:

HKLM\Software\Microsoft\Something\SomeValue = 1 (DWORD decimal)

To do something different entirely, perhaps the opposite, do this:

HKLM\Software\Microsoft\Something\SomeValue = 0 (DWORD decimal)

This is an additional note


UI Modifications

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)

The default thickness is 13. You can set the value to pretty much anything you like

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)

The default length is 13. You can set the value to pretty much anything you like

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)

Note that your PocketPC screen's LCD red/green/blue ordering required for proper ClearType display is only correct for Portrait display. You may or may not prefer to leave ClearType in Landscape mode disabled

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)

Note 1: If you switch to the Analog clock display, the date will remain visible -through- the Analog clock
Note 2: Setting the clock to show 'nothing' will still keep the reserved space, showing the taskbar background, and obscure any icons that will shift to the right.
Note 3: Your date may get obscured by the space reserved for the OK/Close button in the top-right. You can fix this my adding spaces at the end of your 'Short Date Format'. See also the tweak on 'Change the Short Date Format'

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)

Note that your device -and- your network operator need to support Edge, otherwise you won't see it. Also note that if you connect to GPRS, you will still see the 'G' icon.

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

Note that '2' stands for the Connections tab, '1' is System and '0' would be Personal
Note also that this has reportedly disabled one person's USB connectivity. To restore, set "GPS Program Port = None", "GPS Connection Port = None", "Automatic GPS Management = on"

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)

Note that this icon and its feature may not be available on your device at all.

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)

Note that this icon and its feature may not be available on your device at all. For example, the HTC Wizard regularly ships with a battery indicator in the Tray instead, governed by "Windows\Startup\Init_Tray.exe"._
_Note also that this reportedly does not work on AKU2 ROMs to remove the new battery indicator

Show slide-out keyboard caps/dot icon next to SIP

If your device contains a file called "capnotify.exe", try running it (most devices that have it will already have it in the Windows\StartUp\ folder), and setting the following value to get a visual presentation of whether you are in caps or dot (alternate key function) mode:
HKCU\ControlPanel\Keybd\EnableIndicator = 1
Please note that if your device has no external keyboard with caps/dot mode, you won't gain anything from this tweak
Please also note that the application "?CapNotify.exe" must be running (normally found in \Windows\?StartUp\ already) for this to work

Put custom text on bottom-right of Today screen

You can set some piece of text on the bottom-right of the Today Screen by setting the following key:

HKLM\Software\Microsoft\Shell\DeviceBeta\Today = "Hello World" (REG_SZ string, no quotes)

Please note that this text won't take up Today item text. It will be obscured by Today items.


File Locations

Change the location of My Documents

Documents are opened in and saved to the device's internal storage by default. You can change this location to, for example, your Storage Card:

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)

Please note that many applications do not support being installed on the Storage Card and may behave unpredictably, including crashing.

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)

For other codes, see: http://www.microsoft.com/globaldev/reference/winxp/xp-lcid.mspx

Change the keyboard backlight duration

To change the duration of the keyboard backlight, you can set (example is 30 seconds):

HKCU\ControlPanel\Backlight\QKeyLedTimeout = 30 (DWORD decimal)

Please note that this may not work on some devices. One such notable exception is the HTC Wizard.

Change the application launched by Today screen Soft Keys

To change the application launched by the Today screen Left soft key:

HKCU\Software\Microsoft\Today\Keys\112\Open = "\Windows\Calendar.exe" (REG_SZ string, including quotes)

To change the title of the Left soft key:

HKCU\Software\Microsoft\Today\Keys\112\(Default) = "Calendar" (REG_SZ string, no quotes)

To change the application launched by the Today screen Right soft key:

HKCU\Software\Microsoft\Today\Keys\113\Open = "\Windows\Start Menu\Programs\Contacts.lnk" (REG_SZ string, including quotes)

To change the title of the Right soft key:

HKCU\Software\Microsoft\Today\Keys\113\(Default) = "Contacts" (REG_SZ string, no quotes)

Note that 113 normally doesn't exist by default, and probably needs to be created
Also note that there is at least 1 application that allows you to set these through a GUI, developed by FdcSoft called SoftKeyAppletEx.

Set default SIP

The default SIP (Secondary Input Panel) on practically every device is the Keyboard. You may prefer entry with a different SIP. If so, you can set this to be the default SIP through:

HKCU\ControlPanel\SIP\DefaultIM = |SIP ClassID|

The |SIP ClassID| will depend on the SIP's ClassID, which may vary per-device. You can find the correct ClassID by searching for "IsSIPInputMethod" in HKCR, then going to the top key and checking the name of the SIP that's in the (Default) value.
Please note that this doesn't work with all SIPs. Transcriber/Calligrapher are two examples of this.
You can, however, set Transcriber as the default SIP by starting Transcriber.exe on startup. (This should be moved to, or added to, non-registry Tweaks page)
WARNING: Do not assume that the below ClassIDs would be -as found- on your device! Setting it to a non-existant SIP may prevent your device from booting up!
WARNING: If you set an invalid value in DefaultIM (or apparently if you're running a recent AKU http://forum.xda-developers.com/showpost.php?p=1032402&postcount=800), then you'll probably have to hard reset your device. NOTE: An alternative means of changing the default SIP is by using the SIPChange utility: http://forum.xda-developers.com/showpost.php?p=995883&postcount=16
The following are some of the ClassIDs typically found:

Typical pre-installed:
{42429667-ae04-11d0-a4f8-00aa00a749b9} = Keyboard
{51A2CB38-154E-4C92-A625-A83871C99EC2} = Phone Pad
{42429690-ae04-11d0-a4f8-00aa00a749b9} = Letter Recognizer
{42429691-ae04-11d0-a4f8-00aa00a749b9} = Block Recognizer
{F0034DD0-2AD4-11d1-9CB0-E84BE8000000} = Transcriber
Third Party:
{991A1001-9DCB-11d3-B3C2-000000000000} = AccessPanel
{1E03E205-12D7-4d82-963E-C01889F2EC10} = Claviature
{500AEF94-EBB8-11d4-B1F8-00304F06E973} = Decuma Alphabetic (UNCONFIRMED!)
{95BDB641-772F-11d2-AC6B-204C4F4F5020} = Fitaly
{52429695-AE04-11D0-A4F8-00AA00A749B9} = FleXslide
{4EAD10BD-83AC-44b9-99AE-71958C1B0F0E} = InPad
{C099F78A-924E-4814-A8CF-54E7BD8C2124} = JetKeys
{4128DEE4-EE84-4338-A261-CC704CB32C19} = NanoPad
{42429695-AE04-11D0-A4F8-00AA00A749B9} = NullKB
{025ECAC2-075B-4b82-A972-05E4C17719EA} = PDAMedia Excel
{FA957346-A925-4b68-B9E1-D3D0310F4433} = PDAMEdia KBD
{DE6510EF-6691-401D-B1D3-B9074BFD1555} = PHM Character Map
{81FC2CAD-AD71-4793-9464-36D27630E584} = PHM Clipboard Pane
{9DD23292-0AB3-48F2-A245-0713652A8CEE} = PHM Ext. Keyboard
{FFFD6819-FF21-4e93-B844-A1BBF986B55C} = QuikWriting
{991A1000-9DCB-11d3-B3C2-000000000000} = RapidCalc
{A070BE16-AD56-11d3-BC77-00C06C512035} = Resco Keyboard Pro
{7F0854D9-9ADA-45A9-A3A2-189D9BE8A653} = Smilies Input Panel
{26F56EF0-2CE8-4C46-ADC8-FE0A7DF12DD1} = SPB Fullscreen Keyboard
{5efab5bd-0af5-48f8-abec-6f36e3a0b5af} = TenGo
{8A7968F3-677B-4F64-859C-8A49FCCCB9BF} = TextPlus
{A5304BFA-CC1D-493f-87D3-D9C17147FA32} = TopKey
{4345EA53-B8A5-4E24-A14A-F7C34DD78077} = WordLogic

Add/remove items from the SIP list

If you have a few items in your SIP list which you don't use, they can be removed from the list by setting the IsSIPInputMethod for each item you want removed. To remove the SIP from the list, replace the $SIP_CLSID$ in the example below with a CLSID from the Set default SIP tweak.:

HKEY_CLASSES_ROOT\CLSID\$SIP_CLSID$\IsSIPInputMethod\(Default) = 0 (DWORD decimal)

To add it back to the list:

HKEY_CLASSES_ROOT\CLSID\$SIP_CLSID$\IsSIPInputMethod\(Default) = 1 (DWORD decimal)


Pocket Calendar

Show Calendar event text in Week View

If you wish to see a Calendar event's text in the Week View, set the following:

HKCU\Software\Microsoft\Calendar\ShowTextInWeekView = 1 (DWORD decimal)

To disable it again:

HKCU\Software\Microsoft\Calendar\ShowTextInWeekView = 0 (DWORD decimal)

Please note that your event must have long enough a duration to show the event text, and the week view (with its narrow columns) truncates long words easily
Also note that the key "Calendar" may not exist - just create it if it doesn't

Change Calendar 'working days'

If you wish to change the 'working days' in the calendar, adjust the following:
For a Mon-Fri workweek (default):

HKLM\Software\Microsoft\Calendar\ActiveTimes\ActiveTimes = 2210003E (DWORD hexadecimal)

For a Mon-Sat workweek:

HKLM\Software\Microsoft\Calendar\ActiveTimes\ActiveTimes = 2210007E (DWORD hexadecimal)

For a Tue-Thu workweek:

HKLM\Software\Microsoft\Calendar\ActiveTimes\ActiveTimes = 22100016 (DWORD hexadecimal)

Here's how this works. When editing the value, switch to "Binary" mode. For the default Mon-Fri, you should see:

100010000100000000000000111110

The last 7 numbers are what we're interested in. They stand for the days of the week, in reverse order: Saturday, Friday, Thursday, Wednesday, Tuesday, Monday, Sunday. When the number is "1", it is a working day. If it is "0", it's not a working day. So to look at the above examples again:

Days   : SFTWTMS
Mon-Fri: 0111110
Mon-Sat: 1111110
Tue-Thu: 0011100

Using the above, you should be able to set the working days to whatever you'd like.
Note that this value also adjusts the working HOURS. The examples here all use the default 8am-5pm workday. See the "Change Calendar 'working hours'" tweak to modify this.
Note that the ActiveTimes key and value may not exist. Simply create them first.

Change Calendar 'working hours'

If you wish to change the 'working hours' in the calendar, adjust the following:
For 8am-5pm (default):

HKLM\Software\Microsoft\Calendar\ActiveTimes\ActiveTimes = 2210003E (DWORD hexadecimal)

For 9am-5pm:

HKLM\Software\Microsoft\Calendar\ActiveTimes\ActiveTimes = 2212003E (DWORD hexadecimal)

For 2pm-10pm:

HKLM\Software\Microsoft\Calendar\ActiveTimes\ActiveTimes = 2C1C003E (DWORD hexadecimal)

See here: http://www.pocketpcthoughts.com/index.php?action=expand,47926

XDADeveloperWiki - WM5_Tweaks_Other

Posted by krsuncom
개발이야기2007. 8. 13. 20:59

 

WM5 Registry Tweaks - Performance

These Registry tweaks are typically used to improve performance of Windows Mobile 5. (This content was split off from WM5_Tweaks_Other because that page would no longer accept additional content.)


For further tweaks, see: WM5 Tweaks - Other and http://www.pocketpctweaks.com/


Note to editors:

When editing, please make sure to disable the "[ ] Use Old Markup" option for display formatting reasons.


EXAMPLE - TRY NOT TO EDIT/DELETE

Tweak to do something

To do this and that, adjust the following registry value:

HKLM\Software\Microsoft\Something\SomeValue = 1 (DWORD decimal)

To do something different entirely, perhaps the opposite, do this:

HKLM\Software\Microsoft\Something\SomeValue = 0 (DWORD decimal)

This is an additional note


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)

You can set the value to pretty much anything you like, but suggested values are 4096, 8192, 16384 & 32768.

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)

Note that by default, the cache size is zero, and you will see no effect. See "Increase FileSystem cache" below to increase the cache size.

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)

You can set the value to pretty much anything you like.

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)

You can set the value to pretty much anything you like.

XDADeveloperWiki - WM5_Tweaks_Performance

Posted by krsuncom
개발이야기2007. 8. 6. 19:08

원문: 요기

HKLM/Software/Microsoft/Bluetooth/A2DP/Settings
Add new dword, Value name=BitPool; Value data=48 (Decimal)
Modify, Value name=UseJointStereo; Value data=0 (Decimal, Originally 1)
For BitPool:
Microsoft suggests the following bitpool values for optimal buffer sizes.
30 - Low audio quality
40 - Medium audio quality
48 - High audio quality
58 - Excellent audio quality
Chose one you like. I think 48 is good enough.
For UseJointStereo: use 0 instead of 1, then you got the real stereo.......
BTW, if you lost your modification after soft reset, you might try to "totally" close the reg editor you use before soft reset.
And chosing an "appropriate" A2DP headset is quite important. Some just don't work well with this device

HowardForums: Your Mobile Phone Community & Resource - Bluetooth Stereo (A2DP) on Qtek 8500

Posted by krsuncom
개발이야기2007. 8. 6. 19:04

원문 :

요기

Lightbulb WM6 A2DP best settings here


After discussions with Sleuth255, I've done some further testing on the registry settings and found some optimum settings for A2DP. These are applicable to the newer releases of WM6.
Finding #1:
ADD/CHANGE the following values from the registry at HKLM\Software\Microsoft\Bluetooth\A2DP\Settings :
Name: UseJointStereo
Value (DWORD): 1
What this does is enable Joint-Stereo for the SBC codec, which is important and makes the biggest significant change to improve sound quality. (Note: In earlier versions of WM5 and WM6, Joint-Stereo was broken and resulted in a mono-output. This is not the case anymore with the newer WM6 ROMS.)
Further note: Sleuth255 found that some of his A2DP headsets could not work with JS turned on. In that case, you have to set the value to 0 to disable JS (resulting in poorer quality sound with more "hissing").
Finding #2:
REMOVE the following values from the registry at HKLM\Software\Microsoft\Bluetooth\A2DP\Settings if they are present:
- BitPool
- MaxSupportedBitPool
These values are used to manually set limits for the BT stack for the A2DP SBC codec. Previously, it was thought that these values should be set between 38 to 86. But if the values are removed, I think that the BT stack automatically chooses the best BitPool values for maximum quality. I've tried removing these values and the sound quality either improved or at least stayed the same.
[ SUMMARY ]
At this point, you should have only one value in the registry at HKLM\Software\Microsoft\Bluetooth\A2DP\Settings:
UseJointStereo = 1
Your A2DP audio should be very good at this point - almost indistinguishable from a wired headset. However, if you are still unsatisfied with the sound (you may notice some very slight "hissing" or "swishing" sounds on high frequencies of certain songs), you may want to try the optional setting below.
[ OPTIONAL ]
Finding #3:
This is optional, and a matter of preference.
ADD the following value to the registry at HKLM\Software\Microsoft\Bluetooth\A2DP\Settings:
Name: SampleRate
Value (DWORD): 48000 (decimal)
This forces the A2DP stack to send the audio to the headset at 48000Hz instead of the default 44100Hz. For some reason, I find that the 48Khz value makes the "hissing" sounds less obvious. Your findings may vary, as some people may prefer the slightly more forward sound of the original setting. But if you are game, give this a try - one thing for sure is that it definitely changes the sound quality.
To reverse the change, just remove the SampleRate value.
If you make this 3rd optional change, you should have the following values in the registry at HKLM\Software\Microsoft\Bluetooth\A2DP\Settings:
UseJointStereo = 1
SampleRate = 48000
[ Note - Quick tip on registry editing ]
Of course, every registry change needs a soft-reset to take effect. And please take the usual proper care when editing the registry or risk damaging your device.
Find that your settings dont "stick" after a reset?
Make sure you reset the phone like this: After making changes to the registry, exit your registry editor. Then press and hold the power button of your phone for about 5 seconds, a window should pop up asking you if you want to shutdown your phone (click Yes). Once the phone has shut down, press and hold the power button for a few seconds until the phone starts up again.
Happy listening! BTW, I find that Mortplayer is an excellent MP3 player to use with A2DP. It works well with the control buttons on my headset.


Last edited by hardcore : 05-06-2007 at 06:48 PM.

WM6 A2DP best settings here - xda-developers

Posted by krsuncom
개발이야기2007. 8. 6. 12:53

 

Windows CE Developers FAQ

Welcome to the CEGadgets Windows CE Developer FAQ page! Here you will find answers to common (and not so common) Windows CE development questions. This FAQ tries to avoid basic Windows CE issues (what is Windows CE, what is activeSync) and instead serves as a technical document discussing Windows CE specific development issues. Also, this FAQ avoids embedded specific issues, and focuses more on application development.

If you have something you want to add, or find a problem, send a note to faq@cegadgets.com explaining the problem or addition. I will update the FAQ ASAP and give you credit for it as well. Thanks!

This FAQ was last updated 27-Mar-01. Also, notice that new and updated items show in a separate section (as well as in the main contents list). Items will remain in the new/updated section for one week.

1. General
1.1 Why should I write software for Windows CE?
1.2 What does the CE in Windows CE stand for?
1.3 I want to learn about Windows CE development. Where should I start?
1.4 What books are available for Windows CE developers?
1.5 What are some other developer related Windows CE websites?
1.6 Where can I find information on DevCon 99?
1.7 I need to learn CE in a hurry - can I take a class?
1.8 Things to consider before you design that new Windows CE application.
1.9 I want to develop using Visual C++. What do I need?
1.10 I want to develop using Visual Basic. What do I need?
1.11 What other development tools are available for windows CE?
1.12 How do I report bugs (or feature requests) in Windows CE development tools?
1.13 Should I get a copy of Platform Builder 2.11/2.12?
1.14 Where can I find a MIPS or SH3 disassembler?
1.15 Can I write DCOM application under Windows CE?
1.16 Is the SH4 binary compatible with the SH3?
1.17 Does Windows CE support COM?

2. Visual C++ Issues
2.1 What do I really need to write C++ apps for Windows CE?
2.2 Do I need to purchase the Windows CE Toolkit for C++ or Basic to develop for CE?
2.3 Can I use Visual Studio SP3 with the Toolkit for Windows CE?
2.4 Can I use Windows 95/98 to build Windows CE applications?
2.5 My MFC app doesn't run on the device the first time I try?
2.6 I keep getting internal compiler errors? How do I make them go away?
2.7 I use a serial connection to debug and use programs like Remote Spy, but the serial connection speed is slow. How can I make it faster?
2.8 How can I copy files to the emulator?
2.9 Can I use C++ exceptions in my Windows CE application?
2.10 Can I use STL in my Windows CE application?
2.11 I populate my combobox using the resource editor, yet when I run my application under CE all I see is garbage. What can I do?
2.12 Is there a way to edit my Visual C++ files on my handheld?
2.13 How does compiler optimization affect Windows CE executables?
2.14 Where is the Windows CE C runtime library? Is source for the runtime available?
2.15 How can I develop applications for Windows CE 1.0?
2.16 I want to port my Windows desktop application to Windows CE.  What issues will I face?
2.17 I can compile for the MIPS and SHx processors, but I don't see an option for the StrongArm.  What can I do?

3. Third Party Tools and Hardware
3.1 Which databases are available on the Windows CE platform?
3.2 Are there any Text-To-Speech engines for the CE platform?
3.3 I want to write an MP3 decoder for Windows CE. Where do I start?
3.4 Are there any printer libraries for Windows CE?
3.5 How can I work with Pocket Outlook data?
3.6 Is there an FTP client API available for Windows CE?
3.7 How can I copy-protect my Windows CE application?
3.8 Where can I find an XML parser for Windows CE?
3.9 Is GCC available for the Windows CE platform?

4. Windows CE Overview
4.1 How many processes can Windows CE support?
4.2 How many threads can Windows CE run?
4.3 What does the basic Windows CE memory map look like?
4.4 What is Execute-In-Place (XIP) and what does it mean for me?
4.5 I want to make my own shell. Where should I start?
4.6 Can I trash my object store by turning off the power during a file operation?
4.7 How much stack space can I use per thread?
4.8 Why does my Windows CE 2.0 stack blow out, even if I allocated it at compile time?
4.9 What kind of limitations will I encounter using the CE Database?

5. General Windows CE Development
5.1 I can't find an API that I need. What should I do?
5.2 How can I insure only one instance of my application?
5.3 How can I make I application startup on system startup?
5.4 How can I prevent other applications from running while my application is active (how can I keep users from accessing the Start Menu)?
5.5 How can I change task bar settings such as Auto Hide?
5.6 How do I keep my device from auto-suspending?
5.7 How do I detect power-on?
5.8 How can I programmatically turn off the device?
5.9 How can I get battery status?
5.10 How can I determine the device type?
5.11 How can I determine the device name?
5.12 How can I initiate a connection to the desktop?
5.13 How can I tell if ActiveSync is currently running?
5.14 How can I programmatically change the display brightness?
5.15 How do I reboot/reset the device?
5.16 How can I change the size of the object store?
5.17 How can I reprogram the buttons on the device? Can I use hardware buttons to initiate application functionality?
5.18 I am writing a dialog based application. Why doesn't an entry appear in the taskbar or in the task list?
5.19 I want to modify the contact database. What is the contact database name or CEOID?
5.20 What is Venus?
5.21 What is Cedar?
5.22 When is MSMQ going to be available?
5.23 How do I get the time under CE - or, what happened to time()?
5.24 How can I convert a pwi to an rtf?
5.25 How can I determine whether the device has been rebooted/reset since the last time the application ran?
5.26 How can I make a resource only DLL under Windows CE?
5.27 How can I determine the current SIP state?
5.28 How can I change the current SIP state?
5.29 How can I enable or disable the Jot SIP?
5.30 I need an ownerdrawn listbox but they are unsupported. What should I do?
5.31 How can I implement a list view with a checkbox next to each item?
5.32 What is POOM and should I use it?
5.33 How can I programmatically launch a dial-up connection (without using the RAS API)?
5.34 How can I write or read a physical memory location?
5.35 How can I enumerate Windows CE databases from the desktop?
5.36 I need to use IrDA to communicate with other devices. Where should I start?
5.37 How can I show the wait cursor, especially from VBCE?
5.38 How can I print from a Windows CE application?
5.39 How do I register a control under Windows CE?
5.40 I am having problems getting CE RAPI to work properly. What can I check?
5.41 I want to create a mail message then send it. Can I do this using the Mail API?
5.42 How can I display GIF, JPG, BMP, or XBM images in my application?
5.43 Why can't I display 16-bit images from my application using imgdecmp.dll?
5.44 What steps can I take to make my software ready for foreign markets?
5.45 How can I open, change and delete mail messages?
5.46 How can I use ATLCE to sink events?
5.47 Do the Pocket Office applications support automation? Can I use them from VCCE, VBCE?
5.48 I am using VBCE and need to call API functions that require structures, but UDT's are not available.  What can I do? What should I watch out for?
5.49 How can I turn on the device when the serial port has activity?
5.50 How can I start applications on device connect/disconnect?
5.51 Do you have any tips on getting more out of HTMLView?
5.52 How do I get the name of a ADOCE table if I only have an Table ID number?
5.53 How can I determine the amount of free space on storage cards, on the device and in memory?
5.54 How can I disable the OK button on my Windows CE dialogs?
5.55 Which common dialogs are supported under Windows CE?

6. Palm Size Development Issues
6.1 If I don't implement an exit menu item, is there anything I can do to make closing the application easier?
6.2 Why should I pay any attention to WM_HIBERNATE?

7. Common Executable Format (CEF)
7.1 What is CEF?
7.2 Can I use CEF in my current applications?
7.3 Can I have a CEF based dll or ocx?
7.4 Why should I use CEF?
7.5 Is CEF as fast as an application compiled for the platform?
7.6 If I am only targeting one specific device should I use CEF?

8. Installation
8.1 What install packages are available?
8.2 How do I programmatically open a cab file on a CE device?
8.3 How do I start an installation from the desktop?
8.4 How can I keep a cab file from being erased after it is installed?
8.5 What command line switches are available for CeAppMgr?
8.6 My install set is having trouble registering controls on Palm-Size PC devices. What am I doing wrong?
8.7 How can I programmatically open a .CAB file?

9. Help
9.1 What format is Windows CE Help in?
9.2 How should I create help files?
9.3 How can I programmatically launch help?

10. Internal/Undocumented/Hack Corner
10.1 Ways to explore windows CE.
10.2 Hack while you can - it will be harder soon.

10.3 BinaryCompress/BinaryDecompress - built in compression for windows ce

10.4 SetProcPermissions - give your process access to other processes!
10.5 RegFileCopy - make an instant copy of the registry
10.6 GetFSHeapInfo - pointer to object store in physical memory
10.7 Predict.dll offers access to word prediction on Palm Size PC's
10.8 Inspect ROM on the Casio E-100 and find interesting things.
10.9 SetWindowsHookEx really does work, sort of.

10.10 Calstore.dll can be used to access the task database API set.
10.11 How can I reformat a compact flash card?

11. Known CE bugs
11.1 Createprocess on pspc devices doesn't work
11.2 MFC CE 6.0 - Gettime with city set to foreign city. Returns 7/22/1863.
11.3 The voice control will not write recordings to any filename except the default.
11.4 The 6.0 StrongArm compiler creates buggy code.

12. Windows CE Gossip Corner
Note: These are all unverified and included just because they are interesting.
12.1 PPTP will be available in 3.0 but not 2.12.
12.2 A new grid control will be released soon.

12.3 The 2.12 version of Imgdecmp.dll supports 24-bit bitmaps.
12.4 When will VCCE 6.5 be released?

1. General

1.1 Why should I write software for Windows CE?

PDA's are booming! Marketing research organizations like IDC project 40% annual growth in handheld device through 2001. Handheld's are also taking off in the enterprise, and are predicted to be the next big enterprise computing platform.

IDC predicts that consumer 'info appliances' will surpass PC sales in 2001, reaching almost 20 million units.

Windows CE is poised to capitalize on this rapid growth. Microsoft is positioning Windows CE to be an easy choice for enterprise development and use, and is working with many OEM's to promote general consumer use and acceptance of Windows CE.

If you have any experience developing for the Windows platform, you can develop for Windows CE. Other platforms cause you to learn new tools and API's, and do not have the broad support of Microsoft and it's partners. Leverage your knowledge and Microsoft's marketing muscle and start coding for CE!

1.2 What does the CE in Windows CE stand for?

While Microsoft claims the CE does not represent any particular meaning, it has been said that it stands for Consumer Electronics (for the devices CE targets) or Compact Edition. When you are really frustrated with a particular problem or shortcoming you can refer to it as Windows CE (Crippled Edition).  I also like Caveat Emptor.

1.3 I want to learn about Windows CE development. Where should I start?

There are many excellent development resources for Windows CE. First, check out the Windows CE related newsgroups:

Microsoft.public.win32.programmer.wince
Microsoft.public.vb.vbce
Microsoft.public.windowsce
Microsoft.public.vc.vcce
Microsoft.public.ado.wince
Microsoft.public.windowsce.developer.betas
Microsoft.public.windowsce.embedded

Also, check www.deja.com for a nice archive of Windows CE posts going back years. This is probably my number one Windows CE resource.

I also really like the windowsce-dev mail list.  It probably has the purest technical Windows CE content of any source, and is monitored by some of the best CE developers I've seen.  It contains a mix of embedded and application development questions.  I also tend to see issues pop up on this list before they show up on the regular newsgroups.  For example, I read about the Platform Builder price increase 3 weeks before it started being discussed on the newsgroups.  To join, send an email to WindowsCE-Dev@Lists.WindowsCE.com

Check out some of the books mentioned in this FAQ, and visit some of the other Windows CE developer websites.

Finally, there is nothing like experience. If you can afford it, purchase the Microsoft development tools, NSBasic or one of the other development tools available for the platform. Try building a few applications. If you have previous Windows development experience you will find Windows CE development to be only mildly painful ;-)

1.4 What books are available for Windows CE developers?

Here is a list of some of the Windows CE development books available, in no particular order:

  • Inside Windows CE - John Murray
  • Programming Embedded Systems for Microsoft Windows Ce - Jeff McLeman
  • Professional Visual Basic Windows CE Programming - Larry Roof
  • Programming Windows CE - Douglas Boling
  • Windows CE 2 Programming for Dummies - Nick Gratten
  • Essential Windows CE Application Programming - Robert Burdick
  • Windows CE Developers Handbook - Terence Goggin
  • Windows CE from the Ground Up - Jean Louis Gareau (annabooks web site).
  • Sams Teach Yourself Windows CE Programming in 24 Hours - Bsquare
  • Windows Ce : Application Development - Keven Millsap, Marshall Brain

1.5 What are some other developer related Windows CE websites?

Here are some CE developer websites:

Samples, SDK's and other tools.

Information and advice on Visual C++ for CE.

Information and advice on Visual Basic for CE. Home of the vbceUtils control for Visual Basic for Windows CE.

Cool API samples and demoware applications for Windows CE.

Samples from DevCon 99.

Some MFC based Windows CE samples.

ActiveX controls for Windows CE developers.

Used to be RoadCoders.com - general Windows CE articles and other development info.

1.6 Where can I find information on DevCon 99?

Take a look at this excellent site. Microsoft has posted video for all of the sessions at DevCon 99 in Denver. Go to http://events.microsoft.com/isapi/events/pages.asp?s=63814&p=620 for more information.

1.7 I need to learn CE in a hurry - can I take a class?

Let's say you need to learn Windows CE ASAP! Depending on your budget and time constraints you could attend a class or conference. The following companies offer beginning and advanced Windows CE training:

David Solomon Expert Seminars www.solsem.com
Annabooks www.annabooks.com
The Paul Yao Company www.paulyao.com

Also, Microsoft has an annual Windows CE developer's conference, usually somewhere between April and June.

Finally, if you really want to learn now (or have no budget), go to http://events.microsoft.com/isapi/events/pages.asp?s=63814&p=620 and check out the video samples. Doug Boling gave did a one-day "Windows CE for application developer's" seminar at DevCon and it is available here.

If you know of others, or want to add your seminar, class or conference, send an email to faq@cegadgets.com and we'll get you added to the list.

1.8 Things to consider before you design that new Windows CE application.

Click here to read the entire article.

1. Read the logo requirements before you design your application.
2. Make life easy for your users - design for your device.
3. Remember power issues - polling, serial port waste power
4. Handle WM_HIBERNATE
5. Think about internet connectivity.
6. Check GNU for portable source code - your app may already be written.
7. Remember, you can't use VB on Palm Sized PC's running Windows CE 2.0 - 2.11 only.
8. Write a help file for your application
9. Plan to write an installer - it's easy
10. Test on actual devices. The emulator is nice but it is not a true Windows CE device.
11. Don't use floating point operations on if you can help it.
12. Buy a Socket Communications ethernet card - it is worth the money.

1.9 I want to develop using Visual C++. What do I need?

Developing using Visual C++ is nice because it will work on any CE platform.

  • The Visual C++ Toolkit for Windows CE 5.0

This is an older version of the Windows CE development environment. It is missing some nice features offered by 6.0, and does not have support for the PSPC 1.2 SDK, ethernet debugging, etc. Interestingly, it does offer an object store browser that was removed in version 6.0. The 5.0 toolkit also lets you target Windows CE 1.0. The 6.0 product does not.

To develop using Visual C++ 5.0 you will need the following:

Visual C++ 5.0, Professional or Enterprise edition
Visual C++ Toolkit for Windows CE 5.0
HPC or PSPC SDK, downloadable for free from the Microsoft web site.

  • The Visual C++ Toolkit for Windows CE 6.0

The current C/C++ development environment for Windows CE.

To develop using Visual C++ 6.0 you will need the following:

Visual C++ 6.0, Professional or Enterprise edition
Visual C++ Toolkit for Windows CE 6.0
Any of the CE SDK's, downloadable for free from the Microsoft web site.

1.10 I want to develop using Visual Basic. What do I need?

First, you need to have an HPC, HPC Pro or a Palm Size PC running 2.11! Many people have purchased the Visual Basic toolkit, written an application and attempted to copy it to a Nino or some other 2.01 device. It does not work! Below is a list of valid Palm Size devices:

Casio E-15, E-100, E-105
HP Jornada 420 and 428
Compaq Aero A2xxx
Philips Nino 520
Everex FreeStyle 540
Any new Palm Size device released after 9/11/99.

Take a look at the official Microsoft statement http://msdn.microsoft.com/cetools/platform/ppcfeatures.asp under the heading of "Visual Basic Runtime in ROM".

Below are descriptions of the available Visual Basic toolkits.

  • The Visual Basic Toolkit for Windows CE 5.0

The first version of basic that supported Windows CE. It was a challenging and generally unpleasant experience developing software for Windows CE using this tool. While version 6.0 has shortcomings, it is worth the upgrade price to make the switch to the Visual Basic toolkit for Windows CE 6.0. To develop using the Visual Basic, you will need:

Visual Basic 5.0, Professional or Enterprise edition
Visual Basic Toolkit for Windows CE 5.0
The HPC SDK

  • The Visual Basic Toolkit for Windows CE 6.0

The current version of Visual Basic for CE. To develop using the Visual Basic, you will need:

Visual Basic 6.0, Professional or Enterprise edition
Visual Basic Toolkit for Windows CE 6.0
The HPC SDK, HPC Pro SDK or the PSPC SDK v. 1.2.

1.11 What other development tools are available for windows CE?

Check out the full article, with comments and pricing on each tool.

1.12 How do I report bugs (or feature requests) in Windows CE development tools?

Microsoft has a couple of useful email addresses:

Windows CE development tools feature suggestions:
wcetwish@microsoft.com

Windows CE Development Tools Bug Reporting:
wcetbug@microsoft.com

1.13 Should I get a copy of Platform Builder 2.11/2.12?

As an application developer you may think Platform Builder doesn't apply to you. While this is mostly true, Platform Builder includes a wealth of information on the internals of Windows CE, including prototypes for functions not documented in the SDK. The Platform Builder help files also contain great information about the workings of the operating system. While this isn't necessarily going to help you make a better list control, you can find interesting little features like RegCopyFile, which copies the entire registry to a file, or PowerOffSystem.

Unfortunately, Platform Builder is a little pricey, and rumor has it PB will be more so when 2.12 is released. Microsoft will charge up to $3000 for Platform Builder and also require a purchase of 250 Windows CE licenses, putting the total price around $13,000! Not to worry, though.  If you really want to get a copy of Platform Builder 2.12 for evaluation purposes, you can purchase the Universal MSDN subscription (which is roughly $2500 I believe).  MSDN Universal not only comes with PB 2.12, but it also contains all the toolkits, SDKs, development tools, and operating system you will need to develop Windows CE software (or any other software for that matter). 

A 60-day trial edition of Platform Builder 2.12 is included with a subscription to MSDN Universal. You can also obtain a trial edition from a distributor for a small fee, ~ $25. See http://www.microsoft.com/embedded/distributors/distrib.asp for a list of distributors.

1.14 Where can I find a MIPS or SH3 disassembler?

Check out http://www.datarescue.com/idawindowsce.htm for a Windows CE code disassembler.

Delosoft also produces a disassembler for MIPS and SH3 executables. Check out www.delosoft.com for more information.

1.15 Can I write DCOM application under Windows CE?

Windows CE 2.11 and earlier do not contain a DCOM implementation - only inproc servers are allowed at this time. However, is has been mentioned that Microsoft does have DCOM for CE in beta (as of 9/99). Perhaps it will be included with CE 3.0 (Cedar) if everything goes as Microsoft plans.

Intrinsyc has a "DCOM" implementation for CE 2.XX+. While not identical to Microsoft's desktop DCOM implementation, it offers similar functionality. More info can be found at http://www.intrinsyc.com.

1.16 Is the SH4 binary compatible with the SH3?

I found this interesting exchange on the windowsce.com developer mailing list:

When I run any SH3 applications on an SH4 device the program starts to load, but the busy icon freezes and never returns.

Response:

Some folks from Hitachi were here Tuesday promoting their new CE unit, which uses an SH4 chip. I asked whether I would have to recompile my app, and they said YES. In other words, the SH3 and SH4 are not binary compatible.

So in other words, according to the post the SH4 is not backwards compatible with the SH3. I have seen other posts mentioning similar problems; the SH3 application will run on an SH4 but crash in peculiar places, for no apparent reason. These same people say that recompiling their app for SH4 seemed to resolve the problems. Also, the compiler warns if an SH3 app is being downloaded to an SH4 machine.

1.17 Does Windows CE support COM?

Windows CE only supports in-process COM object.  There is talk of extending COM functionality in the next major release of Windows CE.  Here are a few references for getting started with COM and CE:

  • "How to Write and Use ActiveX Controls for Microsoft Windows CE" from the MSDN
  • "The Tools You'll Need to Build Embedded Apps: Windows CE Toolkit for Visual C++ 6.0" from MSJ July 1999. There's a section called "Desktop ActiveX Controls".

I have used ATL quite a bit on the CE platform, and aside from one minor problem with connection points, everything works well.  All of the controls available on the CEGadgets.com main page are written using ATLCE.

See Can I write DCOM applications for Windows CE for information on DCOM and CE.

2. Visual C++ Issues

2.1 What do I really need to write C++ apps for Windows CE?

To develop using Visual C++ 6.0 you will need the following:

  • Visual C++ 6.0
  • Visual C++ Toolkit for Windows CE 6.0
  • Any of the CE SDK's, downloadable for free from the Microsoft web site.

You will also need to be running Windows NT 4.0 with SP3 or greater installed.  You can develo using Windows 95/98 as well, but won't be able to use the emulator (which requires a UNICODE operating system).

2.2 Do I need to purchase the Windows CE Toolkit for C++ or Basic to develop for CE?

Yes, you do need to purchase the C++ or Basic Toolkit. Microsoft gets about $200 for it, but there are third party software vendors that will sell it to you for less. buy.com has it for $167.

The toolkit contains the compilers and linkers needed to create executables for Windows CE.  It contains support for the various processor types supported by Windows CE.

The "SDKs" contain the various header and library files used in actually writing the application.  Each SDK contains any customizations to the Win32 API needed by a particular platform, such as the addition of the SIPINFO APIs for Palm-size PCs.

The Windows CE SDKs are free and readily downloadable at: http://msdn.microsoft.com/cetools/downloads/devkits.asp

You can also use tools like NSBasic ($99) to develop directly on the device...

2.3 Can I use Visual Studio SP3 with the Toolkit for Windows CE?

Microsoft states that SP3 is incompatible with WCE toolkit at this time (9/2/99).

2.4 Can I use Windows 95/98 to build Windows CE applications?

You can run VC 5.0 under Windows 95/98 but you will not be able to use the emulator.

You may be able to run VC 6.0 under Windows 95/98 (but you will not be able to use the emulator). It was mentioned on one of the CE newsgroups that as of 6.0, the Windows CE Toolkit will not allow installs to 95/98, but I have only seen this comment once. I haven't tried this (I did use the 5.0 toolkit on 95 and 98 without trouble). However, several other people have written stating that the 6.0 Toolkit does install under 95/98, so I'd bet that there really isn't any problem with this approach.

2.5 My MFC app doesn't run on the device the first time I try?

Some files (like mfcce20d.dll) are not copied properly during the installation of the toolkit. Check the following page for more info:

http://support.microsoft.com/support/kb/articles/q187/6/16.asp

2.6 I keep getting internal compiler errors? How do I make them go away?

The Windows CE compiler is a little finicky when it comes to code. If you get an error like:

myfile.cpp(234): fatal internal error CBE7002:
try changing your code around a little. Move your declarations, remove extra spaces, etc. Basically just change the code style a little bit and try to compile again. This usually fixes the problem.

2.7 I use a serial connection to remotely debug my x86 applications, but the serial connection speed is slow. How can I make it faster?

Contact MS support for a fix to the TCP/IP stack to increase the speed of Apps debugging with DevStudio Add-in. Note that this applies to remote debugging on x86 based platforms (CEPC, etc).

2.8 How can I copy files to the emulator?

After successfully installing your SDK, look for the Windows CE Platform SDK menu item under Start, Programs. Launch 'Emulation Environment for [platform name]'. This will launch a console window. At this point, type empfile -? for options, or type empfile -c [source filename] wce:[taregt location in object store].

For example, empfile -c e:\CEproject\myapp.exe wce:\windows\start menu\myapp.exe will copy myapp.exe into the emulator object store.

2.9 Can I use C++ exceptions in my Windows CE application?

C++ exceptions are not supported on Windows CE. But Win32 exceptions are. You can use the __try and __except keywords (and also the __try and __finally keywords). MFC exceptions are also supported (TRY, CATCH, etc.)

However, the key words for C++ exceptions (try, catch, and throw -- with *no* leading underscores) are not supported.

2.10 Can I use STL in my Windows CE application?

STL relies on exceptions, and since exceptions are not supported under Windows CE, STL cannot be fully implemented. There are a few ports of STL to CE that do not rely on exceptions. Take a look at:

Search www.deja.com for information on STL and CE for more information. If you have information on other STL ports let me know.

2.11 I populate my combobox using the resource editor, yet when I run my application under CE all I see is garbage. What can I do?

Apparently the resource editor treats the text as ANSI, not UNICODE. You have to populate the listbox programatically.

2.12 Is there a way to edit my Visual C++ files on my handheld?

Logical Sky has produced a syntax highlighting C++ editor for use on HPC and HPC/Pro platforms. Here's a recent press release:

Logical Sky is proud to announce the release of CEdit for Windows CE!

CEdit is a color syntax hilighting C++ editor for Windows CE. CEdit is designed for C++ developers who need to work with their source code when they are away from their desks. CEdit is compatible with Microsoft Visual C++. It allows you to open a Visual C++ project file on your handheld, so that you will have quick access to all of your C++ files.

CEdit is designed for MIPS and SH3 based H/PCs. CEdit will not run on a palm-sized CE device.

A free fully functional 30 day demo is available from: http://www.LogicalSky.com.

CEdit is $49.95.

2.13 How does compiler optimization affect Windows CE executables?

I came across the following interesting post in the windowsce-dev digest:

I've been working on a project targeted to the SH3 processor and I noticed that the Release mode EXE for the SH3 was actually larger that the Debug version with symbols!  After a little thought I remembered an article in MSJ a year or so ago or so discussing the various optimizations of the x86 compiler in DevStudio.  IT said that often the default optimization for speed can be slower that the optimizations for size and that it can get worse for RISC processors.  So I compiled for Size instead of speed and there were MAJOR differences in EXE size.

X.EXE CPU Debug Opt Size Opt Speed
SH3 176K 131K 187K
x86 189K 120K 136K

Additionally I couldn't detect any difference in the speed of the code in a relatively GUI intensive app.

Just thought I share that it's actually worth the time spent trying different optimizations, at least on the RISC processors.

2.14 Where is the Windows CE C runtime library? Is source for the runtime available?

Starting with Windows CE 2.01, Microsoft folded the C runtime directly into coredll (in other words, Windows CE 2.0 for the HPC is the only version that did not do this).  One reason for doing this is to help executables stay as small as possible.  With the runtime and API set in ROM, user applications will stay very small.

Microsoft has not released source to the Windows CE C runtime.

2.15 How can I develop applications for Windows CE 1.0?

If for some reason you are stuck doing development for Windows CE 1.0, you will need the Visual C++ 5.0 and the Windows CE Toolkit for Visual C++ 5.0. VC++ 6.0 does not support the WCE 1.0 platform.

2.16 I want to port my Windows desktop application to Windows CE.  What issues will I face?

There are many issues to consider when porting your application to Windows CE.  You will face many obvious issues, like interface changes, power and memory constraints.  However, you will find many not-so-obvious issues to contend with, as well.

Perhaps the largest issue you will face is making your application UNICODE compliant.  Windows CE is a UNICODE operating system, and all strings used in API calls must be UNICODE.

You may  also need to deal with the following issues: missing API's, thread issues, floating point use, sockets, etc.

Check out the full article, Common Windows CE Porting Issues, for more information.

2.17 I can compile for the MIPS and SHx processors, but I don't see an option for the StrongArm.  What can I do?

Download and install the HPC/Pro SDK from http://msdn.microsoft.com/cetools/downloads/hpcprosdk.asp. This SDK  contains what you need to generate executables for the StrongArm using your Windows CE Toolkit.

3. Third Party Tools and Hardware

3.1 Which databases are available on the Windows CE platform?

Check out the full article, Third Party Database Tools for Windows CE, here!

There are a phenomenal amount of database tools available for the Windows CE platform.  Here is the short list of available CE databases:

3.2 Are there any Text-To-Speech engines for the CE platform?

The are a few text to speech (TTS) engines for Windows CE.

Check out Lernout and Hauspie's TTS engine for Windows CE. This is the same speech engine used in the AutoPC. Unfortunately, it is only available for SH3 processors at the current time. See http://www.lhsl.com/ssyn/tts3000wince.asp for more information.

You should also check out the Dectalk TTS engine for Win CE. Apparently, Dectalk was purchased by Fonix Corp.  See http://www.fonix.com/products/dectalk/ for more information.

Another entry to the Windows CE TTS field is from Elan. The Elan TTS toolkit was released 1-Nov-99 and was $495US at that time. It will support the MIPS and SH processors, and will cover the following languages: US English, UK English, French, German, Spanish, Brazilian and Russian.

Note: $495US covers the developer license. The toolkit also requires distribution royalties, which depend on the number of units you ship. Contact Elan for more information - info@elan.fr, or see their web site at www.elantts.com.

3.3 I want to write an MP3 decoder for Windows CE. Where do I start?

There are currently two MP3 players for the Windows CE platform, and both use the Xaudio SDK to actually do MP3 decoding/playback. The Xaudio SDK is easy to use, well documented, and FREE for personal use (you have to license Xaudio for commercial distribution).

Support for Xaudio development is good as well. Check www.xaudio.com for more information and to download the SDK.

If you really want to "roll your own", there is source for mp3 decoders around on the internet. Try www.mpeg.org for more information.

3.4 Are there any printer libraries for Windows CE?

Check out FieldSoftware's PrinterCE ActiveX control. It provides basic print output routines for CE. FieldSoftware offers a barcode package as well.  PrinterCE is license based, with prices ranging from 19.95 for the basic library, up to $1000 for PrinterCE Plus with barcode support, including 500 licenses.

From a FieldSoftware newsgroup post:

PrinterCE makes sophisticated printing from VBCE simple (no worries about device contexts and BitBlits and DIBsections, etc). Plus, PrinterCE goes beyond just plain printing by adding support for printing from Palm-sized PCs!!! as well as printing barcodes, using specialized label printers, and much more.

Get more information at: www.fieldsoftware.com

3.5 How can I work with Pocket Outlook data?

You should definitely check out the POOM SDK. POOM stands for Pocket Outlook Object Model, and represents a standard, easy to use interface into Contacts, Calendar and Tasks on your Windows CE device. Use this in place of modifying the contact, calendar or task databases directly, or even the AddressCard API.

You can download the POOM SDK at msdn.microsoft.com/cetools/platform/poomsdk.asp.

Along with offering basic access to Pocket Outlook, POOM offers some cool features like ReceiveFromInfrared and SentToInfrared, which will squirt the selected object(s) in/out the infrared port. It also allows you to work with cities on the device.

3.6 Is there an FTP client API available for Windows CE?

While an FTP client is documented in the Windows CE help, no FTP client actually ships with OEM devices.  I have heard two explanations for this.  One, given at CE DevCon 99, was that it was up to the OEM to ship or leave out FTP support, and most left it out.  The other is mentioned in the CE documentation.  While FTP functions are documented, there is a statement in the remarks section: "Inetftp.dll is available only for Intel x86 processors."

Here are two third-party sources for Windows CE FTP controls:

Ruksun makes an FTP client, and has packaged some of their code into a simple to use ActiveX control for developers. Contact komal@ruksun.com for information on the control and licensing.

Dev-soft has a massive set of internet controls for Windows CE developers, including support for HTTP, FTP, IMAP, LDAP, NNTP, SMTP, etc. Here's a snippet from their site re: FTP functionality.

FTP - Used to transfer files using the FTP protocol. Very easy to use with a 'plug and play' interface. Supports most corporate firewalls, and has an extensible architecture, enabling access to non-standard FTP server features (mostly found in mainframes).

The toolkit is also royalty-free.

3.7 How can I copy-protect my Windows CE application?

DESkey sells a dongle that plugs into a PCMCIA or compact flash card slot.  Take a look at http://www.des.co.uk/ for more information.  A free developer's kit is available at www.des.co.uk <http://www.des.co.uk>.

Here's some information about DESKey sent to me by the company:

Manufactured to CompactFlash Standard Type I, this device will allow you to protect your Windows CE 2.x applications against unlicensed use / piracy. In addition to this the DESkey API provides the means for your application to encrypt and decrypt data through the DESkey CF Card.

Features:

CompactFlash Design
Random Number Generator
Code or data from your application may be fed through the DESkey for encryption.
Unique 8 Byte Password
Memory - 1,024 bytes of memory as standard. Up to 32K is available on request.
Anti-Emulation Algorithm
The DK3CF+ supports all popular processors including MIPS, SH3 etc.

Also, take a look at R.I.A. TerraSystems (www.mappad.com).  They offer a key-ring device that works by sending a unique ID to the CE device's infrared port.

There are various software-only based protection mechanisms as well, like creating secret entries in the registry, computing a unique ID based on the user and device characteristics, or requiring a valid serial number (supplied by the author) before allowing the application to run.

3.8 Where can I find an XML parser for Windows CE?

On October 13, 1999, mov Software announced a port of EXPAT to Windows CE.  From the post:

EXPAT is a conforming and non-validating XML 1.0 parser, originally written by John Clark. More information about EXPAT can be viewed at http://www.jclark.com/xml/expat.html

EXPAT is distributed via the GPL or MPL 1.1 licenses. To download the source code for EXPAT for Windows CE please visit http://www.movsoftware.com/devres.htm

EXPAT has been verified to work on the following platforms:
CE2.11
    SH3, SH4, ARM, MIPS
CE2.0
    SH3, MIPS

Take a look at http://www.movsoftware.com/expatxml.htm for more information.

3.9 Is GCC available for the Windows CE platform?

Take a look at http://www.innonet.at/~wisi/index.html. There is a GCC MIPS compiler currently under development, although it still is not ready for release.  From the page:

I am trying to finish a port of GCC to WinCE which I found on the page  http://hyperion.clc.cc.il.us/~arty/. The work there was stopped on September 98 and actually I can't find the page any more.  This guy has already done the most work. I tried just to fix some problems.

At the moment the compiler is still in a pre-alpha state. Simple demo programs are working on my VELO500(e.g.: opening a Message Box).

4. Windows CE Overview

4.1 How many processes can Windows CE support?

Windows CE maps the bottom section of memory into 33, 32Mb slices referred to as 'slots'. The lowest slot is used for the currently running process (the process is mapped into slot 0, not copied!), and other low slots are used for system processes as follows (this is how it appears on my casio e-100):

Slot 0: current running process
Slot 1: NK.EXE (kernel)
Slot 2: Filesys.exe (file system - object store, registry, ceDB etc)
Slot 3: Device.exe (device manager)
Slot 4: Shell32.exe (Windows CE shell)

5 slots are used, leaving 28 remaining slots for user processes.

4.2 How many threads can Windows CE run?

While theoretically there are no limits to the number of threads per process, you will eventually run out of memory and virtual address space. Windows CE 2.x has eight priority levels (default is 3). Foreground threads retain the same priority as all other threads at their level.

Threads in Windows CE are referred to as follows:

  • Time Critical (runs until complete)
  • Highest
  • Above Normal
  • Below Normal
  • Lowest
  • Above Idle
  • Idle

One of the new features in Windows CE 3.0 will be support for 256 priority levels.

4.3 What does the basic Windows CE memory map look like?

The Windows CE address space is 4GB. The bottom 2Gb are used for processes and application shared space. The operating system uses the top 2Gb - hardware, object store and ROM are mapped here (Note that some locations may be different on your device). Have any additional info - please send it to me and I'll add it to the list.

FFFF FFFF: top of memory
BF00 0000: Beginning of ROM area
AB00 0000: I/O Registers on a MIPS R4xxx
AA00 0000: Beginning of screen memory
A000 0000: Beginning of DRAM area
8000 0000: Beginning of kernel memory space
[.]
4200 0000: begin shared app memory (memory mapped files)
4000 0000: slot 32 space
[...]
0400 0000: slot 2 - filesys.exe
0200 0000: slot 1 - nk.exe
0000 0000: slot 0 - current process space

4.4 What is Execute-In-Place (XIP) and what does it mean for me?

Execute In Place is the ability for Windows CE to run applications (or operating system code) right in ROM. There is no need to copy the executable from ROM to RAM and run it - that would just waste time and memory.

As an application developer you should keep this in mind - who knows, Casio or HP might buy your application and, burn it into their next device, and sell it to the masses! So, don't write back to your executable or do anything else that would prevent your application from being ROM'd.

4.5 I want to make my own shell. Where should I start?

Try to beg, borrow or steal the Platform Builder v. 2.12. There is source for a simple Windows CE shell on CD 1. This code is an excellent starting point. Your shell will need to handle the battery monitor, resource checking and WM_HIBERNATE message generation.

BSquare has introduced a new development tool, Interface Composer, which allows the developer to create his own shell.  While I believe this product targets the embedded developer looking to implement a cool shell, it can also be used by the developer to create new, custom shells and skins for distribution to OEM device users.

4.6 Can I trash my object store by turning off the power during a file operation?

The Windows CE development team worked very hard to prevent this. The object store is based on a transactional model, complete with a transaction log tracking the most recent object store operations. If any catastrophe occurs, Windows CE can roll back the log to the last good point. In the case of an interruption during database or file delete, Windows CE can actually roll forward, continuing the operation.

See Inside Windows CE, chapter 4, for a good look at the design philosophy behind the object store.

4.7 How much stack space can I use per thread?

In Windows CE 2.0 the limit was 58K per thread. This was changed in 2.1 to be up to 1Mb (that's a big stack!) per thread. 2.1 also allows setting the stack size at compile time, but all threads in your application will have the same stack size.

4.8 Why does my Windows CE 2.0 stack blow out, even if I allocated it at compile time?

Unlike the desktop, Windows CE 2.0 only allocates application stack space as it is needed. This can cause problems if memory is nearly full and you are allocating on the stack. This was changed in CE 2.1.

4.9 What kind of limitations will I encounter using the CE Database?

Windows CE 2.11 and earlier are limited to 4 indexes. Wince 3.0 is increasing the limit to 8.

I assume you could technically have up to 2^32 records, since records are identified by CEOIDs, and since CEOID's are currently DWORDS. I did see a post online showing that the limit was around 16K records, but I have not verified this. 

However, if you are going to be dealing with more than 1500 records do not use the CE database system - it is really slow.

5. General Windows CE Development

5.1 I can't find an API that I need. What should I do?

When writing Windows CE applications, try to keep in mind the Win CE development team philosophy.  They took a look at the entire Win32 API and included only API's they felt they needed - for example, they would leave out an API if the same thing could be accomplished using three other existing API's.  In other words, if you find that an API is missing, first look around and say to yourself "how could I accomplish the same thing using other API's", since for the most part the Win CE team left out an API if they thought it could be implemented in another way.

Another thing to do is dumpbin /all coredll.lib in your sdk lib directory. There are plenty of API functions (over 2400 on the 2.11 pspc) and one may be just what you need. If you have Platform Builder you have access to the prototypes as well. For example, I just found SetWindowsHookEx, which appears to be similar to the desktop SetWindowsHookEx. The documentation says that SetWindowsHookEx is unavailable, but there it is in coredll.lib.

Also, if you want an API for the HPC 2.00 that isn't documented until 2.11, check the 2.00 coredll.lib anyway. It may be in there. Of course, there may be a reason it is undocumented (ie. it does not work!) so, again, use undocumented functions with care and test, test, test.

And finally, if the API is undocumented it may not be there in future versions. Rumor has it that Microsoft is making big changes to 3.0, and even if they are making little changes, you might get left out.

5.2 How can I insure only one instance of my application?

There are a few methods - the registry, FindWindow(), and CreateMutex().

You can store a value in the registry when your application starts, and remove it when your application terminates.  Unfortunately, if your application crashes is abnormally terminates, your registry value will not be removed.  When you go to run the first instance of your application again, it will see the registry entry and stop running. 

The FindWindow() method is the easiest to implement. In your InitInstance search for another instance of your application name, ie.

HWND hWnd=FindWindow(YOUR_WINDOW_CLASS, YOUR_WINDOW_TITLE);
if(NULL!=hWnd) {

SetForegroundWindow(hWnd);
return 0;

}

Here's some sample VB code you can use to find a window.  This sample assumes the window title is SampleForm.

Public Declare Function FindWindow Lib "Coredll" Alias "FindWindowW" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function GetLastError Lib "Coredll" () As Long

On Error Resume Next
Dim hWndX As Long

hWndX = FindWindow("Form1", "SampleForm")
If (hWndX <> 0) Then MsgBox "found it!"    '

If you are a VBCE user, you may want to consider creating a c++ launcher that checks for a previous instance of your application and changes focus to it if found.  You can then launch the vb application if it is not running.  As a side benefit, you can also create an icon to go with your vb application.   

Another technique is to use CreateMutex(). You first need to attempt to create a mutex and make sure it does not already exist. If the mutex does exist, you would post a registered message to all the top level windows to tell the application to move itself to the foreground, then close the current instance.

HANDLE hMutex=CreateMutex(NULL, TRUE, _T("YOUR_MUTEX_NAME_HERE"));

if(hMutex && ERROR_ALREADY_EXISTS==GetLastError()) {

// The app is already running
CloseHandle(hMutex);
return 0;

}

5.3 How can I make I application startup on system startup?

KEY_LOCAL_MACHINE\Init contains executables to run during device startup. Executables are listed under LaunchXX keys, where XX determines the run order to use. Another key, DependXX, allows specifying dependencies (ie. Launch50 can't run unless Launch40 was successful).

Create a new key under HKEY_LOCAL_MACHINE\Init named Launch60 (or anything greater than Launch50) , and supply the executable name to run. If you want the exe to launch only if the shell successfully started, create Depend60 and set the value to 32h (hex for 50).

An easier way to start an application on system startup is to put a link to your application in the \Windows\StartUp folder.

5.4 How can I prevent other applications from running while my application is active (how can I keep users from accessing the Start Menu)?

One technique is to disable the taskbar. Using FindWindow, get the handle to the taskbar window and disable it. When your program exits, make sure you enable it though! Also, a disabled taskbar makes it difficult to use the SIP. You may have to manually show/hide the SIP to work around this problem.

Here's an example:

HWND hTaskBarWnd = ::FindWindow(_T("HHTaskBar"), NULL);

if (hTaskBarWnd) {

::EnableWindow(hTaskBarWnd, FALSE);
::ShowWindow(hTaskBarWnd, SW_HIDE);

}

Note that this approach may cause the desktop to not redraw properly. If this is a problem, grab the desktop window and manually resize that as well, as follows:

HWND hDesktopWnd = ::FindWindow(_T("DesktopExplorerWindow"), NULL);

If (hDesktopWnd)

::SetWindowPos(hDesktopWnd, NULL, 0, 0, GetSystemMetrics(SM_CYSCREEN), GetSystemMetrics(SM_CYSCREEN) - 26, SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE);

Note that 26 is the task bar height. I suppose this could change so it may be a good idea to compute the taskbar height prior to resizing the desktop window.

5.5 How can I change task bar settings such as Auto Hide?

AutoHide and other task bar settings are contained in the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Shell in a value called TBOpts. TBOpts is a DWORD bitfield containing four entries:

#define MENUOPT_SHOWTIME 0x0001
#define MENUOPT_SHOWDATE 0x0002
#define MENUOPT_SHOWBANNER 0x0004
#define MENUOPT_AUTOHIDE 0x0008

Once you change the TBOpts value to show or hide various task bar settings you need to notify the task bar. The following:

SendMessage(hTaskBarWnd, WM_COMMAND, 0x3EA, 0)

Will notify the taskbar that changes were made and cause it to update accordingly.

5.6 How do I keep my device from auto-suspending?

One way to keep your device from auto-suspending is to issue a keyboard event every n minutes, such as:

keybd_event(VK_F24, 0, KEYEVENTF_KEYUP | KEYEVENTF_SILENT, 0);

If you are using VBCE, try the following:

Public Declare Sub keybd_event Lib "coredll.dll" (ByVal bVK As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

In the timer control event, type (7B is VK_F12 - you could use any character you like):

keybd_event &H7B, 0, 0, 0
keybd_event &H7B, 0, &H2, 0

Another suggestion is to open a socket and keep it open as long as you want the system to stay awake.

Finally, you can use SystemParametersInfo to set the timeout to 0, disabling it. For example,

SystemParametersInfo(SPI_SETBATTERYIDLETIMEOUT, 0, NULL, TRUE);

The problem I see with this approach is that if your application crashes or somehow manages to exit without putting it back to its previous value, the device will no longer timeout when idle. Even soft resetting the device would not fix the problem, so use this approach with care. When using this approach, the power settings in the control panel show the default settings, but the timeout never occurs.

There is also an undocumented API SetPowerOffHandler, but I have had no luck getting it to work. I can make the device start doing weird power related things, but not exactly what you would want to ship!

5.7 How do I detect power-on?

You can detect power on using WaitCommEvent and the EV_POWER mask. Open a serial port and wait for an EV_POWER event. When the event occurs send your application window a message letting it know that the power was turned back on.

SetCommMask(comportHandle, EV_POWER);
WaitCommEvent(comportHandle, &eventValue, NULL);
SendMessage(hwnd, WM_POWERON, 0, 0);

One caveat - opening the serial port turns on the serial hardware, which takes additional battery power. I don't have any hard numbers on the effect this technique has on battery life (yet).  Another caveat - this may interfere with other applications use of the serial port. Test carefully after implementing this power-on detection technique.

Another way to detect power on was discussed in the Windows CE Tech Journal, September 1999 issue. In the article, Jeff Spurgat described how device drivers receive power state change notifications, and how application developers can latch on to this functionality to receive power on notifications.

Basically, device drivers receive a powerup and powerdown message. Typically, a device driver will power up or power down their hardware based on this notification and return as quickly as possible without calling the kernel or any function that can cause a paging operation. In the article, Jeff simply sets a few global variables when the power state changes. He has a worker thread monitor the state of these variables once per second, and do a PostMessage if the poweron flag is true. Jeff provides sample code as well - both a working power detection driver and a sample application that works with the driver. You can download it here.

Finally, another interesting suggestion is to create an application thread with that fires a timer once every n seconds. Every time the timer fires, compare the current system time (GetSystemTime) with the last (saved) system time value. If the difference exceeds the timer interval the device has been suspended during the interval.

5.8 How can I programmatically turn off the device?

Windows CE treats the power button just like a keyboard key. Because of this, you can simply send a VK_OFF keystroke to the system and it will power off, just like you pressed the off button!

void SuspendDevice()
{

keybd_event(VK_OFF, 0, 0, 0); // down
keybd_event(VK_OFF, 0, 2, 0); // up

// code execution resumes on the next line...
MySampleFunction(); // runs when the device wakes back up...

}

By the way, VK_OFF is defined as 0xDF.

You can also use the PowerOffSystem function. This function is undocumented, so it may change or disappear at any time.

The undocumented function void PowerOffSystem(void) is declared in coredll.dll. It places the CE device in suspend state. However, when power is restored the user password dialog is not shown and the desktop and other windows are not redrawn. Code execution continues at the next line after the PowerOffSystem call.

You can invalidate all windows to get around the redraw problem, and you can also detect the 'prompt for password' state, and if required, display your own password dialog, and use CheckPassword to check the entered password against the user's password.

GwesPowerOff is another power API.  The GWES calls GwesPowerOff when suspending the device.  This may be a better approach than calling PowerOffSystem directly.   Check out http://support.microsoft.com/support/kb/articles/Q207/9/88.ASP for more information. [Thanks to Mike Burch for this tip].

Finally, see Suspending Your Device Programatically for an article and code samples discussing power off APIs.

5.9 How can I get battery status?

Use the GetSystemPowerStatusEx API, available under WCE 2.0 and greater.

5.10 How can I determine the device type?

Use SystemParametersInfo. There is an option SPI_GETPLATFORMTYPE which returns a string containing the platform.

BTW, HPC Pro devices return 'Jupiter'.

5.11 How can I determine the device name?

Note: This key may not be valid on all platforms. Check your platform

Check the registry key HKEY_LOCAL_MACHINE\Platform for a value named 'Name'. The value corresponds to the OEM specified device name. For example, on the casio e-100 it is Casio Jx530 CE2.11. One the Nino 312 it is Philips Version 1.

5.12 How can I initiate a connection to the desktop?

Do a CreateProcess or ShellExecuteEx using \windows\repllog.exe. ReplLog will start an activesync session with the desktop.

5.13 How can I tell if ActiveSync is currently running?

One hack is to do a FindWindow looking for repllog. If you find it, activesync is either running or attempting to connect.

5.14 How can I programmatically change the display brightness?

There is no standard API to change brightness (that I know of). Each OEM implements brightness controls in their own way. If you are interested in modifying brightness check with the OEM or if you can, inspect the OEM display driver.

5.15 How do I reboot/reset the device?

OEM's can optionally handle the IOCTL_HAL_REBOOT in OEMIoControl. However, applications cannot call OEMIoControl directly, but they can call KernelIoControl, which in turn calls OEMIoControl.

#include "winioctl.h"

BOOL KernelIoControl(DWORD dwIoControlCode, LPVOID lpInBuf, DWORD nInBufSize, LPVOID lpOutBuf, DWORD nOutBufSize, LPDWORD lpBytesReturned);
#define IOCTL_HAL_GET_DEVICE_INFO CTL_CODE(FILE_DEVICE_HAL, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_HAL_REBOOT CTL_CODE(FILE_DEVICE_HAL, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)

KernelIoControl(IOCTL_HAL_REBOOT, &inVal, 4, outBuf, 1024, &bytesReturned);

If implemented by the OEM this function would perform a soft reset of the device. If you want to perform a hard reset, first call SetCleanRebootFlag.

Note that this did not work on the Casio E-100. Also, future versions of CE will implement SetCleanRebootFlag as a restricted function.

5.16 How can I change the size of the object store?

Note: these functions are documented only in Platform Builder, and are likely to be restricted in future versions of Windows CE.

The functions GetSystemMemoryDivision and SetSystemMemoryDivision allow you to change the relationship between memory and the object store.

The prototypes are:

BOOL GetSystemMemoryDivision(LPDWORD storePages, LPDWORD ramPages, LPDWORD pageSize);

DWORD SetSystemMemoryDivision(DWORD storePages);

The function returns SYSMEM_CHANGED if executed successfully.
The function returns SYSMEM_FAILED if storePages is out of range.
If SYSMEM_FAILED is returned, you can get further information by calling GetLastError.
If a reboot is necessary for the change to take effect, the function returns SYSMEM_MUSTREBOOT.
If a previous call returned SYSMEM_MUSTREBOOT, the function returns SYSMEM_REBOOTPENDING. In this situation, the boundary cannot be adjusted further until the reboot occurs.

You cannot shrink system memory or the object store memory beyond 256K each, including space for existing files and records.

5.17 How can I reprogram the buttons on the device? Can I use hardware buttons to initiate application functionality?

Check out the following API's:

RegisterHotkey
UnregisterHotkey
UnregisterFunc1 (undocumented)

Also, check out http://www.conduits.com/ce/dev/wince.htm and take a look at the keytest example - it contains code to actually do this.

5.18 I am writing a dialog based application. Why doesn't an entry appear in the taskbar or in the task list?

The taskbar only contains buttons for visible, top-level windows that have the WS_OVERLAPPED style. By default, dialog boxes have the WS_POPUP style and thus do not get taskbar buttons. The workaround is to change your dialog box style in the resource editor from WS_POPUP to WS_OVERLAPPED.

There was an interesting report from someone using PB 2.12. They did not want a taskbar button, and did not use WS_OVERLAPPED, but the taskbar button still appeared! Perhaps the default dialog/taskbar behavior has been changed in 2.12.

5.19 I want to modify the contact database. What is the contact database name or CEOID?

You should not attempt to modify the contact database directly, but instead use the API set supplied by Windows CE.

Check out OpenAddressBook, CreateAddressBook, CloseAddressBook, as well as AddressCard, GetAddressCardProperties, ModifyAddressCard, etc.

You may also want to check out the Pocket Outlook Object Model SDK, aka POOM SDK. POOM offers a simple interface into the contact, calendar and task database. You can download the POOM SDK at msdn.microsoft.com/cetools/platform/poomsdk.asp.

5.20 What is Venus?

Venus is produced by Chinese television manufacturer TCL. The Venus computer comes with a 56kb modem and a television interface, and runs the Windows CE OS. Venus provides easy internet access through the user's television. TCL plans to start selling Venus in October, and hopes to sell 300,000 units by the end of the first year.

5.21 What is Cedar?

Cedar is the codename for Windows CE 3.0. It should be release sometime around 2Q 2000. Cedar will contain lots of cool stuff, including more DirectX support, MSMQ, CEF.

5.22 When is MSMQ going to be available?

It will be released as part of Windows CE 3.0. MSMQ is ideal for wireless communications - think of it as transaction based messaging. If some of you information gets lost or mangled on the way to the server you can rollback to the beginning of the transaction.

Rumor has it you should expect Windows CE 3.0 out around 2Q 2000, so I guess you can expect MSMQ around the same time.

5.23 How do I get the time under CE - or, what happened to time()?

Use SYSTEMTIME and GetLocalTime instead, ie.

SYSTEMTIME st;
::GetLocalTime(&st);

5.24 How can I convert a pwi to an rtf?

For VCCE there is a document on MSDN named "Converting Rich Ink Data" that provides code for converting between .pwi and .rtf.

5.25 How can I determine whether the device has been rebooted/reset since the last time the application ran?

Check the registry key HKEY_LOCAL_MACHINE\Comm for the value BootCount. This value is incremented every time the device is soft-reset. If the device is hard reset the value is set back to one.

I received a report that this key isn't found on an HP620LX.  Perhaps it was not implemented in the HPC 2.0 OS.

5.26 How can I make a resource only DLL under Windows CE?

You need to define the entry point to the DLL. Just declare DllMain and have it return TRUE.

#if defined(UNDER_CE) && !defined(_WIN32_WCE_EMULATION)
#include <windows.h>
extern "C"
BOOL WINAPI DllMain (
HANDLE /*hInstance*/, // @parm handle of instance
DWORD /*dwReason*/, // @parm reason
LPVOID /*lpReserved*/ // @parm reserved
)
{
return TRUE; // ok
}
#endif

5.27 How can I determine the current SIP state?

GetSIPInfo allows you to determine the current SIP show state. Unfortunately, GetSIPInfo requires a UDT which is not available in VBCE 6.0. If you need to get the SIP show state from VBCE 6.0, get the vbceSoftKey control from www.cegadgets.com.

5.28 How can I change the current SIP state?

You can control the state of the SIP either using SipShowIM or by filling out the SIPINFO structure and using SetSIPInfo.

SipShowIM is handy because it can be used from VBCE 6.0. The prototype for SipShowIM is BOOL SipShowIM( DWORD dwFlags ), where dwFlags is either of the following:

#define SIPF_OFF 0x00000000
#define SIPF_ON  0x00000001

If you need to retrieve the current SIP display state from VBCE 6.0, get the vbceSoftKey control from www.cegadgets.com.  It is a good idea to query the current SIP state prior to showing it - you don't need to show it if its already up, and you do not want to hide it later if the user has chosen to show it.

SetSIPInfo is more robust - you can also determine the current show, hide state of the SIP, get the SIP rectangle size or the visible rectangle size.  Unfortunately, it is only availble from vcce (until the vbceSoftKey control is updated).

Another approach to showing and hiding the SIP involves finding the SIP window and manually showing or hiding it.  Note that this approach does not rely on aygshell.lib, which is nice if you want the same code to run on an hpc and pspc device.

// created by Dennis Berditchevsky
void UL_RaiseSIP(BOOL bRaise)
{
     // Find window class: "SipWndClass"
     CWnd *pWndKeyb ;
     if( pWndKeyb = CWnd::FindWindow(_T("SipWndClass"),NULL) ) {
          if( bRaise ) {
               if( !pWndKeyb->IsWindowVisible() ) {
                    pWndKeyb->ShowWindow(SW_SHOW);
                    bSipUp_Glob = TRUE; // show it. And not manually.
               }
          } else {
               if( bSipUp_Glob ) {
                    pWndKeyb->ShowWindow(SW_HIDE);
                    bSipUp_Glob = FALSE;
               }
          } //endif(bRaise)
     } //endif(pWndKeyb)
}

5.29 How can I enable or disable the Jot SIP?

You can enable/disable jot via the registry.

There is a registry entry under the Jot registry CLSID key called IsSIPInputMethod. Set this to 0 to hide the method, set it to 1 to show it. Apparently the SIP list displayer checks the registry entries every time it displays the list of available SIP because once you change the registry, the change automatically appears in the list.

The keyname is: HKEY_CLASSES_ROOT\CLSID\{6f311f80-4b14-11d1-ab08-006097490b17}\IsSIPInputMethod.

This method works with other SIPs as well. Just find the CLSID for the SIP you are interested in, change the IsSIPInputMethod to 0, and it will be disabled.

5.30 I need an ownerdrawn listbox but they are unsupported. What should I do?

Ownerdrawn listboxes are not supported under Windows CE. However, use can use a listview control to accomplish the same thing. The listview control can be ownerdrawn, can be set to checkbox style, and has a variety of display modes.

If you are using MFC, create a CListCtrl (either on a dialog via the resource editor or manually using create). Make sure you specify the LVS_OWNERDRAWFIXED style, then handle the DrawItem method. Check out CListCtrl for more information.

Also, if you want to add additional listview functionality, see ListView_SetExtendedListViewStyle. You can see styles like LVS_EX_FULLROWSELECT, which cause the entire row to be highlighted when selected, or LVS_EX_CHECKBOXES, which activates checkboxes on each line of the list view.

5.31 How can I implement a list view with a checkbox next to each item?

Create the listview control normally, then specify:

ListView_SetExtendedListViewStyle(hWnd, LVS_EX_CHECKBOXES);

This causes checkboxes to be displayed in the list control. To set and clear the checkboxes, use:

LVITEM lvi;
lvi.stateMask = LVIS_STATEIMAGEMASK;
lvi.state = UINT((int(isChecked) + 1) << 12);
::SendMessage(m_hWnd, LVM_SETITEMSTATE, nItem, (LPARAM)&lvi);

or if you are using MFC, use:

m_listCtrl.SetItemState(index, UINT((int(isChecked) + 1) << 12), LVIS_STATEIMAGEMASK);

5.32 What is POOM and should I use it?

POOM stands for Pocket Outlook Object Model, and represents a standard, easy to use interface into Contacts, Calendar and Tasks on your Windows CE device. Use this in place of modifying the contact, calendar or task databases directly, or even the AddressCard API.

You can download the POOM SDK at msdn.microsoft.com/cetools/platform/poomsdk.asp.

Along with offering basic access to Pocket Outlook, POOM offers some cool features like ReceiveFromInfrared and SentToInfrared, which will squirt the selected object(s) in/out the infrared port. It also allows you to work with cities on the device.

5.33 How can I programmatically launch a dial-up connection (without using the RAS API)?

Launch \windows\rnaapp.exe using CreateProcess or ShellExecuteEx. For example:

SHELLEXECUTEINFO shInfo;
memset(&shInfo, 0, sizeof(SHELLEXECUTEINFO));
shInfo.cbSize = sizeof(SHELLEXECUTEINFO);
shInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
shInfo.lpFile = _T("rnaapp.exe");
shInfo.lpParameters = _T("-e\"work\" -m");
shInfo.lpDirectory = _T("\\windows");
ShellExecuteEx(&shInfo);

This will start the dial-up connection named work. If you need more control over the connection, use the RAS API.

5.34 How can I write or read a physical memory location?

Use VirtualAlloc and VirtualCopy to read or write to physical memory. VirtualAlloc is documented in the CE SDK help, and VirtualCopy is documented in the Platform Builder docs. The prototype for VirtualCopy is BOOL VirtualCopy ( LPVOID lpvDest, LPVOID lpvSrc, DWORD cbSize, DWORD fdwProtect ). VirtualCopy is defined in coredll.dll.

For example:

// PHYSADDR is the physical address of the peripheral registers
#define PHYSADDR ((PVOID)0x10000000)

#define SIZE (4800*4)
LPVOID lpv;
BOOL bRet;
lpv = VirtualAlloc(0, SIZE, MEM_RESERVE, PAGE_NOACCESS);
bRet = VirtualCopy(lpv, PHYSADDR, SIZE, PAGE_READWRITE | PAGE_NOCACHE);

// At this point lpv is a virtual address which maps the memory at PHYSADDR for SIZE bytes

I have had difficulty using this for access to other process slots - one suggestion was to use SetProcPermissions(0xFFFF) but I did not notice a difference. It may be that SetProcPermissions allow you to access other process slots using regular pointers, as opposed to VirtualAlloc/VirtualCopy.

There are a few quirks with VirtualCopy (ie. shifting bits of address, being on a page boundary). Check the docs for more information.

You could also investigate ReadProcessMemory/WriteProcessMemory.

Note that VirtualCopy, SetProcPermissions, ReadProcessMemory/WriteProcessMemory may  become restricted in future CE versions.

5.35 How can I enumerate Windows CE databases from the desktop?

Enumerating your windows ce device databases from the desktop is fairly straightforward.  Simply initialize the rapi interface, grab a handle to the first database and call CeFindNextDatabase until it returns zero.  Use CeOidGetInfo to retrieve information about the currently selected database. Don't forget to include rapi.h and make sure to link rapi.lib into your project.

Here's an example:

CString message;
CString workString;

m_listboxCtrl.ResetContent();

HANDLE dbHandle = CeFindFirstDatabase(0);    // find all db's
CEOID curDB;
CEOIDINFO ceInfo;
while (curDB = CeFindNextDatabase(dbHandle)) {

  ceInfo.wObjType = OBJTYPE_DATABASE;
  CeOidGetInfo(curDB, &ceInfo);
  workString = ceInfo.infDatabase.szDbaseName;

  message.Format("%s\t%i", workString, ceInfo.infDatabase.wNumRecords);
  m_listboxCtrl.AddString(message);

}

There is also an MFC example, wcedbtst, that covers much of the CEDatabase functionality, including reading/writing database records, so I didn't bother covering that here.  The CE RAPI functions I used above are available as part of the Win32 API.

And for more documentation, take a look at the source files shipped with MFC, even if you aren't using MFC .  There is quite a bit of code showing how to implement Win32 API functions, since that is how MFC is built.

5.36 I need to use IrDA to communicate with other devices. Where should I start?

Check out the IrDA article at: http://www.microsoft.com/mind/0599/wince/wince.htm. It gives a detailed explanation if IrDA and some interesting things you can do with it.

5.37 How can I show the wait cursor, especially from VBCE?

If you are using VBCE and want to show a waitcursor, try this code I found in the microsoft.public.vbce newsgroup, posted by Piet De Booser:

Following code works on a PPC but only on the device not in emulation.

Declare Function LoadCursor Lib "coredll.dll" Alias "LoadCursorW" (ByVal
hInstance As Long, ByVal lpCursorName As Long) As Long
Declare Function SetCursor Lib "coredll.dll" (ByVal hCursor As Long) As Long
Const IDC_WAIT = 32514

Function WaitCursor(bOnOrOff As Boolean) As Long

    If bOnOrOff = True Then
        hCursor = LoadCursor(0, IDC_WAIT)
    Else
        hCursor = LoadCursor(0, 0)
    End If
    WaitCursor = SetCursor(hCursor)
End Function

If you are using VCCE you can using the MFC CWaitCursor class, which works nicely, or just the straight SDK function:

SetCursor(SetCursor(LoadCursor(NULL, IDC_WAIT)); // set wait cursor
SetCursor(NULL); // remove wait cursor

You do not need to call DestroyCursor on the wait cursor. It is a shared cursor, and DestroyCursor is only used on cursors created with CreateCursor.

5.38 How can I print from a Windows CE application?

This code was posted online by Tim Fields of Field Software. Fieldsoftware produces an ActiveX print control. See www.fieldsoftware.com for more information. Note: I have not had a chance to try this code.

PAGESETUPDLG pgs;
memset((void*) &pgs,0,sizeof(PAGESETUPDLG));
pgs.lStructSize = sizeof(PAGESETUPDLG);

// pop up page setup dialog box
int rval=PageSetupDlg(&pgs); //fills pgs structure with current settings
if (rval==0) {
     // handle error..
}

// You can now get margin setting values from pgs structure

LPDEVNAMES lpDev;
lpDev=(LPDEVNAMES) GlobalLock(pgs.hDevNames);
BYTE *tbyte(BYTE *) lpDev;
TCHAR *pDeviceName, *pPort, *pDriverName;
pDriverName=(TCHAR*)(tbyte + lpDev->wDriverOffset);
pDeviceName=(TCHAR*)(tbyte + lpDev->wDeviceOffset);
pPort=(TCHAR*)(tbyte + lpDev->wOutputOffset);

// Get the printer DC!! This may pop up an additional printer dialog box
HDC hdc;
hdc=CreateDC(pDriverName,pDeviceName,pPort,NULL);
GlobalUnlock(pgs.hDevNames);

if (hdc==NULL) {
// handle error
}

// You now have your HDC...

// Lets get some values from the page dialog box
LPDEVMODE lpDevMode;
lpDevMode=(LPDEVMODE) GlobalLock(pgs.hDevMode);
if (lpDevMode==NULL) {
// handle error
}

// Get whatever DEVMODE info needed (orientation, paper size, etc)
CurOrientation=(lpDevMode->dmOrientation==DMORIENT_PORTRAIT);
CurIsColor=(lpDevMode->dmColor==DMCOLOR_COLOR);
CurPaperSize = lpDevMode->dmPaperSize;
CurHighPrintQuality = (lpDevMode->dmPrintQuality==DMRES_HIGH);

GlobalUnlock(pgs.hDevMode);

5.39 How do I register a control under Windows CE?

The easy way to register a control is to use regsvr2.exe, a GUI based registration tool. 

If you want to use regsvrce.exe, do the following:

Copy your control into the \windows directory on your device, run regsvrce passing the path and filename of the control as an argument.

For example, to register vbceSoftKeyboard.dll on a Palm Sized PC, you would do the following:

  • type run23 using the keyboard SIP. This will bring up the Run dialog (note- you may have to type run23 a couple of times before it comes up). Sometimes it helps to make the keyboard show, click on the taskbar, then type 'run23'.
  • Type 'regsvrce \windows\vbceSoftKeyboard.dll' and press OK.  Your control is now registered!

You may have to copy regsvrce.exe from your sdk 'target\mips' (or whichever processor you use) directory. 

5.40 I am having problems getting CE RAPI to work properly. What can I check?

Here's a few basic things you can check:

1. Are you sure RAPI is initialized properly?
2. Try to do a simple command, like cecopyfile, to make sure you've got communications working in your app.
3. Are you converting your strings to unicode?
4. Do you have vcce 5.0? under samples\win32 there is ceinvoke - both a client and server demo, that shows how to do this in block and stream mode.
5. Are you converting your strings to unicode? I mention this twice because it appears to be the leading cause of RAPI problems.  See the RAPI example mentioned below for an example of how to use UNICODE strings.

Finally, check Using CE RAPI to Communicate with Windows CE from the Desktop for more information and a few examples.

5.41 I want to create a mail message then send it. Can I do this using the Mail API?

The Windows CE Mail API allows you to add, modify and delete mail messages and mail folder names.  Using the Mail API you can enumerate all messages in any mail folder, change the recipient, subject, body or attachments, and update the entry in the mail store.

The Mail API does not allow for sending or receiving mail at this time. The documentation says that the Inbox acts as a mediator, which means that you can manipulate messages, but it is up to the Inbox application itself to send and retrieve mail.

While I have not tried this, one thing I can suggest is to look at the mail transport functionality. Check out the svcsampl example in  the HPC Pro SDK. It shows (in code) how a simple mail transport service is implemented.  You can also check the SDK documentation for functions like TransportInit, TransportConnect and TransportSend. It appears that pmail loads smtp.dll (the transport service dll) and calls these functions, using TransportSend to send one message at a time.

5.42 How can I display GIF, JPG, BMP, or XBM images in my application?

The easiest way to display images from your (VC) application is by using imgdecmp.dll. Unsupported Software has an article discussing imgdecmp along with some sample source code.

5.43 Why can't I display 16-bit images from my application using imgdecmp.dll?

Well, it turns out that it can!

Many people have difficulty getting 16-bit jpg images to display properly.  Apparently, the trick is to specify dii.iBitDepth = 24.  Imgdecmp.dll does not like 16 as the value.  The S309 control uses imgdecmp.dll and manages to produce 16 bit color images.

It does appear that SHLoadDIBitmap will display 16bit .bmp images. I believe this is what the shell (hence the SH once the front of the API) uses to load the desktop image.

5.44 What steps can I take to make my software ready for foreign markets?

First, take a look at the internationalization session video from the Windows CE DevCon 99, http://events.microsoft.com/isapi/events/pages.asp?s=63814&p=622. There are a lot of great tips on how to make your applications ready for foreign markets. Some of the suggestions include:

  • Place your strings, images, etc in a resource file and make this resource file a .dll. When you want to build an application for another market you will only need to include the new dll and will not have to recompile your application. 
  • Remember that English is a very compact language. Other language strings average 35% longer, with some string more than 2 to 3 times as long.
  • Not all currency symbols are one character (ie. KR for Swedish Krona)
  • Try to avoid culturally specific images. Images acceptable in your country may be embarassing/insulting in another culture.
  • Consider writing all of your strings in Pig-Latin. Pig-Latin is longer than English, so you will encounter string length issues sooner rather than later (and we all know the sooner you find a problem the easier/cheaper it is to fix).

Also, take a look at the NLS API set. It is easy to use and offers functions like GetDateFormat, GetTimeFormat, GetNumberFormat and GetCurrencyFormat.

Finally, if you are a Visual Basic developer you will notice that many of the NLS API functions use UDTs, which are not supported under VBCE 6.0. Take a look at vbceNLS, available on this site for free. vbceNLS allows the VBCE developer to access several NLS functions.

5.45 How can I open, change and delete mail messages?

Windows CE supplies a mail API that allows the Visual C++ developer to add, change and delete mail messages. If you want to work with the inbox under Windows CE you will need to use this API, since at this time POOM does not work with email.

Below is some sample code - it walks through the inbox mail messages and renames the subject line for any that start with 123, and delete the rest:

CString workString;
HANDLE hMail;
MailMsg curMsg;

if (MailOpen(&hMail, FALSE)) {

memset(&curMsg, 0, sizeof(MailMsg));
curMsg.dwFlags = MAIL_FOLDER_INBOX | MAIL_GET_BODY | MAIL_FULL;

BOOL status = MailFirst(hMail, &curMsg);
while (status) {

workString = MailGetField(&curMsg, _T("Subject"), FALSE);
if (workString.Left(3) == "123") {

workString = workString.Mid(4);
MailSetField(&curMsg, _T("Subject"), workString);
MailUpdate(hMail, &curMsg, TRUE);

   } else

MailDelete(hMail, &curMsg);

// prepare to read next message
MailFree(&curMsg);
curMsg.dwFlags = MAIL_FOLDER_INBOX | MAIL_GET_BODY | MAIL_FULL;
status = MailNext(hMail, &curMsg);

  }
  MailClose(hMail);

Make sure to free each mail message you open, and do a MailClose when you are done with mail. 

5.46 How can I use ATLCE to sink events?

Take a look at Ken Rabold's article Sinking COM Events with ATL CE for information on implementing connection points via ATL CE.

5.47 Do the Pocket Office applications support automation? Can I use them from VCCE, VBCE?

Pocket Office does not support OLE Automation, since Windows CE only supports in-process COM objects at this time.

5.48 I am using VBCE and need to call API functions that require structures, but UDT's are not available.  What can I do? What should I watch out for?

Antonio Paneiro has written an article showing how you can use strings to work around the lack of UDT support in VBCE.  Basically, you can populate the string in such a way to make its memory image match the reuired structure definition.  Take a look at http://www.vbce.com/articles/udt/index.asp

One thing to keep in mind: structure in C are often aligned to specific boundaries, for example:

typedef struct
{
    char c;
    short h;
    int n;
} TheHorror;

The internal representation of c = 0x77, h = 0x8899, n = 0xaabbccdd might be (assuming little endian): 77 00 99 88 dd cc bb aa, if aligned on 2byte boundaries or 99 00 00 00 99 88 00 00 dd cc bb aa, if aligned on 4byte
boundaries. [thanks to Russell Harper for this tip, posted on the windowsce vbce newsgroup].

5.49 How can I turn on the device when the serial port has activity?

You can use CeRunAppAtEvent to cause your device to wake up and run an application based on various events, including:

  • When data synchronization finishes
  • When a PC Card device is changed
  • When an RS232 connection is made
  • When the system time is changed
  • When a full device data restore completes

5.50 How can I start applications on device connect/disconnect?

See registry FAQ entry 3.1 How can I start applications on device connect/disconnect?

5.51 Do you have any tips on getting more out of HTMLView?

I personally have suffered at the hands of this dll.  While the dll works great for simple html rendering, you quickly run into trouble when trying to use it for more complicated purposes.  For example, I once attempted to implement a book reader using the html control.  It worked very well, but basic features like setting cursor position were not implemented.  I considered programmatically placing anchors in the HTML to allow navigation but ended up writing my own simple HTML parser/renderer instead.

Anyway, here is an excellent post from Craig Rairdin:

Download our free demo at www.laridian.com to see what we do with the HTML control. We use it for lots of stuff. The next version handles embedded images (.bmp, .jpg, .gif), sounds, and (soon) forms. That version isn't out yet.

Here are some code snippets from our class wrapper around htmlview.dll. You've messed with this enough to fill in any details I might accidentally leave out. You've discovered enough to catch some of the subtleties (some messages have to go to the child window, etc.) 

Here's the Copy operation:

// But, how to copy from the HTML window?  Experimentation has
// shown that if there is a child window, the WM_COPY should be
// sent to the child window.  If there is not a child window,
// the WM_COPY should be sent to this window.
HWND hwnd = GetWindow(m_hWnd, GW_CHILD);
if (hwnd != NULL)
  {
  SendMessage(hwnd, WM_COMMAND, 0x000156BA, 0);
  }
else
  {
  // On the PPC, there's no child window and this window seems
  // to accept WM_COPY
  SendMessage(m_hWnd, WM_COPY, 0, 0);
  }

Note: Copy does goofy things if you display text then resize the window then do a copy. It drops spaces out of the output.

Next, here's CopyAll (I don't think/remember if the getsel and setsel operations really work)

// If there is a current selection, remember it.
// LOWORD(selection) = start position
// HIWORD(selection) = stop position
DWORD selection = SendMessage(m_hWnd, EM_GETSEL, 0, 0);
// Select and copy all contents.
SelectAll();
BOOL CopiedSomething = Copy();
// Restore the prior selection.
SendMessage(m_hWnd,
  EM_SETSEL,
  (WPARAM)(INT) LOWORD(selection),
  (LPARAM)(INT) HIWORD(selection));
// Here's scroll up a line. Up, down, and moving by pages are similar:
HWND hwnd = GetWindow(m_hWnd, GW_CHILD);
if (hwnd != NULL)
  {
  SendMessage(hwnd, WM_VSCROLL, SB_LINEUP, NULL);
  }
else
  {
  // On the PPC, there's no child window.
  SendMessage(m_hWnd, WM_VSCROLL, SB_LINEUP, NULL);
  }

Some other things we learned is that you can't capture Alt+Tap like the docs say you can. On some platforms you even get a menu of some kind when you do Alt+Tap but you can't do anything with it.

Handling the notification messages is pretty much just like the docs say. Like I said above, we handle hotlinks, pics, sounds and are working on forms.

We've talked to Microsoft at length about this .dll. We've concluded that they are embarrassed about it and don't want to talk about it. They have plans to do this better in 2.12 (they've ported IE4 to that platform). You'll be able to have lots more flexibility if/when any devices ship with that version of the browser. Htmlview.dll will go away and you'll have a much more powerful dll to work with.

5.52 How do I get the name of a ADOCE table if I only have an Table ID number?

This helpful post comes from Sandra Walters:

CDB files created with Pocket Access have several 'hidden' tables, among them are MSysTables and MSysFields, just like the Win32 version of Access. MSysTables includes a TableID and a TableName field in each record, which is
how Access relates the two together.

The readme that comes with ADOCE discusses this in detail with lists of fields in each.  I've had to write code to look up table names as well as field names and this document was very helpful.

5.53 How can I determine the amount of free space on storage cards, on the device and in memory?

Use GetDiskFreeSpaceEx to get information about storage card free space. For memory, check out GlobalMemoryStatus.

5.54 How can I disable the OK button on my Windows CE dialogs?

Try the following code in your dialog box:

ModifyStyleEx(WS_EX_CAPTIONOKBTN,0);
RedrawWindow();

5.55 Which common dialogs are supported under Windows CE?

Paul Yao (www.paulyao.com) is an author and Windows CE development instructor.  Below, Paul gives a list of supported and unsupported common dialogs.

There are eight common dialog boxes in Win32.  The File Find is not supported on CE (and therefore the MFC wrapper, CFileFind, would also not be supported).

Here are the eight. Y= supported on CE (at least on HPC); N= Not supported. Note that support for PsPC doesn't include File|Open, File|SaveAs - at least for version 1 of PsPC.

Dialog
HPC/HPC Pro
PSPC

File Open
Y
Y*

File Save
Y
Y*

Print
Y
Y

Print Setup
N
N

Find
N
N

Replace
N
N

Color Picker
Y
Y

Font Picker
N
N

* The PSPC platform displays a modified version of the file open and save as dialogs.  This version does not let you browse the entire file system, but restricts you to the storage card MyDocuments directory and the object store MyDocuments directory.

6. Palm Size Development Issues

6.1 If I don't implement an exit menu item, is there anything I can do to make closing the application easier?

While the Windows CE Pocket applications do not have an exit item, they do close based on the Ctrl-Q keyboard accelerator. Users can close applications by issuing Ctrl-Q from the input panel. It's not a standard or anything (at least I haven't heard about it) but it's easy to do and some people will try it.

6.2 Why should I pay any attention to WM_HIBERNATE?

Ahhh, the neglected WM_HIBERNATE message. The Windows CE shell sends this message when it sees resources running low, and applications are supposed to free resources, memory, and everything else possible short of closing. The shell actually can close applications if things get bad enough.

The WM_HIBERNATE message is actually part of a larger mechanism. The Windows CE shell watches resources based on a timer (the sample shell checks every 5 seconds). Every so often it will check the available resource level, and if the available memory drop below 224K it will send hibernates to all applications. If memory drops below 160K it will attempt to close background applications via WM_CLOSE. In the sample shell shipped with Platform Builder 2.12, the shell nicely sends a WM_CLOSE then waits 8 seconds. If the application still is not close it kills its process (not so nice)! Windows CE actually relies on the shell to close unused applications by sending WM_CLOSE.

Your application should be a good Palm Size Citizen. Free up lists, close files, etc when you receive WM_HIBERNATE. If you receive a WM_CLOSE message, don't show dialogs or other messages - close silently. And definitely do close, because as mentioned above, if you are not closed in 8 seconds the shell will kill you.

7. Common Executable Format (CEF)

7.1 What is CEF?

CEF stands for Common Executable Format. CEF is Microsoft's solution to the problem of multiple processor types.

CEF provides a single target format for Windows CE executable files. The first time a CEF file is executed on a CE device, CE converts the CEF file to native code. This conversion only occurs once and happens very quickly. The resulting code is native to the processor.

Microsoft's goal is to have the executable's performance be at least 80% of native, fully optimized code, and to be only about 20% larger than a native executable.

7.2 Can I use CEF in my current applications?

Get the Visual C++ Toolkit for Windows CE v. 6.01. One of the features added to this version is generation of CEF output.

7.3 Can I have a CEF based dll or ocx?

Yes. CEF will convert dll's and ocx's as well as exe's.

7.4 Why should I use CEF?

CEF's benefit is it's ability to run on any CE device, even ones that didn't exist at compile time.

Microsoft is (currently) committed to handling CEF on each new platform that comes into existence, so if you have an application built for CEF, that application will run on all current processors as well as new processors that come into existence after the product is shipped.

CEF greatly simplifies installation issues. Instead of producing a cab file for each platform type, produce one install set. Executables are converted on the platform once, prior to running.

7.5 Is CEF as fast as an application compiled for the platform?

No. Applications targeting the CEF format are not as heavily optimized as compilations targeting true native code. Microsoft engineers tried to make performance be at least 80% that of a native application.

7.6 If I am only targeting one specific device should I use CEF?

If you are certain that your application will only be run on one type of device (say a Casio PA2400) you should compile to produce native code for that platform. Compiling for native code produces a better optimized and smaller executable.

8. Installation

8.1 What install packages are available?

Windows CE installation packages usually automate the building of cab files, and provide a desktop CEAppMgr launcher. They hide the issues surrounding building ini files, processor codes, etc from you and let you focus on generating an install set.

Here is info on two installation toolkits:

InstallShield CE is a commercial installation package from the same company that dominates the desktop installation world. Their product is straightforward and easy to use, and they offer excellent support. They have a dedicated newsgroup installshield.ce.general which offers prompt support.

They also have a no questions asked return policy, or at least they did for me.

I returned the product because the CE toolkit is only half of what you will need to build a CE installer. You will also need the desktop version of Installshield. The CE version is $495, and the desktop version is between 600-700 dollars. So to build a CE installer using InstallShield be prepared to spend over $1100.

You can find out more about InstallShield CE here.

  • CuteInstall - download here!

Produced by AcerSoftTech in Shanghai, China, CuteInstall is a simple, easy to use install wizard for Windows CE. CuteInstall allows building install sets for all platforms and processor types.

CuteInstall is not as nice as InstallShield, and does not have the support. You are on your own if you need to produce setup dll's, etc.  Also, take a look at the following list, compiled by Nathan Lewis over at InstallShield. This is a list of CuteInstall's shortcomings:

1.  No localization capabilities.
2.  Does not support the "file flags" used for WinCE installations.
3.  Desktop-to-device installer does not provide any kind of scripting capabilities.
4.  Desktop-to-device installer does not provide access Win32 APIs.
5.  Has limited support for H/PC and P/PC devices.
6.  Does not support HPC Professional devices.
7.  Very little error checking done before compiling the INF file.

On the other hand, you should consider CuteInstall in the following situations:

1. shareware/freeware developer - low budget projects
2. someone that needs a simple installer
3. someone that wants to learn about inf/ini files

You will be able to produce an install more quickly using InstallShield than CuteInstall. However, I personally believe that developers should at least try CuteInstall before plunking down the cash for ISCE.  It's freeware, so the only thing they lose is a little time if it turns out not to be helpful.

You can download CuteInstall here.

This installation toolkit will not automatically build your cab files, but it does take care of building an installation tool, and it comes with source code. 

From the web page:

If you are a WinCE author and are looking for an inexpensive way to create / obtain a setup program, look at EZSetup! Once you have created your .cab files (as described in the WinCE SDK), you are ready to use EZSetup. EZSetup takes your .cab files and *outputs* a compressed, self-contained, self-extracting Windows setup program that will set up your WinCE software.

EZ-Setup is freeware and is released under the GNU Public License.

8.2 How do I programmatically open a cab file on a CE device?

Call \windows\wceload.exe using the .cab filename as the parameter, ie.

Wceload myapp.cab

8.3 How do I start an installation from the desktop?

If you are planning on writing your own installation package, you will need to launch the windows ce services application manager, CEAppMgr.exe. To do this, open the registry key

[SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\CEAPPMGR.EXE]

to get the application manager location, then launch the exe providing the installer .ini file as a parameter.

8.4 How can I keep a cab file from being erased after it is installed?

Cab files allow installations to be run directly from the device. The .cab file extension is associated with wceload, which unpacks and installs files contained in the .cab file. Unfortunately, wceload deletes the .cab file after the installation is complete.

You can set your .cab files to read-only to prevent this behavior. While this does not work on HPC 2.0 devices it does work on Palm Size and HPC Pro devices.

Installshield provides a workaround for the HPC problem for their registered users.

8.5 What command line switches are available for CeAppMgr?

With the help of a hex editor I took a look inside of CeAppMgr.exe.  I found the following possible command line switches:

/report - generates dialog boxes reporting the current install step status
/askdest
/noaskdest
/SilentInstall

Unfortunately, except for /report none of them appear to work. Perhaps the next version of CeAppMgr will implement this functionality. 

8.6 My install set is having trouble registering controls on Palm-Size PC devices. What am I doing wrong?

Many people have reported problems with their installation programs. Usually the installer would crash during registration of controls. Apparently wceload.exe on palm-size devices was not calling CoInitializeEx before starting the registration process. Microsoft has issued a fix for the problem, available at: http://support.microsoft.com/support/kb/articles/Q240/4/35.asp

8.7 How can I programmatically open a .CAB file?

Nathan Lewis of InstallShield posted this note regarding .cab files:

You're developing an embedded system, and since Microsoft doesn't provide WCELOAD for embedded systems you're wanting to roll your own, right?  If that is the case, you can start by looking at the "Wotsit's Format" web site (http://www.wotsit.org/  ) in the Windows section.  They have the source to a program that will extract the various files from the CAB.  But that's the easy part...

When CabWiz builds the CAB files, it does two things:  It compiles the INF into an undocumented format, and it renames all of the files in the CAB using the 8.3 format.  Any filenames that are shorter than 8 characters are padded with leading zeros, and any that are longer than 8 characters are converted to short filename format.  The extension for each file is also changed to use exactly three characters, from "000" to "999".  The compiled INF file is stored in the CAB with the "000" extension, and it contains the original filenames for all the other files.  The last file in the CAB always has the "999" extension, which seems to mean that you can never have more than 1,000 files in the CAB (including the compiled INF).

So the basic steps would be:

    1.  Extract the CAB to a temporary directory.
    2.  Parse the compiled INF (*.000)
    3.  Rename the files to their original names and install them.

The compiled INF is the only problem since it's not documented.  I guess you'll have to reverse engineer the file format.  You could start by creating a bunch of simple CAB files using CabWiz, then examine the "*.000" files to try and figure out how they're stored.

9. Help

9.1 What format is Windows CE Help in?

Windows CE help files are simple html files. There are two file extension types for windows CE help; .htc and .htp. The first, .htc, is the main link into your applications help system. Typically, this help file should be named myapp.htc, where myapp is the name of your application. You can use only one help file, or have links into other files. Other files can be named whatever you like, but is it probably a good idea to use a name related to your application, like myapp_config.htp, myapp_usage.htp.

9.2 How should I create help files?

The simplest way I have found is to enter text in Word for Windows, creating links using bookmarks and hyperlinks, then save it as an html file.

9.3 How can I programmatically launch help?

Call \windows\peghelp %1, where %1 is the name of the help file to open.

10. Internal/Undocumented/Hack Corner

10.1 Ways to explore Windows CE.

The Visual C++ Toolkit for Windows CE includes remote spy, remote registry editor and remote process viewer. Use these tools to find system window names, explore and tweak the registry, etc.

Here's a list of ways you can learn more about Windows CE:

  1. Use dumpbin on SDK library files to find out about exported functions
  2. Use dumpbin on emulator dll's to find out about hidden functions
  3. Use loadlibrary to load executable images from ROM into RAM, then write them out to a file and inspect them.
  4. Get Platform Builder - lots of cool stuff here!
  5. Use virtualalloc, virtualcopy to copy process spaces to disk then inspect.
  6. Download CCMemory and inspect memory directly on the device.
  7. Don't bother with GetROMFileBytes - it only works on files that are not XIP (as far as I can tell).

One other thing I found in the docs

"Most miscellaneous files are compressed (with the exception of a few fonts). Code and read-only sections for the executables and DLLs are uncompressed to enable execute-in-place. The read-write sections are compressed because they are destined for RAM, where they will be [de]compressed."

This means that you can dump the ROM to disk and files will be readable (non-compressed).  If you can figure out the ROM file structure you can have access to the entire system. Not only could you disassemble device drivers, but you could copy pocket office to the pspc and try it out.  I'll keep you posted on my progress.

10.2 Hack while you can - it will be harder soon.

Microsoft plans to tighten up security in its operating system by Windows CE 3.0. Certain functions, including VirtualCopy, SetProcPermissions, and other will be restricted to trusted applications only. Here's a brief list of functions that will be restricted:

AddEventAccess, CeSetThreadPriority, CeSetThreadQuantum, CreateAPISet, ForcePageout, GetKPhys, GiveKPhys, GwesPowerOffSystem, LocalAllocInProcess, LocalFreeInProcess, LocalSizeInProcess, LockPages, PowerOffSystem, RegisterAPISet., RemoteLocaleAlloc, RemoteLocalFree, RemoteLocalRealloc, RemoteLocalSize, SetExceptionHandler, SetGwesPowerOffHandler, SetInterruptEvent, SetKMode, SetPowerOffHandler, SetProcPermissions, SetRAMMode, SetSystemMemoryDivision, SetWDevicePowerOffHandler, SystemStarted, ThisIsGwes, UnlockPages, VirtualCopy, VirtualSetPageFlags.

10.3 BinaryCompress/BinaryDecompress - built in compression for windows ce

You can use BinaryCompress and BinaryDecompress to perform buffer compression. BinaryCompress will take a buffer and return a compressed buffer. BinaryDecompress will take a compressed buffer and turn it back into the original. BinaryCompress and BinaryDecompress are defined in coredll.

I assume the compression API uses the same compression as the object store. That compression is comparative - Windows CE compresses the buffer using several methods and takes the winner.

Remember that all files kept in the object store are compressed, so this is redundant if you are just storing data in a file on your device.

Here's an example:

DWORD BinaryCompress(LPBYTE bufin, DWORD lenin, LPBYTE bufout, DWORD lenout);
DWORD BinaryDecompress(LPBYTE bufin, DWORD lenin, LPBYTE bufout, DWORD lenout, DWORD skip);

TCHAR string[] = _T("The quick brown fox jumps over the lazy man who did not come to the aid of his country in time.");
BYTE buffer[1024];
BYTE inpBuffer[1024];

int length = BinaryCompress((BYTE*)string, wcslen(string) * sizeof(TCHAR), buffer, 1024);
BinaryDecompress(buffer, length, inpBuffer, 1024, 0);

AfxMessageBox((TCHAR*) inpBuffer);
CString message;
message.Format(_T("%i, %i"), wcslen(string), length);
AfxMessageBox(message);

In this example, the uncompressed buffer is 188 bytes and the compressed buffer is 148 bytes. Not the best, but it is free.

10.4 SetProcPermissions - give your process access to other processes!

This command will allow you to access memory in other process slots. It currently is available to all processes, but in future versions of CE it will be a restricted function.

The prototype is void SetProcPermissions(WORD procFlag). Each bit in the procFlag refers to a process. To get access to process slot 0, 1, 2 and 3 then procFlag would be 0x000F. To allow access to all processes set the flag to 0xFFFF.

10.5 RegFileCopy - make an instant copy of the registry

This is a great little command. RegFileCopy(filename) will write the registry out to the specified filename. It takes about 1 second on my Casio e-100. There is also a command RegRestoreFile that will restore a .reg file to the registry. I have not used this one yet (as of 9/6) so I cannot comment on its use, but you may want to check it out.

Unfortunately, the output file is not exactly text based. It does look pretty easy to parse, so you could write an application to convert it to text.

10.6 GetFSHeapInfo - pointer to object store in physical memory

Want to have some real fun, and possible really screw up your device? Try this little piece of code:

DWORD objStoreLoc = GetFSHeapInfo();
SetProcPermissions(0xFFFF);
#define SIZE (1024*1024*4)
BYTE* lpv;
BOOL bRet;
lpv = (BYTE*) VirtualAlloc(0, SIZE, MEM_RESERVE, PAGE_NOACCESS);
bRet = VirtualCopy(lpv, (void*)objStoreLoc, SIZE, PAGE_READWRITE | PAGE_NOCACHE);
if (bRet) {

CFile output(_T("\\outputImage.bin"), CFile::modeCreate | CFile::modeWrite | CFile::typeBinary);
output.Write(lpv, SIZE);

}
VirtualFree(lpv, 0, MEM_RELEASE);

This writes 4Mb of raw object store out to a file, which you can copy to your pc and proceed to inspect with a hex editor. Remember, all Windows CE buffers will be little endian. The file system is FAT based, too, so search for directory entries and proceed from there.

10.7 Predict.dll offers access to word prediction on Palm Size PC's

Palm Size PC devices use soft keyboards. The standard keyboard also uses a moderate dictionary to try and guess you next word. You can also use the prediction routines and access the dictionary.

Check out Predict dll and the following exported functions:

PredictGetTables
TrieIndexToWord
TrieInit
TriePrefixToRange

I do not have the prototypes yet.

You may also want to check out statdict.dat and dictprob.dat, two files apparently associated with the SIP dictionary gadget. I will post more info as I find it.

10.8 Inspect ROM on the Casio E-100 and find interesting things.

Curious about the internal workings of Windows CE? Want to see weird messages left by the developers, like Woo-hoo! Keyboard type is:  and discover hidden DLL exports like the ones used in jotcore1.dll - ZorroClose, ZorroOpen, ZorroTrain.

It is pretty simple once you know where to look. Lucky for us, EXE's in ROM are not compressed, since they are run in place (Note that they are not in PE format either, but in .bin format.  Check the PB docs for info on .bin format). I made a little program that grabs 4Mb chunks of memory and writes them out to files. I then copy the files to the desktop and read them with a hex editor, like HEdit or Hackman. The ROM image in combination with Platform Builder is a great insight into the working of CE.

Here's some sample code:

#define PHYSADDR ((PVOID)((0xbf000000)))
#define SIZE (1024*1024*4)

BYTE* lpv;
BOOL bRet;

lpv = (BYTE*) VirtualAlloc(0, SIZE, MEM_RESERVE, PAGE_NOACCESS);
bRet = VirtualCopy(lpv, (void*)PHYSADDR, SIZE, PAGE_READWRITE | PAGE_NOCACHE);
if (bRet) {

CFile output(_T("\\outputImage.bin"), CFile::modeCreate | CFile::modeWrite | CFile::typeBinary);
output.Write(lpv, SIZE)

}
VirtualFree(lpv, 0, MEM_RELEASE);

This code will write 4 Mb of ROM to a file in the root directory on your device. Simply copy this file to your desktop machine and use your favorite hex editor to review the contents of ROM.

10.9 SetWindowsHookEx really does work, sort of.

If you believe the Microsoft documentation, SetWindowsHookEx does not work under Windows CE. However, if you have read this FAQ you know that SetWindowsHookEx can be found in coredll (2.11 PSPC and HPC Pro versions only). The question is, what does it do, and is it a full implementation.

I have been wanting to write an ATL control that passes messages (like WM_HIBERNATE) to VBCE. One way to do this is to create an ATL control, implement a connection point, and install a windows hook that monitors the message queue, and whenever a relevant message appears, fires an event off to VB. Unfortunately, every combination of

gHook = SetWindowsHookEx(WH_CALLWNDPROC, (HOOKPROC) MyWndProc, gInstance, 0);

returned an error 87 (incorrect parameter). Further searching through the PB header files reveals only three hook-related defines: 

#define WH_JOURNALRECORD 0
#define WH_JOURNALPLAYBACK 1
#define WH_KEYBOARD_LL 20

So I stopped using WH_CALLWNDPROC and tried WH_KEYBOARD_LL, and found that it worked quite well. I actually implemented a hook callback that watched for VK_OFF, and when detected, waited 2 seconds before returning. Whenever I pressed the power button the device would indeed wait before turning off. I also attempted to abort the power off by returning a non-zero number from the hook callback. While this does prevent the power button from powering off the device, it also causes the device to crash. Besides, VK_OFF is only generated when the off button is pressed, and not when a device time-out occurs, so the code was of marginal use. However, if you need to trap other low-level keyboard commands (ctrl-esc, etc) SetWindowsHookEx might be for you.

While I imagine journal record and playback are implemented as well, I have not tried them.

10.10 Calstore.dll can be used to access the task database API set.

Calstore.dll manages access to various task database functionality. I could not find any documentation on the API offered by calstore on the device, but did find the list of exported functions in my Casio E-100 ROM.

ReplAppointmentFromOid
ReplDeleteAppointment
ReplDeleteTask
ReplGetCalendarObjectStore

ReplReleaseAppointment
ReplReleaseCalendarStore
ReplReleaseTask
ReplTaskFromOid

APPTGetMonthData
AdjustForBias
AdvanceRecurNoClone
AppointmentFromOid

CompleteTask
ConvertRenTzToSchedPlus
ConvertSchedPlusToRenTz
CreateAppointment

CreateTask
DeleteAppointment
DeleteTask
EditException

EnumAppointments
EnumExceptions
EnumRecurAppointments
EnumRecurAppointmentsEx

EnumRecurPattern
EnumTasks
ExceptionFromOriginal
FExceptions

FindAppointmentFromGlobj
FreeARI
GetAppointmentData
GetCalendarObjectStore

GetExceptionInfo
GetMinimumPeriod
GetMonthData
GetMonthDataEx

GetPatternStartTime
GetStartAndEndDate
GetTaskData
GetYearData

IsActiveTask
IsApptOid
IsException
IsMeetingUpToDate

IsOccurrenceSameDay
IsOidApptDbase
IsOidTaskDbase
IsOverlappingException

IsRecurring
IsRecurringTask
IsTaskOid
IsToday

MapPMailtoRenRecur
OidFromAppointment
OidFromTask
ReleaseAppointment

ReleaseCalendarStore
ReleaseTask
RenFromStdTimeZoneInfo
ReplSetApptAlarm

ReplSetTaskAlarm
ResetCache
SendAttendeesUpdate
SetAppointmentData

SetAttendeeCriticalChange
SetNextAlarms
SetSnapDate
SetTaskAlarms

SetTaskData
StartTasksEnum
StdTimeZoneInfoFromRen
StopTasksEnum

TaskFromOid
UpdateResponseEntry
WriteLastAlarmDate

The functions don't really do much good without the prototypes, but they are a starting place.

Another way to access calstore functionality is using the Pocket Outlook Object Model, or POOM. See 3.5 How can I work with Pocket Outlook data? for more information.

10.11 How can I reformat a compact flash card?

Formatting a compact flash card from your CE device is fairly straightforward, once you know a couple of key pieces of information.  First, you need to open the compact flash device using:

CreateFile(szVolume, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);

Next, you need to actually issues a format command to the device, as follows:

// hVolume is the file opened with createFile
// fv is FMTVOLREQ struct, which contains a DWORD
DeviceIoControl(hVolume, IOCTL_DISK_FORMAT_VOLUME, &fv, sizeof(fv), NULL, 0, &cb, NULL);

See Ben Beasley's source for a full compact flash formatter.

11. Known CE bugs

11.1 Createprocess on PSPC devices doesn't work

For some reason CreateProcess does not appear to work on palm-sized devices. Try ShellExecuteEx instead.

11.2 MFC CE 6.0 - Gettime with city set to foreign city. Returns 7/22/1863.

I came across this post and verified it on my e-100 as well.

The following code fails that worked previously in CE2.00 MFCs: (for Home
Cities outside the US).


CTime t = CTime::GetCurrentTime( );
int y = t.GetYear( ) // returns 1863 instead of 1999
I have traced it to CTime::GetLocalTm( ) returns a structure with tm_year
= -37
Likewise month, day and time information is incorrect in the structure.
It works for a Home City set in the World Clock to US Cities and a few
others in the world but fails when you choose cities in Australia and some
other countries. My guess is that some of the TimeZone information is not
stored for these cities and is causing GetLocalTm to fail. GetLocalTm did
not exist in previous versions of the CE MFCs. GetCurrentTime and GetYear
would previously work directly with the time value and not use GMT and time
zones.
Stephen Whitcher
Mobile Technologies Pty Ltd
Brisbane Queensland Australia (GMT+10:00 - no daylight saving)

11.3 The voice control will not write recordings to any filename except the default.

A recent post on microsoft.public.win32.programmer.wince discussed the fact the the voice recorder would not write the recording out to a user specified name, but always used the default. He was using the Casio E-100. He did the following:

::SendMessage(m_hWndVoice, VRM_RECORD, 0, (LPARAM) (LPTSTR)_T("\\myfile.wav") );

but the resulting filename was always "\\_tmp_file0.wav" (or incremented file1, file2, etc). Another person confirmed the problem and said he had given up using the voice control and gone straight to using the wave API's.

11.4 The 6.0 StrongArm compiler creates buggy code.

"Roman" posted this on the microsoft.public.windowsce newsgroup on 9/30/99:

The ARM compiler included with SDK version 12.00.8274.0 produces buggy code.  The ARM compiler included with 6.01 preview 12.10.8414 works well, and all bugs that found in (12.00.8274.0) appeared to be FIXED...

We compiled the SHA HASH algorithm - it failed with the old ARM compiler, but SH3, SH4, MIPS worked fine.  The CAST algorithm simple crashed the application. We tried with preview 6.01 compiler and found that it worked perfectly!

12. Windows CE Gossip Corner
12.1 PPTP will be available in 3.0 but not 2.12.

From Sebastion in the public.windowsce newsgroup, on 9/30/99: "PPTP support should come with Windows CE 3.0, but not with version 2.12. That's what I have heard yesterday from Microsoft."

12.2 A new grid control will be released soon

01/14/00 - I have heard that the grid control is nearly complete, and that a update for HPC/Pro users is available.  Microsoft is working on an HPC update as well, but it  is not quite ready yet.  If you are having problems with the grid control and are desperate, try sending a note to wcetwish@microsoft.com explaining your situation and asking for the update.

02/13/00 - Apparently an updated, more reliable grid control will be released within the next week or two, if things go as planned.  Finally!

12.3 The 2.12 version of Imgdecmp.dll supports 24-bit bitmaps.

I received a couple of comments suggesting that CE 2.12 version of imgdecmp.dll supports 24-bit color. The current imgdecmp.dll on OEM devices supports 8-bit color only.

12.4 When will VCCE 6.5 be released?

From Steve Maillet in the win32.programmer.wince group on 10/9: "[VCCE 6.5 is] not officially announced as of yet. but based on time frames in the past it was 6-8 weeks after PB was released. SO a couple months is what I expect."

SP3 support should be supported in the forthcoming VC++ toolkit for Windows CE V6.5.

Copyright CEGadgets.com 1998-2001. All rights reserved.
Microsoft and Windows are registered trademarks of Microsoft Corporation
No guarantee or warranty of any kind is offered for information, controls and software on this or any other CEGadgets page. Use at your own risk.

Windows CE Developers FAQ

Posted by krsuncom
개발이야기2007. 8. 3. 13:09

Making A2DP work on your PPC-6700 is very simple. All you have to have are the file attached below, your PPC-6700, and a A2DP compatible headset.
1. Download the attached .zip file on your ppc. Either directly or activsync it over. And extract files. NOTE: if you have the new ROM, if not your gonna have to activsync all the files over after extracted on your desktop.
2. Copy Avrcp_MPplugin.dll, bta2dp.dll, & sbc.dll to windows directory on phone.
3. Install the Tornado_A2DP.CAB and then install the Tor_A2DP_cert.CAB
4. Soft reset the device.
5. Pair your headset with the phone, making sure you select the set as wireless stereo option, and your DONE!
--------------------------------------------------------------------------
If you have an Axim X51v or X50v running Windows Mobile 5 and a Bluetooth Headphone you'd like to use with it, try this:
1. Extract the A2DP.ZIP file to a folder and copy the contents to your Axim:
A) tor_a2dp.cab
B) tor_a2dp_cert.cab
C) 3 DLLs avrcp_mpplugin.dll, bta2dp.dll, sbc.dll
D) a2dp.reg
2. Copy the three DLL files to \My Device\Windows and put the cabs and reg file into one directory.
3. Click on tor_a2dp.cab to install.
4. Click on tor_a2dp_cert.cab to install.
5. Turn power off completely or soft reset to register the changes.
6. Turn unit on. Go to:
Bluetooth > Devices> New partnership
7. After your BT stereo client is ready to pair, select "Wireless Stereo".
You may have to use a passkey if your headphone specifies, ie: "0000".
8. Tap and hold the client, and set it as Wireless Stereo
DONE.
If you are successful, please post back and include:
A. The device (e.g. X51v) and the BT headphone model that you used.
B. How you made it work if you encountered difficulty.
Credits:
Thanks to everyone involved at the XDA-Developers.com and the pdaphonehome.com forums.
References:
1. A2DP support on 818pro - xda-developers
2. A2DP on Tornado!! - xda-developers
3. A2DP on Tornado!! - xda-developers
4. http://www.pdaphonehome.com/forums/s...ad.php?t=71436
Edit
When you download the attached file "attachment.php", don't forget to rename it to "a2dp.zip".
--------------------------------------------------------------------------------
If you have a blackjack is very simple.
1. Download the attached .zip file on your phone. Either directly or activsync it over. And extract files. NOTE: if you have the new ROM, if not your gonna have to activsync all the files over after extracted on your desktop.
2. Copy the file to windows directory on phone.
3. Install the A2DP.exe and select the set as A2DP on option.
4. Soft reset the device. your DONE!
That simple now you can listen to your favorite music with stereo quality!

Attached Files

File Type: zip
ppc6700_a2dp.zip (83.3 KB, 0 views)

File Type: zip
Tor_A2DP.zip (43.0 KB, 0 views)

File Type: zip
blackjack_A2DP.zip (63.4 KB, 6 views)

 

Bluetooth (A2DP)

Posted by krsuncom
개발이야기2007. 8. 1. 15:09

 

Wireless DevCenter: Microsoft Smartphone Tips and Tricks

Microsoft Smartphone Tips and Tricks

by Wei-Meng Lee
05/14/2004

There is so much an excellently designed smartphone can do. But without the software to power it, it's virtually useless. Since the launch of the first Orange SPV Microsoft smartphone in October 2002, there have been a host of new applications designed to run on this platform. In this article, I will show you some of the cool things you can do with your Microsoft smartphone.

Installing Applications

One point about installing an application for the smartphone: you can either use ActiveSync to install the application from your PC to your smartphone, or you can install it directly from the vendor's web site. Figure 1 shows how you can install an application using Pocket Internet Explorer. Simply go to the vendor's web site and click on the relevant link to download the file. Once you confirm the download, it will be installed on your smartphone automatically.


Figure 1. Installing an application through the Web

Easy, right? Now let's move to file transfer.

Transferring Files onto Your Smartphone

Sometimes you just need to transfer files (such as MP3 music files) onto your smartphone. There are a few easy ways to do that. You can either use the infrared port or use ActiveSync to do the job. I use ActiveSync most of time, as it is the most flexible method. Simply hook up your smartphone to your PC through ActiveSync and at the ActiveSync window, click on the Explore button (see Figure 2). You will then be able to explore the file system on your smartphone and drag and drop files as required.


Figure 2. Exploring the file system of your smartphone through ActiveSync

Photo Contacts

One application that is useful for your smartphone is the Photo Contacts application from PocketX Software. Using Photo Contacts, you can assign photos to your contacts in your address book (see Figure 3).


Figure 3. Assigning photos to your contacts

If your service provider supports caller identification, the photo of the caller will be displayed when your smartphone rings (see Figure 4).


Figure 4. Displaying the photo of the caller

World Time

Another useful application is the World Time application by The MadBeetle. Using the World Time (see Figure 5), you can view the time of 400 cities worldwide. City data includes:

  • Sunrise\sunset
  • GMT offset
  • Daylight savings
  • Analogue clock
  • The moon phase
  • Airport code
  • Dial Code
  • Longitude and Latitude

The World Time application is useful if you do a lot of travelling and need to check out the different time zones.


Figure 5. Using World Time to check on different time zones

System Utilities

If you constantly install applications and move files into and out of your smartphone, then you need an effective way to view the various resources on your smartphone. I've found Resco SystemToys for Smartphone to be a good choice.

Resco SystemToys allows you to check on your battery status, as well as the amount of memory remaining (see Figure 6). So the next time you want to install that favorite MP3 on your smartphone, check out the amount of available memory first.


Figure 6. Use Resco SystemToys to check the battery and memory status

Pocket TV

If you spend a significant amount of time on the road, then you will be glad that PocketTV allows you to play MPEG movies on your smartphone (see Figure 7).


Figure 7. Watching movies using PocketTV

You can download some free video clips from pocketmovies.net. I downloaded snippets of The Return of the King and played them on the MPx200. The playback was smooth and the sound of acceptable quality. So the next time you hit the road, be sure that you load your smartphone with the latest movie hits.

Media Player on Your Smartphone

Envy those people who have an iPod or a digital video player? Fret not; with a little investment, you can turn your smartphone into a music player. In fact, your smartphone already comes with the required software to play your music and video files (MP3s and WMA are supported). The only constraint that you probably face is storage. While the iPod supports storage of 4GB and above, your smartphone comes with a paltry storage space of about 10MB (this depends on your phone model). So you can literally forget about storing your music files on your smartphone.

Fortunately, this problem can be solved by buying an external storage card. For music- and video-playing purposes, I suggest you invest in at least a 128MB SD card. If budget allows, go for the largest in capacity -- 1GB (see Figure 8).


Figure 8. Invest in a large-capacity SD memory card

To copy CD music or videos onto your smartphone, you can use Media Player 9 (see Figure 9).


Figure 9. Using Windows Media Player 9 to copy your music or video onto your smartphone

Playing music on the smartphone is cool -- the sound quality is good and crisp. However, video playback using the smartphone Windows Media player is not fantastic -- screens tend to be jerky. The sound track of the video is good, but the video does not synchronize well with the sound. Even so, watching videos while you are on the train is still a good way to spend your time (see Figure 10).


Figure 10. Watching a video on my smartphone

Final Thoughts

One of the success factors for a platform is the amount of applications available for it. In my upcoming articles, I am going to dive more deeply into how to get more out of your smartphone. In the meantime, do share with us on your favorite applications on the smartphone.

'개발이야기' 카테고리의 다른 글

WM6 A2DP best settings here - xda-developers  (0) 2007.08.06
Windows CE Developers FAQ  (9) 2007.08.06
Bluetooth (A2DP)  (0) 2007.08.03
RegistryNotifyCallback  (4) 2007.07.31
The State and Notifications Broker Part I  (4) 2007.07.31
HTC Application Unlock Guide  (0) 2007.07.30
Posted by krsuncom
개발이야기2007. 7. 31. 16:46

원본 : 요기

RegistryNotifyCallback

Windows Mobile

Windows Embedded CE

6/12/2007

This function registers a transient notification request. It is used to request that the caller be notified by a specified callback when a specified value has been changed.

SyntaxSyntax

Copy Code

HRESULT WINAPI RegistryNotifyCallback(
  HKEY hKey,
  LPCTSTR pszSubKey,
  LPCTSTR pszValueName,
  REGISTRYNOTIFYCALLBACK pfnRegistryNotifyCallback,
  DWORD dwUserData,
  NOTIFICATIONCONDITION * pCondition,
  HREGNOTIFY * phNotify
);

ParametersParameters

hKey

[in] Handle to a currently open key, or a predefined root value.

pszSubKey

[in] The key under which the value is stored. If this value is NULL, pszValueName is assumed to be under hKey.

pszValueName

[in] The name of the value on which change notifications are requested. If this value is NULL, it indicates the default value.

dwUserData

[in] User data that will be passed back to the user with the notification.

pfnRegistryNotifyCallback

[in] A pointer to a function that will be called back when a notification arrives. For a prototype for this function, see REGISTRYNOTIFYCALLBACK.

pCondition

[in] Condition that determines when to send the notification. When the comparison between pCondition and the new registry value is TRUE, then a notification is sent. If this value is NULL, any change results in a notification.

phNotify

[out] Receives the handle to the notification request. This handle should be closed using RegistryCloseNotification when notifications on this key are no longer needed. Resetting the device also stops the notification.

Return ValueReturn Value

Value
Description

S_OK

Request for change notification is registered.

E_INVALIDARG

Invalid hKey, phNotify, or pfnRegistryNotifyCallback.

An error value returned.

Error value wrapped as a FACILITY_WIN32 HRESULT.

RemarksRemarks

The client will be notified of changes via the callback, which is executed on private thread separate from the thread that called RegistryNotifyCallback.

If the value does not exist at the time of the call to RegistryNotifyCallback, the client will be notified when the value is added.

To stop notification and to close the notification handle, the caller must call RegistryCloseNotification. However, this type of notification is transient. Resetting the device stops the notification.

This function can be used to monitor any registry key in the system. The header file snapi.h contains definitions for the registry keys, paths, values, and bitmasks for all the base notifications that are provided by the system.

If the notification to the callback function fails, the notification will be removed.

If the key specified by hKey and pszSubKey doesn't exist, then hKey is monitored until pszSubKey is created, after which pszSubKey is monitored and changes to the key will trigger notifications as requested. To minimize possible performance degradation stemming from a large nuimber of subkeys being monitored, it is a best practice to pass (as hKey) the handle to a key that's as close as possible to pszSubKey rather than passing a root key. For example, if the client is a game and it is monitoring the key structure HKEY_CURRENT_USER\...\MyCoolGame\Player1 and the game could later create HKEY_CURRENT_USER\...\MyCoolGame\Player2, two possible ways to approach notification of changes to the Player2 key include:

Potential performance degradation
Fewer potential problems

hKey = handle to HKEY_CURRENT_USER andpszSubKey=the full path to Player2

hKey = handle to HKEY_CURRENT_USER\...\MyCoolGame\ andpszSubKey=Player2

Code ExampleCode Example

The following code example demonstrates how to use RegistryNotifyCallback.

Note:

To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.

Copy Code

void AdjustPowerConsumption(HREGNOTIFY hNotify, DWORD dwUserData, const PBYTE pData, const UINT cbData);
// Register to be notified of changes to the eighth bit
// in SN_POWERBATTERYSTATE_VALUE. The eighth bit is set to one when 
// the battery is critically low (and set to zero and when it is not).
HRESULT RegistryNotifyCallbackExample()
{
    NOTIFICATIONCONDITION nc;
    HRESULT hr         = S_OK;
    HREGNOTIFY hNotify = NULL;
    // Initialize the notification structure.
    // The mask for the eighth bit.
    nc.dwMask = 0x8;
    // Receive a notification whenever that bit toggles.
    nc.ctComparisonType = REG_CT_ANYCHANGE;
    // dw is ignored for REG_CT_ANYCHANGE.
    nc.TargetValue.dw = 0;
    
    hr = RegistryNotifyCallback(SN_POWERBATTERYSTATE_ROOT, 
                                SN_POWERBATTERYSTATE_PATH, 
                                SN_POWERBATTERYSTATE_VALUE, 
                                AdjustPowerConsumption, 
                                0, 
                                &nc, 
                                &hNotify);
    // Close the notification using RegistryCloseNotification when done.
    // Note that it is alright to call RegistryCloseNotification from the callback function.
    // hr = RegistryCloseNotification(hNotify);
    return hr;
}
// This is the callback function.
void AdjustPowerConsumption(HREGNOTIFY hNotify, DWORD dwUserData, const PBYTE pData, const UINT cbData)
{
    DWORD dwCritical;
    HRESULT hr = S_OK;
    // pData contains the new value for SN_POWERBATTERYSTATE_VALUE.
    dwCritical = (*(DWORD*) pData);
    // Extract the eighth bit.
    dwCritical = dwCritical & 0x8; 
critically low.
    {
 your statements for preserving energy, here.
    }
    // The battery level was critically low, but it is not now.
    else
    {
        // Add your statements for returning to the normal battery state, here.
    }
}

Code ExampleCode Example

The following code example demonstrates how to register transient notification requests for phone StatStore values.

Note:

To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.

Copy Code

#include <regext.h>
#include "snapi.h"
const TCHAR c_szPhoneRegistryRootkey[]      = TEXT("System\\State");
const TCHAR c_szPhoneRegistrySubkey[]       = TEXT("Phone");
const TCHAR c_szPhoneSignalStrength[]       = TEXT("Signal Strength");
const TCHAR c_szPhoneIncomingCallerNumber[] = TEXT("Incoming Caller Number");
const TCHAR c_szPhoneStatus[]               = TEXT("Status");
#define MAX_NOTIF 3
enum NotifType
{
      SignalStrength = 0,
      IncomingCallerNumber,
      PhoneRoaming
};
HREGNOTIFY g_hRegNotify[ MAX_NOTIF ] ;
// The call-back function for Registry Notifications.
void RegistryNotifyCallbackFunc(HREGNOTIFY hNotify, DWORD dwUserData, const PBYTE pData, const UINT cbData)
{
    TCHAR szOutput[MAX_PATH];
    // Identify the Notification received, based upon the User Data passed in, while registering for the notification.
    switch( dwUserData )
    {
        case SignalStrength:
            StringCchPrintf(szOutput, MAX_PATH, _T("The Signal Strength is %d"), (DWORD) *pData);
            break;
        case IncomingCallerNumber:
            StringCchPrintf(szOutput, MAX_PATH, _T("The Incoming Caller Number is %s"), (TCHAR*)pData);
            break;
        case PhoneRoaming:
            {
                  DWORD dw = 0;
                  // Copy the data sent to us into a local buffer.
                  memcpy(&dw, pData, cbData);
                  // Find out if the roaming status has been set by logically ANDing the data with the value 512 (the bitmask for roaming).
                  StringCchPrintf(szOutput, MAX_PATH, _T("The Roam Status of the Phone is %s"), ( dw & SN_PHONEROAMING_BITMASK ) == SN_PHONEROAMING_BITMASK  ? _T("TRUE") : _T("FALSE")  );
            }
            break;
        default :
            break;
    }
    OutputDebugString( szOutput );
    return;
}
void RegisterForPhoneNotifications()
{
    HKEY hKey;
    // Let us open the registry to get a handle to the Phone Registry key.
    if (S_OK == RegOpenKeyEx(HKEY_LOCAL_MACHINE, c_szPhoneRegistryRootkey, 0,  KEY_QUERY_VALUE, &hKey))
    {
    // Since we are registering for multiple notifications, let's pass some unique User Data for each notification ( 5th param ), 
    // which will help us identify the notification in the Call Back.
     // Let us register for Signal strength notifications.
     HRESULT hr = RegistryNotifyCallback(hKey, 
                                         c_szPhoneRegistrySubkey,
                                         c_szPhoneSignalStrength,
                                         RegistryNotifyCallbackFunc,
                                         SignalStrength,
                                         NULL,
                                         &g_hRegNotify[ SignalStrength ] );
        
    // Let us register for Incoming Caller Number notifications.
            hr = RegistryNotifyCallback(hKey, 
                                        c_szPhoneRegistrySubkey,
                                        c_szPhoneIncomingCallerNumber,
                                        RegistryNotifyCallbackFunc,
                                        IncomingCallerNumber,
                                        NULL,
                                        &g_hRegNotify [ IncomingCallerNumber ] );
    //  Let us register for Roaming status change notifications.
            hr = RegistryNotifyCallback(hKey, 
                                        c_szPhoneRegistrySubkey,
                                        c_szPhoneStatus,
                                        RegistryNotifyCallbackFunc,
                                        PhoneRoaming,
                                        NULL,
                                        &g_hRegNotify [ PhoneRoaming ] );
        RegCloseKey(hKey);
      
    }
}
void  CloseAllNotifications ()
{
     for (int i = 0; i < MAX_NOTIF; i++)
    {
            RegistryCloseNotification(g_hRegNotify[i]);
    }
}

RequirementsRequirements

Header
regext.h

Library
aygshell.lib

Windows Embedded CE
Windows Embedded CE 6.0 and later

Windows Mobile
Pocket PC for Windows Mobile Version 5.0 and laterSmartphone for Windows Mobile Version 5.0 and later

See AlsoSee Also

Reference
REGISTRYNOTIFYCALLBACK Structure
RegistryBatchNotification
State and Notifications Broker Functions
State and Notifications Broker Reference
Concepts
Using the State and Notifications Broker in Native Code
Other Resources
State and Notifications Broker

 

RegistryNotifyCallback

Posted by krsuncom
개발이야기2007. 7. 31. 16:03

원본 : 요기

The State and Notifications Broker Part I

Jim Wilson
JW Hedgehog, Inc.

February 2006

Applies to:
   Microsoft .NET Compact Framework version 2.0
   Microsoft Visual Studio 2005
   Windows Mobile 5.0

Summary: In this month's column, Jim introduces the State and Notifications Broker and its role in enabling applications to work more closely with the Windows Mobile platform. The discussion covers the underlying architecture of the State and Notifications Broker, the use of the State and Notifications Broker API to retrieve more than 100 different state values, and how an application can cooperate with the State and Notifications Broker to receive notifications about changes to important state values, such as a change in network availability. This column covers both native and managed code usage of the State and Notifications Broker API.

This month's column is part one of a two-part examination of the State and Notifications Broker and is the first in a series of many deep-dive discussions about the new features Windows Mobile 5.0, the .NET Compact Framework 2.0 and Visual Studio 2005 provide. (20 printed pages)

Contents

Introduction
Getting Started with the State and Notifications Broker
Retrieving Windows Mobile State Information
Receiving Notifications
Conclusion

Introduction

As I mentioned in my previous column, A View of Windows Mobile 5.0 from 10,000 Feet, we are going to spend the next several months taking a detailed look at the new features that Windows Mobile 5.0, Visual Studio 2005, and the .NET Compact Framework version 2.0 offer developers. This first article in the series provides a detailed look at the Windows Mobile 5.0 State and Notifications Broker API.

I have to say that choosing the first feature to investigate was actually easier than I thought. I'm not saying that Windows Mobile 5.0, Visual Studio 2005, and the .NET Compact Framework 2.0 don't offer a lot of great new features—they certainly do. But the State and Notifications Broker API is one of those APIs that literally opens up a whole world of opportunities. Common situations that have historically been difficult to deal with programmatically become quite easy to manage—such as detecting changes in network connectivity, locating the Pocket Outlook contact that corresponds to the incoming caller, or determining that the device battery has become critically low. Similarly, situations where you have an application that needs to publish changes in the application's state or share data with other applications become significantly easier with the State and Notifications Broker API.

The State and Notifications Broker API offers too many features to cover in a single edition of this column, so I'm going to divide this discussion about the State and Notifications Broker API into two parts. In part I, we'll look at using the State and Notifications Broker API to more closely integrate your applications with the device and built-in Windows Mobile applications. In part II, we'll discuss using the State and Notifications Broker API in some more advanced situations, and we'll also look at how to expose state information from your own applications.

Getting Started with the State and Notifications Broker

As the name implies, the State and Notifications Broker provides two services. First, it acts as a central repository for state information without regard for the source of that information. Second, it provides a standard architecture for monitoring those state values for changes and distributing change notifications to the list of interested parties. Fundamentally the State and Notifications Broker is a data store that provides a standardized publish-subscribe model for distributing data change notifications. Don't let this simple definition fool you. The State and Notifications Broker is a very powerful tool.

With the State and Notifications Broker, Windows Mobile 5.0 changes a smart device from a device that simply runs a bunch of independent applications to a holistic platform where applications can easily share information and respond to changes in the device's state and to the state of other applications. The State and Notifications Broker provides the user with a high degree of continuity between individual applications and creates a device that, in a sense, runs a single meta-application made up of the best features of the individual applications that run on the device.

Remember that the State and Notifications Broker and the corresponding API, the State and Notifications Broker API, are part of the Windows Mobile 5.0 platform and, therefore, require you to install Visual Studio 2005 and the Windows Mobile 5.0 SDK for Pocket PC or Smartphone on your desktop computer.

Note   See the Windows Mobile 5.0 Developer Tools section in last month's column for the complete list of downloads and installations that are required to develop Windows Mobile 5.0 applications.
Locating the State and Notifications Broker API SDK Files

The exact location of the Windows Mobile 5.0 SDK on your desktop computer depends on which Windows Mobile 5.0 SDK you've installed. If you install the Windows Mobile 5.0 SDK for Smartphone and accept the default installation path, the SDK files are installed in \Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Smartphone SDK\. If you install the Windows Mobile 5.0 SDK for Pocket PC, you need to substitute Pocket PC for Smartphone in the previous path. With the Windows Mobile 5.0 SDK installed on their desktop computers, both managed-code and native-code developers have everything they need to use the State and Notifications Broker API.

The classes that are contained in the Microsoft.WindowsMobile.Status assembly expose the State and Notifications Broker API to managed-code developers. With the Windows Mobile 5.0 SDK installed, you can add a reference to the assembly by simply selecting it from the Add Reference dialog box in Visual Studio 2005, as shown in Figure 1.

Note   The Microsoft.WindowsMobile.Status assembly relies on types that are defined in the Microsoft.WindowsMobile assembly; therefore, anytime you add a reference to Microsoft.WindowMobile.Status to a project, you must also add a reference to Microsoft.WindowsMobile. Failing to do so will result in build errors.

Click here for larger image

Figure 1. Adding a reference to the Microsoft.WindowsMobile.Status assembly. Click the thumbnail for a larger image.

If you want to spelunk through the contents of the assembly by using a tool like ildasm or Reflector (for more information, see the Lutz Roeder's Programming.NET Web site), you need to open the assembly file directly, which you can find in the Designtimereferences subfolder of the Windows Mobile 5.0 SDK installation folder. All classes that are contained in the Microsoft.WindowsMobile.Status assembly are part of the "Microsoft.WindowsMobile.Status" namespace.

Native-code developers access the State and Notifications Broker API functions and structures by including the regext.h header file. This header file and other Windows Mobile 5.0 header files are located in the \Include\Armv4i subfolder of the Windows Mobile 5.0 SDK installation folder. The State and Notifications Broker API functions are all implemented in the aygshell.lib library. Visual Studio 2005 generated projects that target the Windows Mobile 5.0 platform automatically link to this library, so in most cases, you won't have to add the aygsell.lib file to the project libraries—because it will already be there.

Retrieving Windows Mobile State Information

As I mentioned previously in this article, one role of the State and Notifications Broker API is to provide unified access to state information. This information provides one-stop shopping for all of your system state needs. The Windows Mobile 5.0 platform ships with over 100 state values that the State and Notifications Broker tracks. These values relate to both the state of the device itself and the state of standard Windows Mobile 5.0–based applications such as Pocket Outlook.

Examples of system-wide state values include the following:

  • ActiveSync status
  • Whether a camera is present
  • Number of Bluetooth connections
  • List of current network connections
  • Whether a headset is connected
  • Whether a keyboard is connected
  • Display orientation
  • Battery strength
  • Outlook Mobile contact that corresponds to the current caller on the phone

Examples of per-user state values include the following:

  • Names of the currently active and previously active applications
  • Next calendar appointment
  • Media player information including current track title, artist, and album
  • Name of the Outlook Mobile e-mail account and number of unread e-mail messages
  • Name of short message service (SMS) account and number of unread SMS messages
  • Number of missed phone calls
  • Number of active tasks and number of overdue tasks

As you can see, the list of state information that the State and Notifications Broker tracks is quite comprehensive. In addition to more than 100 standard state values, original equipment manufacturers (OEMs) are free to add more values.

If you've been working with Windows Mobile–based devices for a while, you might notice that several of the listed state values are available from other APIs. For example, you can determine the current display orientation by calling the GetSystemMetrics function or by checking the Screen.PrimaryScreen.Bounds property if you are using managed code. Similarly, you can retrieve the current battery strength by calling the GetSystemPowerStatusEx method. And of course, information regarding the Calendar and Tasks is available through the Pocket Outlook API.

With these existing APIs, you may wonder why the State and Notifications Broker API has been added. As you'll see, there are a number of reasons, but one of the most notable is that the State and Notifications Broker API provides a single source for retrieving all state information. It is no longer necessary to hunt down a separate function or API for each individual state value. Also, prior to the introduction of the State and Notifications Broker API, determining a specific state value often required several function calls—and sometimes additional logic. With the State and Notifications Broker API, each state value is available through a single function call (in the case of native code) and as a single property value (in managed code).

The underlying implementation of the State and Notifications Broker uses the registry as the data store. All system-wide state values are stored under the HKEY_LOCAL_MACHINE\System\State registry key, and per-user state information is stored under the HKEY_CURRENT_USER\System\State registry key.

Under each of these registry keys, there are multiple child keys. Each child key has one or more values. These values hold the actual state information. Figure 2 shows the contents of the HKEY_LOCAL_MACHINE\System\State registry key on the Windows Mobile 5.0 Smartphone emulator.

Click here for larger image

Figure 2. State registry keys on the Windows Mobile 5.0 Smartphone emulator. Click the thumbnail for a larger image.

Accessing State Values from Native Code

With the information for the State and Notifications Broker being stored in the registry, you can easily access the information by using standard registry functions like RegOpenKeyEx and RegQueryValueEx. The following code example shows how to retrieve the name of the phone's service operator with native code by using these functions.

Copy Code

HKEY hPhone;
TCHAR tszOperatorName[1024];
DWORD dwType;
DWORD dwSize = sizeof(tszOperatorName);

RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("System\\State\\Phone"),
             0, 0, &hPhone);
RegQueryValueEx(hPhone, _T("Current Operator Name"), 0, &dwType,
               (BYTE*)tszOperatorName, &dwSize);

This code uses the RegOpenKeyEx function to open the HKEY_LOCAL_MACHINE\System\State\Phone registry key and then retrieves the operator name from the key's Current Operator Name value using the RegQueryValueEx function.

If you've done some work with the registry, you know that this pattern of opening a key and then accessing a value is common. With the introduction of the State and Notifications Broker, this pattern of access will likely become even more common. As a result, to simplify accessing registry values, the State and Notifications Broker API introduces two new functions: RegistryGetString and RegistryGetDWORD. Each function encapsulates both opening a key and accessing a value. The two functions behave exactly the same; they are just specialized for retrieving either string or DWORD values. The following example retrieves the phone service operator this time by using the RegistryGetString function.

Copy Code

TCHAR tszOperatorName[1024];
RegistryGetString(HKEY_LOCAL_MACHINE, _T("System\\State\\Phone"), 
    "Current Operator Name", tszOperatorName, sizeof(tszOperatorName));

As you can see, this code example is much simpler than the previous code example because it requires only a single function call and avoids the need to declare the extra variables that the RegOpenKeyEx and RegQueryValueEx functions require.

One of the biggest challenges in working with the State and Notifications Broker API in native code is keeping track of all of the registry key and value names. With more than 100 standard state values in the State and Notifications Broker, there are also more than 100 registry key and value name combinations. You also need to keep track of whether the registry key that corresponds to the state value of interest is located under the HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER registry key. Thankfully, you can find the list of standard state values that the State and Notifications Broker API tracks and the corresponding registry information in the State and Notifications Broker Base Properties help topic within the mobile5sdk.chm help file, which is located in the Help subfolder of the Windows Mobile 5.0 SDK installation folder.

Note   The easiest way to locate the help topic is to open the mobile5sdk.chm file and search for the string "State and Notifications Broker Base Properties". At the time I wrote this article, there is a version of the State and Notifications Broker Base Properties help topic located in the MSDN Library, but it didn't include the registry key and value names.

The documentation is a great help, but with the registry key names and value names being strings, there's no way to know about any error that might exist in the registry key or value name strings at compile time. Instead, the program will fail at run time. To avoid this failure, the State and Notifications Broker API provides a header file, snapi.h, that provides a complete list of #define values for the standard State and Notifications Broker API state values. The #define values include the root key, the key name, and value name for each state value. The following code example is the portion of the snapi.h header file that corresponds to the phone service operator state value.

Copy Code

///////////////////////////////////////////////////////////////////////
// PhoneOperatorName
// Gets the name of the mobile operator (i.e., the mobile phone 
// company, or carrier).
#define SN_PHONEOPERATORNAME_ROOT HKEY_LOCAL_MACHINE
#define SN_PHONEOPERATORNAME_PATH TEXT("System\\State\\Phone")
#define SN_PHONEOPERATORNAME_VALUE TEXT("Current Operator Name")

The following code example shows accessing the phone service operator, this time by using the provided #define values instead of the literal strings.

Copy Code

TCHAR tszOperatorName[1024];
RegistryGetString(SN_PHONEOPERATORNAME_ROOT, SN_PHONEOPERATORNAME_PATH, 
    SN_PHONEOPERATORNAME_VALUE, tszOperatorName, 
    sizeof(tszOperatorName));

Using the #define values rather than literal strings makes the code easier to read and, in the event that there are any errors in the #define value names, the compiler reports them.

Working with DWORD Values and Bitmasks in Native Code

When accessing DWORD state values you use the RegistryGetDWORD function rather than the RegistryGetString function of course, but there's also a little more to it. Let's take a look at the #defines values for two state values in the snapi.h header file: Phone Multi-Line and Phone Radio Present.

Copy Code

///////////////////////////////////////////////////////////////////////
// PhoneMultiLine
// Gets a value indicating whether the phone supports multiple lines.
#define SN_PHONEMULTILINE_ROOT HKEY_LOCAL_MACHINE
#define SN_PHONEMULTILINE_PATH TEXT("System\\State\\Phone")
#define SN_PHONEMULTILINE_VALUE TEXT("Multiline Capabilities")

///////////////////////////////////////////////////////////////////////
// PhoneRadioPresent
// Gets a value indicating whether the mobile device has a phone.
#define SN_PHONERADIOPRESENT_ROOT HKEY_LOCAL_MACHINE
#define SN_PHONERADIOPRESENT_PATH TEXT("System\\State\\Phone")
#define SN_PHONERADIOPRESENT_VALUE TEXT("Status")
#define SN_PHONERADIOPRESENT_BITMASK 32

In the case of Phone Multi-Line, a single function call accesses the DWORD value very much like accessing a string state value, as shown in the following code example.

Copy Code

DWORD dwPhoneMultiLine;
RegistryGetDWORD(SN_PHONEMULTILINE_ROOT, SN_PHONEMULTILINE_PATH, 
    SN_PHONEMULTILINE_VALUE, &dwPhoneMultiLine);

By looking at the Phone Multi-Line #define values, you can see that the state value is stored in the MultiLine Capabilities value of HKEY_LOCAL_MACHINE\System\State\Phone. A quick look at Figure 3 shows that the state value is 1. As a result, the call to the RegististryGetDWORD function in the previous code example returns 1, indicating that the phone on the current device—in this case is the Windows Mobile 5.0 Smartphone emulator—supports multiple lines.

Click here for larger image

Figure 3. The Phone state values viewed with regedit.exe. Click the thumbnail for a larger image.

Note   In the case of the Windows Mobile 5.0 Smartphone emulator, the radio is a fake radio with service provided by Fake Network. From a programming standpoint, this emulator provides all of the characteristics of having a phone radio, so attempts to make a phone call or to check the status of the radio appear to succeed when, in reality, no phone actually exists. This fake radio is very useful for developing and initial testing of phone-related applications without incurring the cost of placing a mobile phone call or acquiring a device.

For the Phone Radio Present state value, the #define values show that it is stored in the registry value Status under the same key as Phone Multi-Line. If you look at Figure 3 again, it shows that the value stored in the registry for Status is 9437344. This value may look strange and certainly doesn't seem to apply to whether or not the device has a radio.

Unlike the registry value MultiLine Capabilities, which stores a single state value, Status actually stores multiple state values, and each state value is represented as a separate bit. To access the specific state value of interest, you must apply a bitmask. In the case of the Phone Radio Present state value, that bitmask is contained in the #define value SN_PHONERADIOPRESENT_BITMASK. The following code example shows using the bitmask to determine if the current device has a phone radio.

Copy Code

DWORD dwValue;
RegistryGetDWORD(SN_PHONERADIOPRESENT_ROOT, SN_PHONERADIOPRESENT_PATH, 
                 SN_PHONERADIOPRESENT_VALUE, &dwValue);
  BOOL bPhoneRadioPresent = dwValue & SN_PHONERADIOPRESENT_BITMASK;

As you can see, the initial value is still retrieved from the registry by using the RegistryGetDWORD function, but the additional step of applying the bitwise AND operator to the returned value is required to see if the bit corresponding to the state value Phone Radio Present is set.

Not all DWORD state values that require a bitmask are Boolean values. In some cases, a single DWORD is used to store two smaller ranged state values—as in the case of the Main registry value under HKEY_LOCAL_MACHINE\System\Status\Battery. This one registry value represents both the battery strength level and the battery state. These two state values also demonstrate another important issue: these values are enumerations. As enumerations, they each represent a finite set of values. The thing that I find frustrating is that the current implementation of the State and Notifications Broker API doesn't provide any corresponding C/C++ enum declarations or #define values. So you can either place the literal values in your code—leaving anyone who must later support that code to figure out what they mean—or you can provide your own #define declarations. The mobile5sdk.chm help file topic, State and Notifications Broker Base Properties, that I mentioned previously in this article contains the list of possible values for these two state values. The following code example contains #define values that you can use with the battery state and battery strength level state values.

Copy Code

#define BATTERYLEVEL_VERYLOW    0
#define BATTERYLEVEL_LOW       21
#define BATTERYLEVEL_MEDIUM    41
#define BATTERYLEVEL_HIGH      61
#define BATTERYLEVEL_VERYHIGH  81

#define BATTERYSTATE_NORMAL     0
#define BATTERYSTATE_NOTPRESENT 1
#define BATTERYSTATE_CHARGING   2
#define BATTERYSTATE_LOW        4
#define BATTERYSTATE_CRITICAL   8

Using these #define values, the following code example demonstrates accessing the battery state and battery strength level state values.

Copy Code

DWORD dwBatteryMain;
RegistryGetDWORD(SN_POWERBATTERYSTRENGTH_ROOT, 
                 SN_POWERBATTERYSTRENGTH_PATH, 
                 SN_POWERBATTERYSTRENGTH_VALUE, 
                 &dwBatteryMain);

int batteryLevel = (dwBatteryMain & SN_POWERBATTERYSTRENGTH_BITMASK) >> 16;
int batteryState = dwBatteryMain & SN_POWERBATTERYSTATE_BITMASK;

TCHAR tszBatteryLevel[256];
// Build a string description of the battery strength level
switch(batteryLevel)
{
    case BATTERYLEVEL_VERYLOW :
        _tcscpy(tszBatteryLevel, _T("Battery Level: Very Low"));
        break;
    case BATTERYLEVEL_LOW :
        _tcscpy(tszBatteryLevel, _T("Battery Level: Low"));
        break;
    case BATTERYLEVEL_MEDIUM :
        _tcscpy(tszBatteryLevel, _T("Battery Level: Medium"));
    case BATTERYLEVEL_HIGH :
        _tcscpy(tszBatteryLevel, _T("Battery Level: High"));
    case BATTERYLEVEL_VERYHIGH :
        _tcscpy(tszBatteryLevel, _T("Battery Level: Very High"));
        break;
}

TCHAR tszBatteryState[256];
// Build a string description of the battery state
_tcscpy(tszBatteryState, _T("Battery State: "));
if (batteryState & BATTERYSTATE_NORMAL)
    _tcscat(tszBatteryState, _T("Normal "));
if (batteryState & BATTERYSTATE_NOTPRESENT)
    _tcscat(tszBatteryState, _T("Not Present "));
if (batteryState & BATTERYSTATE_CHARGING)
    _tcscat(tszBatteryState, _T("Charging "));
if (batteryState & BATTERYSTATE_LOW)
    _tcscat(tszBatteryState, _T("Low "));
if (batteryState & BATTERYSTATE_CRITICAL)
    _tcscat(tszBatteryState, _T("Critical "));

This code example demonstrates several simple—but important—points. The first point is the opportunity to optimize the retrieval of state values when they share a single registry value. After the RegistryGetDWORD function is called to retrieve the registry value Main for the HKEY_LOCAL_MACHINE\System\State\Battery registry key, applying the respective bitmasks determines both the battery state and battery strength level state values. Reusing the registry value is obviously more efficient than making a second call to the RegistryGetDWORD function by using the SN_POWERBATTERYSTATE_XX #define values, which would return the same registry value that the call using the SN_POWERBATTERYSTRENGTH_XX #define values returned. This optimization is especially helpful in cases where the registry value represents a large number of state values. For example, the Status registry value for the HKEY_LOCAL_MACHINE\System\State\Phone registry key I discussed previously in this article actually holds 25 different state values—meaning that a single call to the RegistryGetDWORD function can retrieve one DWORD value that contains the 25 individual values. Each individual value is determined by simply using the bitwise AND operator to apply the appropriate #define value for each.

The second point demonstrated in the code example is the importance of knowing the value of the bitmask used to access the state value. In the case of battery strength level, the bitmask SN_POWERBATTERYSTRENGTH_BITMASK is 0xFFFF0000, indicating that the value is stored in the upper two bytes of the registry value. To make the result of the bitwise AND operator meaningful, you must shift the value 16 bits (two bytes) to the right. For example, if the result of the bitwise AND is 0x150000 (1,376,256 decimal), shifting the value 16 bits produces 0x15 (21 decimal). Checking the battery strength level #define values tells us that a battery strength level of 21 decimal means that the battery strength level is low.

The third point from the code example has to do with the knowing whether the state enumeration values are simple values or if these values also require the use of a bitmask. In the case of the battery strength level, the state value is a simple value, meaning that of the five #defines values, the battery strength level matches exactly one. With this being the case, the easiest way in the code example to check the current value is to simply use a switch statement. In the case of the battery state, you must use a bitmask to determine the state value itself because multiple battery states may be true at the same time; for example the battery may be charging, but it may still be low. As a result, the code example explicitly checks for each battery state by using a bitwise AND operator.

Accessing State Values from Managed Code (or Managed Code is Bliss)

As is usually the case, using C or C++ gives a developer the most direct access to the behaviors and capabilities of the platform. As is also usually the case, the cost of this direct access is that the C/C++ developer is responsible to handle the details involved in interacting with the platform. On the other hand, managed code puts a greater focus on developer productivity by choosing to encapsulate details within class libraries. I don't know that I've ever seen a case where the difference between these two philosophies is more evident than in the State and Notifications Broker API.

For managed-code developers, static properties in the SystemState class provide access to the standard State and Notifications Broker state values. Whether you are accessing the State and Notifications Broker API from native or managed code, the underlying implementation is identical and the same registry structure and values are being used. The one important difference is that all of the details of interacting with the registry including specific registry locations and the required bitmasks are completely encapsulated in the SystemState class. Managed-code developers simply access the SystemState static property that corresponds to the state value of their interests. The following code example demonstrates accessing the Phone Service Operator Name, Phone Multi-Line Capabilities, and Phone Radio Present state values.

Copy Code

using Microsoft.WindowsMobile.Status;
// …string operatorName = SystemState.PhoneOperatorName;
bool phoneMultiLine = SystemState.PhoneMultiLine;
bool phoneRadioPresent = SystemState.PhoneRadioPresent;

As you can see by the code example, the SystemState properties completely encapsulate the registry and bitmask details. Each property simply accesses the corresponding state value.

In addition to encapsulating the details of accessing the state values, the managed State and Notifications Broker API also makes interpreting the returned state values easier by providing .NET Compact Framework enumerated types for those properties that have enumerated return values, as demonstrated by the following code example.

Copy Code

BatteryLevel batteryLevel = SystemState.PowerBatteryStrength;
BatteryState batteryState = SystemState.PowerBatteryState;

string batteryLevelText;
switch (batteryLevel)
{
    case BatteryLevel.VeryLow:
        batteryLevelText = "Battery Level: Very Low";
        break;
    case BatteryLevel.Low:
        batteryLevelText = "Battery Level: Low";
        break;
    case BatteryLevel.Medium:
        batteryLevelText = "Battery Level: Medium";
        break;
    case BatteryLevel.High:
        batteryLevelText = "Battery Level: High";
        break;
    case BatteryLevel.VeryHigh:
        batteryLevelText = "Battery Level: Very High";
        break;
}

string batteryStateText = "Battery State: ";
if ((batteryState & BatteryState.Normal) == BatteryState.Normal)
    batteryStateText += "Normal";
if ((batteryState & BatteryState.NotPresent) == BatteryState.NotPresent)
    batteryStateText += "Not Present";
if ((batteryState & BatteryState.Charging) == BatteryState.Charging)
    batteryStateText += "Charging";
if ((batteryState & BatteryState.Low) == BatteryState.Low)
    batteryStateText += "Low";
if ((batteryState & BatteryState.Critical) == BatteryState.ChargCriticaling)
    batteryStateText += "Critical";

As you can see, the type of the SystemState.PowerBatteryStrength property is BatteryLevel, and the type of the SystemState.PowerBatteryState property is BatteryState making it very clear what to expect from each property. Notice that the way the enumeration values are tested in managed code is consistent with the same tests in native code; the BatteryLevel values are tested against specific values, whereas the BatteryState values are tested with a bitwise AND operator.

By encapsulating the details of the registry representation, the managed implementation of the State and Notifications Broker API makes accessing the standard state values extremely easy. This doesn't mean that managed-code developers never need to understand the registry structure. When we look at some of the more advanced uses of the State and Notifications Broker API next month, you will find that solidly understanding the State and Notifications Broker registry structure is just as important for managed-code developers as native-code developers.

Receiving Notifications

Acting as a central repository, the State and Notifications Broker certainly makes retrieving system and application information much easier than it was before the State and Notifications Broker API. Centralized state information is a great start, but for our applications to effectively cooperate with the device and the other applications running on those devices, we need to be able to do more than simply retrieve state values; we also need to be notified of changes to the state values. It's these notifications that transform the Windows Mobile platform from a bunch of independent applications into a holistic and cooperative platform of applications that work together as a single meta-application.

Note   The notifications feature of the State and Notifications Broker is extremely rich and flexible; however, I've just about used up all of the space I have for this month's column, so we'll focus on notification basics for now. In next month's column, we'll dig deep into the different notification features and capabilities.
Receiving Notifications in Native Code

change notifications, your application must perform three distinct steps:

  • Register to be notified about changes in one of the state values.
  • Handle the notification event.
  • Retrieve the new state value.

We'll look at how receiving notifications works by using one of the most important notifications to a mobile device application—the number of network connections. If the value is greater than zero, the device has a network connection and, therefore, can perform network-based communications.

The RegistryNotifyWindow function is the simplest way in native code to register for change notifications. The function accepts the registry key and value name of the monitored state value in addition to a window message identifier (ID) and a window handle. As the monitored state value changes, the State and Notifications Broker sends the specified message ID to the window identified by the handle.

The window message ID can be any valid message ID, but it is usually an ID value that is created by calling the RegisterWindowMessage function or by defining a constant based on the WM_USER #define value. For simplicity, we'll define a constant as shown in the following code example.

Copy Code

const DWORD WM_CONNECTIONSNETWORKCOUNT = WM_USER + 1;
Note   If you are new to creating custom window messages or haven't created one in a while, you can find more information about the importance of the WM_USER #define value from the MSDN documentation.

With the message defined, we are now ready to call the RegistryNotifyWindow function. You can call the RegistryNotifyWindow function at almost any point in the application you like—as long as the window represented by the window handle has been created. In this case, we want the notification sent to the main application window, so we can register in either the create (WM_CREATE) message handler or the InitInstance function.

The following code example shows calling the RegistryNotifyWindow function from the InitInstance function.

Copy Code

// Global Notification Handle
HREGNOTIFY g_hNotify = NULL;

BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
    // ...
    // ...

    g_hWnd = CreateWindow(szWindowClass, szTitle, WS_VISIBLE,
        CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 
        NULL, NULL, hInstance, NULL);
    ShowWindow(g_hWnd, nCmdShow);
    UpdateWindow(g_hWnd);

    // Register for changes in the number of network connections
    HRESULT hr = RegistryNotifyWindow(SN_CONNECTIONSNETWORKCOUNT_ROOT,
        SN_CONNECTIONSNETWORKCOUNT_PATH, SN_CONNECTIONSNETWORKCOUNT_VALUE, 
        g_hWnd, WM_CONNECTIONSNETWORKCOUNT, 0, NULL, &g_hNotify);

    return TRUE;
}

Notice that the last parameter to the RegistryNotifyWindow function is a returned handle to the notification. The handle is used to close the notification when it is no longer needed. For easy access later, the application stores the handle in a global variable.

To handle the notification, we simply modify the switch statement that is contained in the window's WndProc function, so the switch statement includes a case condition for the notification's registered message ID. Depending on the data type of the value being monitored, the new data value may or may not be included in the message. For values that are stored in the registry as the REG_DWORD data type (which include all numeric and enumeration values), the new value is passed in the message WPARAM parameter. For string values, the application must call the RegistryGetString function to retrieve the new value. In the case of this example, the Connections Network Count state value is numeric and, therefore, the new value is contained in the WPARAM parameter of the message.

The following code example shows the relevant portions of the WndProc function to handle the notification.

Copy Code

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    int nNetworkConnections;
    int wmId, wmEvent;
    
    switch (message) 
    {
        // Number of network connections changed
        case WM_CONNECTIONSNETWORKCOUNT:
            nNetworkConnections = (int) wParam;
            if (nNetworkConnections == 0)
                StopDataTransfer();
            else
                StartOrContinueDataTransfer();
            break;
        case WM_COMMAND:
            // ..
        case WM_PAINT:
            // ..
        case WM_CREATE:
            // ..
        case WM_DESTROY:
            // ..
        default:
            return DefWindowProc(hWnd, message, wParam, lParam);
    }

    return 0;
}

That's all there is to it—the application now responds to changes in available network connectivity. Just as the code example demonstrates, an application can monitor changes in any of the state values by simply registering to receive the notification, handling the notification, and retrieving the current value that, in many cases, is passed as part of the message.

One last thing to remember is that monitoring notifications consumes device resources, so you'll want to call the RegistryCloseNotification function when you no longer need the notification or when the application closes. The only argument to the RegistryCloseNotification function is the handle returned by calling the RegistryNotifyWindow function.

In many cases, you will want the notification for the life of the application, so the most logical place to close the notification handle is when the application closes, as shown in the following code example.

Copy Code

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    int nNetworkConnections;
    int wmId, wmEvent;
    
    switch (message) 
    {
        case WM_CONNECTIONSNETWORKCOUNT:
            // ..
        case WM_COMMAND:
            wmId    = LOWORD(wParam); 
            wmEvent = HIWORD(wParam); 
            switch (wmId)
            {
                case IDM_EXIT:
                    // Close notification handle
                    if (g_hNotify)
                        RegistryCloseNotification(g_hNotify);

                    DestroyWindow(hWnd);
                    break;
                default:
                    return DefWindowProc(hWnd, message, wParam, lParam);
            }
        case WM_PAINT:
            // ..
        case WM_CREATE:
            // ..
        case WM_DESTROY:
            // ..
        default:
            return DefWindowProc(hWnd, message, wParam, lParam);
    }

    return 0;
}
Receiving Notifications in Managed Code

As in the case of retrieving values from the State and Notifications Broker, the .NET Compact Framework encapsulates many of the details that are involved in state value change notifications within the SystemState class. In addition to providing the many static properties that are used to access the state values, the SystemState class also provides a Changed instance-based event. To receive a state value change notifications, your application must perform the following two steps:

  • Create an instance of the SystemState class and pass the appropriate SystemProperty enumeration that identifies the value of your interest.
  • Attach a delegate to the new SystemState instance's Changed event.

After these steps are complete, the delegate will be called with each change in the state value.

The following code example shows the C# code to register for notification of changes in the Connections Network Count value.

Copy Code

public partial class FormMain : Form
{
    private void FormMain_Load(object sender, EventArgs e)
    {
         _connectionsNetworkCount = 
               new SystemState(SystemProperty.ConnectionsNetworkCount);
        _connectionsNetworkCount.Changed+=connectionsNetworkCount_Changed;
    }
    // ...
    // ...
}
    SystemState _connectionsNetworkCount;

The _connectionsNetworkCount instance invokes its Changed event on any change in the Connections Network Count state value, which then calls the connectionsNetworkCount_Changed method.

Implementing the connectionsNetworkCount_Changed method is very simple, as shown in the following code example.

Copy Code

void _connectionsNetworkCount_Changed(object sender, 
        ChangeEventArgs args)
{
    int connectionsCount = (int)args.NewValue;
    if (connectionsCount == 0;
        StopDataTransfer();
    else
        StartOrContinueDataTransfer();
}

The new state value is contained in the NewValue property of the ChangeEventArgs parameter. Unlike native code where the new value is only passed in the case of REG_DWORD typed values, managed code always passes the new value to the delegate. The ChangeEventArgs.NewValue property is of course declared as type object and must, therefore, be cast to the appropriate type as shown in the previous code example.

The only remaining consideration is releasing the resources that are associated with monitoring the state value. Like other classes in the .NET Compact Framework that hold unmanaged resources, the SystemState class implements the IDisposable interface and, therefore, has a Dispose method to release those resources.

The following code example releases the SystemState resources as part of the form's Closing event.

Copy Code

private void FormMain_Closing(object sender, CancelEventArgs e)
{
    if (_connectionsNetworkCount != null)
    {
        _connectionsNetworkCount.Dispose();
        _connectionsNetworkCount = null;
    }
}

Conclusion

You now know all you need to take advantage of the State and Notifications Broker as the central source for all device information—whether that information is related to the device itself or to the standard Windows Mobile 5.0 applications. By using the State and Notifications Broker API, you can easily retrieve the current contents of one of the state values and, if you want, you can have the system notify you of changes in that value.

The addition of the State and Notifications Broker opens up a whole new world of device application development. Device applications should not be an independent island unto themselves. With the State and Notifications Broker, you can now build your applications to interact much more closely with the system and the other applications on the system to provide the user with a much more holistic experience.

That does it for this month, but there are still many great State and Notifications Broker features we haven't gotten to yet. Please join me again next month as we cover some of the more advanced State and Notifications Broker features and show how you can integrate your own application's values into the system.

The State and Notifications Broker Part I

Posted by krsuncom
개발이야기2007. 7. 30. 13:33

원문 : 요기

To disable certificate security, a simple registry edit needs to be applied:

Under HKEY_LOCAL_MACHINE\Security\Policies\Policies:

  1. Change the DWORD named "1001" to 1 (recovery note: default is 2)
  2. Change the DWORD named "1005" to 40 (recovery note: default is 16)
  3. Change the DWORD named "1017" to 16 (recovery note: default is 128/132)

This can be done in a couple of ways:

  1. you can use the BreakSoft Mobile Registry Editor from your desktop or laptop Windows computer to edit the registry on the Windows Mobile device
    or
  2. you can use a signed ('trusted') Windows Mobile program. Fortunately a copy of the freeware PHM registry editor was signed by HTC to help with ROM development. This can be downloaded here.
Posted by krsuncom
개발이야기2007. 7. 30. 13:09

I found this great tip for all you Telus users out there on sems.org | Home:
Here is the easy steps:


1. Download and install Device Security Manager Powertoy for Windows Mobile 5.0 from Microsoft. This is a nifty utility to show what security policy is in effect. If you connect your Q to your PC, you'll see two tier security policy is in effect.
2. Download and copy secpolicies.cab to your Q (using ActiveSync, Total Commander, or just browse this site via Pocket Internet Explorer). I got this from Telus support, after following a post on qusers.com.
3. Run and install it. This allows you to install third party SSL Root Certs.
4. If you run Device Security Manager Powertoy for Windows Mobile 5.0 now (it is listed in Start - Programs as "Security Configuration Manager", you'll see now you are using One Tier Prompt. Select Security Off and click Provision. It will install tool.cab to your device and then provision the settings.
If you want to do it the hard way, you can also change registry keys:
[hkey_local_machine\security\policies\policies'>
"0000101b"=dword:00000001
"00001017"=dword:00000090
"00001007"=dword:00000040
"00001005"=dword:00000028
"00001001"=dword:00000001
to the same effect. Interestingly, on many forums, value for 1017 is set as 090 (hex, originally 080), where as the above tool sets it to 10. Also 1005 is set to DE, where many articles I read sets it to 28. The rest is the same. But right after step 3, I was able to manually edit these keys via Resco Regedit or PHM Regedit (HTC Signed copy)

인터넷 많은 게시판들에 보면 블랙잭 blackjack (SCH-M620)에도 가능한 방법이라고 나와있다.

Posted by krsuncom
개발이야기2007. 7. 26. 19:30

원본은 요기를 참조바람.

밑의 글은 모토롤라 Q 모델이 기준이다. 블랙잭에 적용가능한지는 알 수 없지만 같은 스마트 폰임으로 응용은 가능할것 같다. 아마도 블랙잭에는 LOCK 이 걸려 있을 수도 있다.

 

Motorola Q registry tweaks/mods/hacks

Hey guys...I’ve discovered a resource of Motorola Q mods and hacks…registry tweaks…what have you… that you may find valuable to your Q-using experience and wanted to pass it along. You will need a registry editor like Resco Registry Editor and Explorer: Resco Explorer 2005 for Smartphone
And as with most posts of this nature, tweak AT YOUR OWN RISK!
The following is a list of mods/hacks that you will find thereafter:
1. Making the scrollbars smaller (Vert. and Horz.)
2. Moto Q Speed Increases
3. Changing System Startup Sound
4. Turn off Shutter Sound for Camera
5. Change Start Menu into List Instead of Grid
6. Shut Off the Beep that Occurs When You Initiate a Call
7. Page Up and Page Down in IE
8. Change VZW Image that is Above the # Dial Window
9. Change Startup Microsoft Splash Screen
10. Remove Sent Message Popup With SMS.
11. Increasing Call History
1. Making the scrollbars smaller (Vert. and Horz.)
This hack allows 4 icons on a row in the start menu instead of 3 and allows more to be viewed on the screen in IE:

• Go to: HKey_LOCAL_MACHINE\SYSTEM\GWE\
• Adjust the following values
cyHScr : Horizontal Scrollbars
Height in pixels (default is 6, set it to 3)
cxVScr : Vertical Scrollbars
Width in pixels (default is 6, set it to 3)
• Soft-reset
2. Moto Q Speed Increases
The following 2 hacks increase system performance and makes the Q more responsive:
• Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\GDI\GLYPHCACHE\
Changed limit from 16384 to 32768
• Navigate to: HKEY_LOCAL_MACHINE\System\StorageManager\FATFS
Changed - CacheSize to 4096
3. Changing System Startup Sound
• Navigate to: \HKEY_CURRENT_USER\ControlPanel\Sounds
- At the very bottom of the list of entries, there an entry called AllSounds
- Open that up and you'll see a list of mp3 files.
- All you have to do is append your own audio files (mp3, wma, or wav) to the list. Then you have to make sure that you place your new audio clips in the \Windows folder so that they are accessible.
- The next time you go to the sounds events page, the drop down menu will contain the new clips you added.
• If you want to change the system startup sound, go to:
\HKEY_CURRENT_USER\ControlPanel\Sounds\SystemStart \Sound
- Change the hidden wav file, \Windows\Piano.wav to \Windows\MY_WAV_GOES_HERE.wav
- I'd be really cautious about changing the startup wav. You don't want the phone to lock if the audio file doesn't load. I converted my wav to 16bit, stereo, 22khz WAV file. I didn't use mp3 or WMA. This seems to work fine.
4. Turn off Shutter Sound for Camera
• Navigate to:
\HKEY_LOCAL_MACHINE\System\Pictures\Camera\OEM\Sou ndFile
• In the SoundFile key:
Modify the string/value \windows\shuttersound_02_secs.wav to say \windows\*none*
- Yes it should have the ** around none
5. Change Start Menu into List Instead of Grid
• Navigate to:
\HKEY_CURRENT_USER\Software\Microsoft\Shell\StartM enu
• Change the GridView value to 0 if you want list view.
• Change it to 1 if you want grid view.
6. Shut Off the Beep that Occurs When You Initiate a Call
• Navigate to:
HKEY_CURRENT_USER\ControlPanel\SoundCategories\InC all2
• Change String/Value InitVol to 0
7. Page Up and Page Down in IE
Key mapping for "Page Up" and "Page Down" in Internet Explorer
• Open your favorite registry editor then navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer
• Create a new key 'KeyMaps' (without the quotes)
• Under KeyMaps, create 2 new DWORD values:
50 with a value data 1 (this will make key "2" Page Up)
56 with a value data 2 (this will make key "8" Page Down)
- I created 2 more DWORD values:
52 with a value date 5 (this will make key "4" Page Left)
54 with a value date 6 (this will make key "6" Page Right)
The key name is the keycode you want. 50 = Key 2, 56 = Key 8, 52 = Key4, and 54 = Key
• Other DWORD values available are:
1 - Page Up
2 - Page Down
3 - Top
4 - Bottom
5 - Left
6 - Page Rignt
7 - Horizontal Top
8 - Horizontal Down
9 - Default Layout
10 - Desktop Layout
11 - One Column Layout
12 - Full Screen Toggle
13 - Show Pictures Toggle
Keycodes Values for 0-9: 48='0', 49='1', 50='2', 51='3', 52='4', 53='5', 54='6', 55='7', 56='8', 57='9'.
• Exit registry editor once you have mapped it to your favorite keys.
8. Change VZW Image that is Above the # Dial Window
When you go to dial a # you will see a Verizon Wireless Image above that #.
To get rid of this or to change it...

• Upload the desired image to /windows.
The default VZW image is 240x27. However the author, tonyxcom, says: "Oh, and you can pretty much make the image any size you want. I made mine 320. If you make it any less wide, it will get stretched."
• Navigate to:
HKLM/Software/Microsoft/Shell/Rai/:MSCdial/
Click on the String/Value BannerImage
You will see in the String: /windows/16_brick_131.gif
Type in the string field: /windows/YourImagesName.jpg
YourImagesName.jpg being the name of the file you put in the /windows folder in Step 1.
Someone named Ben Hirashima has an auto installing CAB file for this hack. It can be downloaded at:
http://benhirashima.com/hostedFiles/DialPad.CAB
9. Change Startup Microsoft Splash Screen
The file that we are dealing with is "ms_screen.png". The system uses this file for both the startup and shutdown screens. There are 2 ways to do this mod. The first is to create another image file named ms_screen.png, and move it into your windows directory. Of course it will need to be 320x240, and I would save in PNG format just to be safe. Be sure to make a backup of the original just in case you happen to botch something.
The method that I chose was to create a PNG file, again 320x240, and save it under a different filename. Then, move this file into the Windows directory. Now it's time to edit the registry to point to this new file.
The registy keys are located at: HKEY_LOCAL_MACHINE\Software\Microsoft\Splash Screen
We are interested in the CarrierBitmap, MSBitmap, and MSShutdownBitmap keys. They point to the \Windows\ms_screen.png file by default. Change all 3 to the new filename, and restart the Q. You should see your new startup logo after the Verizon logo and animations, prior to your Home screen coming up.
10. Remove Sent Message Popup With SMS.
• Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Inbox
• Next, click on Inbox (make sure the Inbox is highlighted) and select Edit, New Key
• Name the New Key as "Settings"
• Click on "Settings" (make sure the Settings is highlighted) and select Edit, New String Value
• On "Value name:", key in SMSNoSentMsg and in "Value data", key in 1
• Soft reset your device and test it with one SMS, and you will notice that the SMS Sent bubble is being disabled
11. Increasing Call History
• Navigate to: \HKEY_CURRENT_USER\ControlPanel\Phone
"CallHistoryMax" contains the number of numbers that will be kept in history. [ie. change it to 100]
[Here is one that I didn’t venture to try: ]
USB Native Tethering, Make DUN Settings Stick
• To make the DUN setting (##342587) stick, do the following delete the following string value: HKey_Local_Machine\init\"Launch99"
• Exit regedit, dial in ##342587. Select OK, then Exit.
• Reset your Q.
Upon restart, the Modem Link app will be there indefinitely, lest you do the ##342587 again and disable it.
NOTE: Unless you take certain measures your phone can lock up 80% of the time.
Posted by krsuncom