Monday, July 9, 2007

Dealing with OAL IoControls

I found a good reference article on the differences between Windows CE 5.0 and Windows CE 6.0. One of the paragraph is linked to the KernelIoControl call restrictions under Windows CE 6.0.

So I give you more details about it.
On the previous version of Windows CE, user mode code could use any valid OAL IoControl code when calling KernelIoControl. But it's not the case under Windows CE 6.0, as it provides security enhancement, now you can only call IoControls listed in a callable OAL IoControl code list. This list is predefined and limited to a small subset of all IoControls code supported by the OAL. This list can be extended by modifying a Dll provided as public code in public\common\oak\oalioctl folder of Windows CE 6.0. Its main purpose is to intercept all OEMIoctl calls coming from user mode before they are routed to OAL code.
So your application might generate a failure if you are trying to call one of the OAL IoControl that is not listed. In your BSP, if you want user to be able to use those IoControls, you will have to explicitly add them to the list.
For example, under Windows CE 6.0 calling IOCTL_HAL_REBOOT in your application might failed until this code is added to the list by the OEM.
The default OAL IoControl callable codes is limited to the same list that would have been callable by un-trusted applications in Windows Mobile :

- Nicolas

No comments: