Click here to Skip to main content
Click here to Skip to main content

Enable floating SIP control in IPAQ/Windows CE .NET

, 10 Dec 2002
Rate this:
Please Sign up or sign in to vote.
Enable floating SIP control in iPAQ/Windows CE .NET devices.

Introduction

This article give you the tips on how to have a floating SIP control in your Pocket PC/Windows CE .NET device. At the same time, you have learn on how to do a soft reset (without pressing any button) on your device.

Background

You need to have some basic idea on how to access the registry as well as changing the respective value. The key value in this article is changing the registry value in order to create a floating SIP control.

Using the code

To implement this is quite simple, all you need is to include the soft reset API declare from winioctl.h as shown below, so that you can call the reset function right after changing the registry value.

// FOR SOFT RESET USED ONLY
// ------------------------------------------------------------
#include <winioctl.h>
#define IOCTL_HAL_REBOOT CTL_CODE(FILE_DEVICE_HAL, 15, 
                            METHOD_BUFFERED, FILE_ANY_ACCESS)

extern "C" __declspec(dllimport) BOOL KernelIoControl(
    DWORD dwIoControlCode, 
    LPVOID lpInBuf, 
    DWORD nInBufSize, 
    LPVOID lpOutBuf, 
    DWORD nOutBufSize, 
    LPDWORD lpBytesReturned);
// ------------------------------------------------------------

Once you have declared the above API, then you are free to execute the declare function as the code show below:

// Soft reset the device
KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL);

Next is the registry location for SIP style where the OS reference to. This will be the key value before the OS proceeds to create the SIP control. Therefore, the SIP style is controlled by the following registry key:

HKEY_CURRENT_USER\ControlPanel\Sip\DragStyle
  • DragStyle = 0, means the SIP is non-movable.
  • DragStyle = 1, means the SIP is movable.

I have simplified the registry access by putting all the messy code into the few functions defined under the RegEdit.h and RegEdit.cpp. Hence, all you need is to call the SaveDWORD with the correct value when you tend to switch from non-movable to movable SIP control or vice-versa.

// Enable the movable SIP control
SaveDWORD(HKEY_CURRENT_USER, TEXT("ControlPanel\\Sip"), 
                                   TEXT("DragStyle"), 1);

// Disable the movable SIP control
SaveDWORD(HKEY_CURRENT_USER, TEXT("ControlPanel\\Sip"), 
                                   TEXT("DragStyle"), 0);

A soft reset is required for the changes made to take effect. Hence, after the above code is executed, the device is going to reset with the discuss reset function.

Points of interest

Feel free to explorer more on the Pocket PC registry setting and you will get more fun with it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

CT CHANG
Web Developer
Malaysia Malaysia
Hackzai was graduated from Double-E, and being certified as MCSD (VS6) at spring 2003. But move forward with ASP.NET, VB.NET, C#, Silverlight, LINQ, XML

Comments and Discussions

 
Generalsip sdk solution Pinmemberdan rogy7-Oct-10 4:19 
General[Message Deleted] Pinmemberit.ragester28-Mar-09 5:32 
Questionproblem in porting wince to smdk 2410 board. Pinmemberamiya das30-Mar-08 21:09 
QuestionHow can I disable the SIP in the Telnet client PinmemberFrank C29-Nov-07 8:55 
QuestionHow to disable the SIP? PinmemberLord Sy3-Jan-07 9:54 
QuestionIsn't it much easier... PinmemberFernando A. Gómez F.24-Jul-06 10:53 
GeneralSIP problem PinsussMarten7526-Sep-05 6:41 
Maybe you, experts, can help me! When I press the little arrow next to the SIP icon I normally got three or four choices, like letter reconition and keyboard, but now I get a list of about 50 items, starting with: Active Data Object Connection, then: Active Data Object Recordset, Airsync and much more. The original items are still there but hard to find.
Can I reset the settings for the SIP somewhere in the registry? I really don't want to re-install all my programs. Please help! Thank you! Marten from The Netherlands
GeneralIs SIP standard in WinCE.NET 4.2 Pinsusslinhjob22-Sep-05 7:09 
GeneralProblem displaying Floating SIP correctly PinsussAnonymous3-Aug-05 20:57 
GeneralNetwork PinmemberSMPCHRIS20-Apr-04 21:19 
Generalunresolved external symbol _SipShowIM Pinmemberkarpavel12-Dec-03 20:00 
GeneralRe: unresolved external symbol _SipShowIM PinmemberK-PAX25-Dec-03 0:29 
GeneralRe: unresolved external symbol _SipShowIM PinsussAnonymous25-Dec-03 20:46 
GeneralI have resolved this problem Pinmemberkarpavel25-Dec-03 21:13 
GeneralCool PinmemberConor O'Doherty18-Jul-03 1:59 
QuestionWhat? PinmemberJohn Burton11-Dec-02 0:59 
AnswerRe: What? PinmemberJared Bienz11-Dec-02 4:26 
GeneralRe: What? PinmemberK-PAX11-Dec-02 5:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 11 Dec 2002
Article Copyright 2002 by CT CHANG
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid