implement Clean Boot on WM5

  • Thread starter Thread starter Guest
  • Start date Start date
You don't implement IOCTL_HAL_QUERY_FORMAT_PARTITION, the OEM does. If it
is implemented, then you can call it from an papplication (provided you have
the privilege to do so. A huge warning on this though - if the OS itself is
on a partition visible to the FSD, then you could easily format the wrong
partition a completely destroy the device. I highly recommend a full ROM
image backup before even thinking about trying this.


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--
 
How the OEM implement IOCTL_HAL_QUERY_FORMAT_PARTITION? I should change a
value in a registry and after a reboot i can call
IOCTL_HAL_QUERY_FORMAT_PARTITION from my application?

Thanks
 
The OEM would have to put in their OEMIoControl routine support for the
IOCTL_HAL_QUERY_FORMAT_PARTITION constant. You can't do it afterward, so if
it's not there, you have no recourse. If it is there, you can call it
through a P/Invoke to KernelIoControl. The registry has nothing to do with
it.
 
It's not in any library, you have to find it in the CE headers.

from pkfuncs.h, line 404:

#define IOCTL_HAL_QUERY_FORMAT_PARTITION CTL_CODE(FILE_DEVICE_HAL,
70, METHOD_BUFFERED, FILE_ANY_ACCESS)

I'll let you find the others.
 
Hallo, i have a problem....i don't find pkfuncs.h, why?

I have installed WM5 Pocket PC and Smartphone SDK...but i don't find
pkfuncs.h.
 
pkfuncs is in the Platform Builder folders. If you do much P/Invoke work,
it's worth getting the evaluation version of PB so you have these files.

Still, in this case you probably don't need it. I just GREPed the WM 5.0
SDK folder's Includes subfolder for CTL_CODE an it finds this at lines 26
and 27 of winioctl.h

#define CTL_CODE( DeviceType, Function, Method, Access ) ( \
((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \

Again, I'll leave it to you to find the remaining items.
 
Back
Top