This site is no longer active and is available for archival purposes only. Registration and login is disabled.

How to switch to kernel mode?


How to switch to kernel mode?

Postby drgoldie » Aug 15, 2007 @ 9:15am

I need to switch my application to kernel mode.
The docs say that this can be done using SetKMode() but that function is not available in the WM5 SDK.

Any ideas?

thanks,
Daniel
drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Postby Kzinti » Aug 15, 2007 @ 4:08pm

Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby drgoldie » Aug 16, 2007 @ 11:00am

Thanks a lot Thierry. The method is obvious, works and I should have guessed it myself.

Now another question: Is there a better way to find out if switching to kernel mode worked than switching back and checking the return value of SetKMode?

Daniel
drgoldie
pm Member
 
Posts: 330
Joined: Jan 10, 2003 @ 10:46am
Location: Vienna


Postby Kzinti » Aug 16, 2007 @ 4:09pm

I don't know of any way. I always surround my kernel mode code with a __try / __catch pair, just in case.

Even if SetKMode() succeeds, I've run into cases where the opcodes I was executing were not supported by a given CPU.
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum