PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework .NET CF & Hardreset - still not possible?

Reply

.NET CF & Hardreset - still not possible?

 
Thread Tools Rate Thread
Old 12-04-2008, 11:45 PM   #1
Rampf
Guest
 
Posts: n/a
Default .NET CF & Hardreset - still not possible?


Hello

Is it really not possible to perform a hardreset with newer devices using
..NET CF?

Thanks

Rampf

  Reply With Quote
Old 13-04-2008, 01:10 AM   #2
Chris Tacke, eMVP
Guest
 
Posts: n/a
Default Re: .NET CF & Hardreset - still not possible?

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" <rampf@rampf.com> wrote in message
news:ueO2z7OnIHA.4664@TK2MSFTNGP06.phx.gbl...
> Hello
>
> Is it really not possible to perform a hardreset with newer devices using
> .NET CF?
>
> Thanks
>
> Rampf



  Reply With Quote
Old 13-04-2008, 08:20 AM   #3
Rampf
Guest
 
Posts: n/a
Default Re: .NET CF & Hardreset - still not possible?

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 Newsbeitrag
news:%23CVVUrPnIHA.3780@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" <rampf@rampf.com> wrote in message
> news:ueO2z7OnIHA.4664@TK2MSFTNGP06.phx.gbl...
>> Hello
>>
>> Is it really not possible to perform a hardreset with newer devices using
>> .NET CF?
>>
>> Thanks
>>
>> Rampf

>
>


  Reply With Quote
Old 13-04-2008, 04:44 PM   #4
gupta25
Guest
 
Posts: n/a
Default Re: .NET CF & Hardreset - still not possible?

On Apr 13, 12:20*am, "Rampf" <ra...@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@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...@rampf.com> wrote in message
> >news:ueO2z7OnIHA.4664@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);

  Reply With Quote
Old 14-04-2008, 08:55 AM   #5
Christian Resma Helle
Guest
 
Posts: n/a
Default Re: .NET CF & Hardreset - still not possible?

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@gmail.com> wrote in message
news:66793b5d-66d9-4ad2-9995-b11a8c1014bb@z24g2000prf.googlegroups.com...
On Apr 13, 12:20 am, "Rampf" <ra...@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@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...@rampf.com> wrote in message
> >news:ueO2z7OnIHA.4664@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);

  Reply With Quote
Old 14-04-2008, 11:54 AM   #6
Simon Hart [MVP]
Guest
 
Posts: n/a
Default Re: .NET CF & Hardreset - still not possible?

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@gmail.com> wrote in message
> news:66793b5d-66d9-4ad2-9995-b11a8c1014bb@z24g2000prf.googlegroups.com...
> On Apr 13, 12:20 am, "Rampf" <ra...@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@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...@rampf.com> wrote in message
> > >news:ueO2z7OnIHA.4664@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);
>

  Reply With Quote
Old 14-04-2008, 12:43 PM   #7
Christian Resma Helle
Guest
 
Posts: n/a
Default Re: .NET CF & Hardreset - still not possible?

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@yahoo.com> wrote in message
news:AD3400FD-33CC-4F9A-8A6C-0FFF163101DC@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@gmail.com> wrote in message
>> news:66793b5d-66d9-4ad2-9995-b11a8c1014bb@z24g2000prf.googlegroups.com...
>> On Apr 13, 12:20 am, "Rampf" <ra...@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@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...@rampf.com> wrote in message
>> > >news:ueO2z7OnIHA.4664@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);
>>


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off