Re: Kernel mode programming in VC++
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Thu, 06 Jul 2006 12:31:52 -0400
Forget it. This is not possible. There is no "easy solution" of the kind you are hoping
for. You will need to write a device driver, which has to be written in pure C, and which
follows complex rules unrelated to what applications do. You will have to rewrite your
code to open the device driver.
Note that you can't "encapsulate the code" as you think you might be able to; a device
driver follows a massive number of very specific and critical rules and you can't just
throw code at it.
By the way, a device driver does not issue IN and OUT instructions either; it calls the
Hal functions READ_PORT_xxx and WRITE_PORT_xxx where xxx is UCHAR, USHORT, or ULONG.
joe
On Thu, 6 Jul 2006 20:34:41 +0530, "Arun" <arunkumar.v2@xxxxxxxxxxxx> wrote:
Hello Experts,Joseph M. Newcomer [MVP]
I have an asm routine which uses privileged instructions like in, out,
cli, etc., I need to execute this as a Win32 application under VC++.
Since the instructions are privileged, I can't execute the same under User
mode as a normal Win32 application, so I have to execute this routine in
kernel mode.
One solution is to encapsulte the routine as a Device driver for Windows &
call the same from the application, but, I am looking out for a easy
solution. Please help...
Thank you.
Regards,
Arun
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: Kernel mode programming in VC++
- From: Arun
- Re: Kernel mode programming in VC++
- References:
- Kernel mode programming in VC++
- From: Arun
- Kernel mode programming in VC++
- Prev by Date: Re: Kernel mode programming in VC++
- Next by Date: Re: Dynamic Control Creation
- Previous by thread: Re: Kernel mode programming in VC++
- Next by thread: Re: Kernel mode programming in VC++
- Index(es):
Relevant Pages
|