Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IOCTL_HAL_REBOOT in CE 6.0

223 views
Skip to first unread message

Rick

unread,
May 21, 2008, 6:43:01 AM5/21/08
to
Hi,
I try to call KernelIoControl(IOCTL_HAL_REBOOT.....) by application in
WinCE6.0 environment, but it failed. However this reboot function works well
in WinCE5.0 before. In driver layer (kernel mode) of CE6.0, driver can use
this reboot code.
It looks the application in user mode cannot call this kind APIs. How to
make application enter kernel mode ? Or, any other reboot API provided for
application development.

Thanks
Rick

Chris Tacke, eMVP

unread,
May 21, 2008, 11:09:12 AM5/21/08
to
It has nothing to do with CE 5.0 versus CE 6.0 - it has everything to do
with how your OEM implemented the IOCTL. Ask the OEM how to reboot their
system. They had to add the proper code to the kernel (in both 5.0 and 6.0)
for it to work.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"Rick" <Ri...@discussions.microsoft.com> wrote in message
news:2D228A7E-ECA7-4217...@microsoft.com...

Bruce Eitman [eMVP]

unread,
May 21, 2008, 12:00:59 PM5/21/08
to
Chris, you are sort of correct. But the default behavior in CE 6.0 is to
not allow user mode calls to certain OEMIoControl IOCTLS, including this
one. The OP should review the documentation for OEMIoControl to see which
IOCTLS are supported. The OEM can modify this behavior by implementing
OEMIoControl in a different way.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

"Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com> wrote in message
news:u5lMeS1u...@TK2MSFTNGP06.phx.gbl...

Chris Tacke, eMVP

unread,
May 21, 2008, 12:08:37 PM5/21/08
to
Yep, I just didn't detail my response.

In CE 5.0 the OEM has to implement the IOCTL.

In 6.0, they have to do that plus add the IOCTL to the list of those allowed
to be called from an app.

In both cases I'd still stick with my original statement that "it has
everything to do with how your OEM implemented the IOCTL" as I consider
exposing the IOCTL as part of implementation. The OEM may have exposed a
completely separate API (like WinMo does now) so the IOCTL might not be the
right route at all. So the advice of "Ask the OEM how to reboot their
system." would still stand.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

"Bruce Eitman [eMVP]" <bruce.eit...@EuroTech.com.nospam> wrote in
message news:uLr4av1u...@TK2MSFTNGP02.phx.gbl...

Bruce Eitman [eMVP]

unread,
May 21, 2008, 12:39:40 PM5/21/08
to
Okay, I will give you that :-)

I just didn't want anyone to think that the existance of the IOCTL in the
OAL meant that user mode code could actually access them. This question,
possibly with different IOCTLS, comes up too often. In fact by searching
the WindowsCE newsgroups for this thread's topic reveals the answer to the
question.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

"Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com> wrote in message

news:urJjjz1u...@TK2MSFTNGP06.phx.gbl...

Rick

unread,
May 22, 2008, 6:35:01 AM5/22/08
to
I add IOCTL_HAL_REBOOT to ioctl support list of image, then this issue is
solved. Modified dll is oalioctl.dll, code is under
\WINCE600\PUBLIC\COMMON\OAL\OALIOCTL

thank you

Steve Araiza

unread,
Jun 8, 2008, 7:10:08 PM6/8/08
to
If you don't want to modify the public code (and then have to start checking
that in to source control), you can call

SetSystemPowerState(NULL, POWER_STATE_RESET, 0);

assuming you have power management in your OS. This will cause pm.dll to
call the KernelIoControl reset IOCTL. At least it does on my WinCE 6.0
platform, and had not modified pm.dll to do so.

steve araiza

0 new messages