From: Sajeev.S [sajeev@amiindia.co.in]
Sent: Thursday, February 10, 2000 8:00 AM
To: Venkatesh Ramamurthy; Sajeev.S; 'Anton S. Yemelyanov';
ntdev@atria.com
Subject: RE: [ntdev] Interfacing Kernel Mode Drivers with User Mode Apps

Yes Venkatesh,  APC doesn't execute a user mode thread, but it can be
used to execute in the context of a particular thread. See
July99nerd.zip in MSDN. But note that,  APC's can execute in both user &
kernel mode.

Also a undocumented service KeAttachProcess() allows a kernel-mode
driver to attach to a user mode process and execute in the context of
that process. See Nagar's Windows NT File System Internals.


	-----Original Message-----
	From:	Venkatesh Ramamurthy [SMTP:Venkateshr@ami.com]
	Sent:	Wednesday, February 09, 2000 9:00 PM
	To:	'Sajeev.S'; 'Anton S. Yemelyanov'; ntdev@atria.com
	Subject:	RE: [ntdev] Interfacing Kernel Mode Drivers with
User Mode Apps

	APC execute in context of User Process Space, as such it doesnt
execute USer
	Mode thread. It works only in kernel mode , but user address
space is one
	that ur application calls.

	See pointers appended to original text below.

	Venkatesh
	Sajeev Wrote

	Yes, Kernel mode Driver can execute a user mode thread using
	Asynchronous Procedure Calls. Use DeviceIoControl in ur Appln.
to
	communicate with the Driver and use User or Kernel APC to call
ur Appln.
	from Driver. 

	HTH,
	Sajeev.

		-----Original Message-----
		From:	Anton S. Yemelyanov [SMTP:asy@GenesisFX.com]
		Sent:	Wednesday, February 09, 2000 8:21 AM
		To:	ntdev@atria.com
		Subject:	[ntdev] Interfacing Kernel Mode Drivers
with
	User Mode Apps

		I am rather new to kernel mode driver development so
forgive me
	if the answer to my question might be somewhat obvious...
		 
		I am looking for an efficient way of communication
between a
	kernel mode driver and a user mode application.  I am aware of
the
	shared memory approach, however I was wondering if it is
possible to
	have a kernel mode driver switch to user mode / user process
context and
	execute functions within this context.


	>> Execute User Space function or execute Kernel function with
the ctx of
	User Address Space

		 
		A friend of mine suggested to explore usage of COM to
interface
	a user mode application with a Kernel mode driver. However I
have never
	seen this (although I am told that DirectX is exactly that). Is
	something like this possible to accomplish?
		 
		To expand on the problem: I am designing a kernel mode
driver
	which has to use a user mode application to perform most of it's
	functionality and this application in turn has to use
functionality of
	the driver.
		 
	>> There is a paper in research.microsoft.com that tells u how
to write a
	User mode driver, i am not sure how it is going to help u in
this case, but
	it is worth looking.

		I would appreciate any pointers and comments.
		 
		Thanks,
		 
		Anton
		 
		Anton S. Yemelyanov
		asy@GenesisFX.com <mailto:asy@GenesisFX.com> 
	 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	[ To unsubscribe, send email to ntdev-request@atria.com with
body
	UNSUBSCRIBE (the subject is ignored). ]
	On Wednesday, February 09, 2000 2:45 AM, Sajeev.S
	[SMTP:sajeev@amiindia.co.in] wrote:
	|  << File: ATT00012.txt; charset = iso-8859-1 >> 
	 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	[ To unsubscribe, send email to ntdev-request@atria.com with
body
	UNSUBSCRIBE (the subject is ignored). ]
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ To unsubscribe, send email to ntdev-request@atria.com with body
UNSUBSCRIBE (the subject is ignored). ]
