Sorry, that should read:
The bottom line is that much of the extended information accessible from the new-style callouts is only present if the process was created via NtCreateUserProcess.
Phone mail client autocompleted the wrong thing.
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Skywing
Sent: Monday, November 03, 2008 11:25 AM
To: Windows File Systems Devs Interest List
Subject: RE: Re:[ntfsd] CreateProcessNotifyEx on Windows XP, Vista and 2003 Server
There was some consolidation of process creation interfaces in the Vista timeframe with the introduction of NtCreateUserProcess. This new interface adds a generic extensibility mechanism (property lists), so that we don’t continue having yet another new process creation system service added with every other kernel release.
NtCreateUserProcess moves some of the things that have traditionally been user mode only conventions into the realm of more formally codified kernel-defined interfaces.
However, the old process creation system services still function; in kernel mode, they are wrappers around the new interface. If user mode calls one of the old system services, however, you have the same lack of information as with older kernel versions. (Try writing a program that calls NtCreateProcess and looking at the different data that you get in your PsSetCreateProcessNotifyRoutine callout.)
The bottom line is that much of the extended information accessible from the new-style callouts is only present if the process was created via NtCreateProcess. You must still support callers of the legacy system services, and for those, the story is pretty much the same as it has always been with respect to the new data you get in your notification routine.
-----Original Message-----
From: Pavel A.
Sent: Monday, November 03, 2008 08:15
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] CreateProcessNotifyEx on Windows XP, Vista and 2003 Server
but they wouldn’t add the ability to get command line in NT6, if it were
just sick and useless ?
–PA
Skywing wrote:
> No - traditionally, the kernel has no concept of - and nothing to do with - the idea of a program command line.
>
> It is simply stored at a “well known” place in the user address space (PEB -> PRTL_USER_PROCESS_PARAMETERS), written to and read from entirely by user mode.
>
> Be aware that both of those structures are user mode writable and must never be trusted to contain well-formed (or otherwise valid or correct) data. You must not trust them for any security-sensitive decisions, and you must guard against malformed data structures if you indeed decide to grovel around in them.
>
> Why do you think that you need to munge with the command line in kernel mode? What are you trying to accomplish? There may be a better way.
>
> - S
>
> -----Original Message-----
> From: xxxxx@gmail.com
> Sent: Sunday, November 02, 2008 13:02
> To: Windows File Systems Devs Interest List
> Subject: [ntfsd] CreateProcessNotifyEx on Windows XP, Vista and 2003 Server
>
>
> Hi,
>
> I’m experimenting with the PsSetLoadImageNotifyRoutine and PsSetCreateProcessNotifyRoutinEx Hook APIs in kernel mode. I spend some hours to figure out if there are a documented way to get the commande line parameters of the starting process in this callback. CreatProcessNotifyEx works great on Windows 2008 server because it supports PS_CREATE_NOTIFY_INFO with the CommandLine property. Is their any similar things for lower platforms which is documented…
>
> I found some samples which are based on the PEB and ZwQueryInformationProcess, but it’s not documented.
>
> Thanks for your help
> regards
> Dirk
>
> —
—
NTFSD is sponsored by OSR
For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
You are currently subscribed to ntfsd as: xxxxx@valhallalegends.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
NTFSD is sponsored by OSR
For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com