From: Simon Hart [MVP] on
No need to platform invoke DMProcessConfigXML from WM5 and onwards as its
supported with this method:
Microsoft.WindowsMobile.Configuration.ConfigurationManager.ProcessConfiguration()
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"Christian Resma Helle" wrote:

> As Chris said, the OEM has provide capability to do it. SetCleanRebootFlag()
> will work in the emulator but not in most devices (especially device running
> WM5)
>
> In Windows Mobile 6 you can use the RemoteWipe CSP. P/Invoke
> DMProcessConfigXML from aygshell.dll and pass this:
>
> <wap-provisioningdoc>
> <characteristic type="RemoteWipe">
> <parm name="doWipe" value="1"/>
> </characteristic>
> </wap-provisioningdoc>
>
> as the XML configuration data. If the app is trusted then the device will
> immediately do a cold reboot after executing the command.
>
> Here's an MSDN link to DMProcessConfigXML
> http://msdn2.microsoft.com/en-us/library/ms852998.aspx
>
>
> --
> Regards,
> Christian Resma Helle
> http://christian-helle.blogspot.com
>
>
> "gupta25" <gupta25(a)gmail.com> wrote in message
> news:66793b5d-66d9-4ad2-9995-b11a8c1014bb(a)z24g2000prf.googlegroups.com...
> On Apr 13, 12:20 am, "Rampf" <ra...(a)rampf.com> wrote:
> > Thanks Chris
> >
> > It would be a security feature for our devices to remotly wipe the
> > device...
> >
> > "Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com> schrieb im
> > Newsbeitragnews:%23CVVUrPnIHA.3780(a)TK2MSFTNGP06.phx.gbl...
> >
> >
> >
> > > Has nothing to do with CF or native code. If the OEM provides a
> > > capability to do it, then you can. If they don't you can't. Can't see
> > > really any good reason for an application to ever hard reset - that
> > > would
> > > effectively erase the application itself - unless you're in ROM, and in
> > > that case you're probably the OEM and you'd have a hook to do the hard
> > > reset anyway.
> >
> > > --
> >
> > > Chris Tacke, Embedded MVP
> > > OpenNETCF Consulting
> > > Giving back to the embedded community
> > >http://community.OpenNETCF.com
> >
> > > "Rampf" <ra...(a)rampf.com> wrote in message
> > >news:ueO2z7OnIHA.4664(a)TK2MSFTNGP06.phx.gbl...
> > >> Hello
> >
> > >> Is it really not possible to perform a hardreset with newer devices
> > >> using
> > >> .NET CF?
> >
> > >> Thanks
> >
> > >> Rampf- Hide quoted text -
> >
> > - Show quoted text -
>
> You'll have to speak to your device manufaturer on which you are
> supporting your application to provide you API to hard reset the
> phone. There is a way to do it but i think this won't work on all the
> devices.
>
> try following if it helps you.
>
> SetCleanRebootFlag();
> KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL);
>
From: Christian Resma Helle on
Thanks Simon! I never knew it was part of the Managed Windows Mobile SDK :)

--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com


"Simon Hart [MVP]" <srhartone(a)yahoo.com> wrote in message
news:AD3400FD-33CC-4F9A-8A6C-0FFF163101DC(a)microsoft.com...
> No need to platform invoke DMProcessConfigXML from WM5 and onwards as its
> supported with this method:
> Microsoft.WindowsMobile.Configuration.ConfigurationManager.ProcessConfiguration()
> --
> Simon Hart
> Visual Developer - Device Application Development MVP
> http://simonrhart.blogspot.com
>
>
> "Christian Resma Helle" wrote:
>
>> As Chris said, the OEM has provide capability to do it.
>> SetCleanRebootFlag()
>> will work in the emulator but not in most devices (especially device
>> running
>> WM5)
>>
>> In Windows Mobile 6 you can use the RemoteWipe CSP. P/Invoke
>> DMProcessConfigXML from aygshell.dll and pass this:
>>
>> <wap-provisioningdoc>
>> <characteristic type="RemoteWipe">
>> <parm name="doWipe" value="1"/>
>> </characteristic>
>> </wap-provisioningdoc>
>>
>> as the XML configuration data. If the app is trusted then the device will
>> immediately do a cold reboot after executing the command.
>>
>> Here's an MSDN link to DMProcessConfigXML
>> http://msdn2.microsoft.com/en-us/library/ms852998.aspx
>>
>>
>> --
>> Regards,
>> Christian Resma Helle
>> http://christian-helle.blogspot.com
>>
>>
>> "gupta25" <gupta25(a)gmail.com> wrote in message
>> news:66793b5d-66d9-4ad2-9995-b11a8c1014bb(a)z24g2000prf.googlegroups.com...
>> On Apr 13, 12:20 am, "Rampf" <ra...(a)rampf.com> wrote:
>> > Thanks Chris
>> >
>> > It would be a security feature for our devices to remotly wipe the
>> > device...
>> >
>> > "Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com> schrieb im
>> > Newsbeitragnews:%23CVVUrPnIHA.3780(a)TK2MSFTNGP06.phx.gbl...
>> >
>> >
>> >
>> > > Has nothing to do with CF or native code. If the OEM provides a
>> > > capability to do it, then you can. If they don't you can't. Can't see
>> > > really any good reason for an application to ever hard reset - that
>> > > would
>> > > effectively erase the application itself - unless you're in ROM, and
>> > > in
>> > > that case you're probably the OEM and you'd have a hook to do the
>> > > hard
>> > > reset anyway.
>> >
>> > > --
>> >
>> > > Chris Tacke, Embedded MVP
>> > > OpenNETCF Consulting
>> > > Giving back to the embedded community
>> > >http://community.OpenNETCF.com
>> >
>> > > "Rampf" <ra...(a)rampf.com> wrote in message
>> > >news:ueO2z7OnIHA.4664(a)TK2MSFTNGP06.phx.gbl...
>> > >> Hello
>> >
>> > >> Is it really not possible to perform a hardreset with newer devices
>> > >> using
>> > >> .NET CF?
>> >
>> > >> Thanks
>> >
>> > >> Rampf- Hide quoted text -
>> >
>> > - Show quoted text -
>>
>> You'll have to speak to your device manufaturer on which you are
>> supporting your application to provide you API to hard reset the
>> phone. There is a way to do it but i think this won't work on all the
>> devices.
>>
>> try following if it helps you.
>>
>> SetCleanRebootFlag();
>> KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL);
>>