mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
[USERSRV]
- Set the process creation notify routine for BASE that needs to be called when a process is created. Patch by Timo, see CORE-7505. [BASESRV] - Implement BaseSetProcessCreateNotify that just saves internally the notification function to be called when a process is created. - Call the notification function where it should be. CORE-7505 svn path=/trunk/; revision=65712
This commit is contained in:
parent
ae2e894b80
commit
effa3a4d24
|
@ -15,11 +15,13 @@ typedef
|
|||
BOOL
|
||||
(CALLBACK *BASE_PROCESS_CREATE_NOTIFY_ROUTINE)(
|
||||
HANDLE NewProcessId,
|
||||
HANDLE SourceThreadId,
|
||||
DWORD dwUnknown,
|
||||
HANDLE ParentThreadId,
|
||||
ULONG dwUnknown,
|
||||
ULONG CreateFlags);
|
||||
|
||||
NTSTATUS WINAPI BaseSetProcessCreateNotify(BASE_PROCESS_CREATE_NOTIFY_ROUTINE);
|
||||
VOID
|
||||
NTAPI
|
||||
BaseSetProcessCreateNotify(IN BASE_PROCESS_CREATE_NOTIFY_ROUTINE ProcessCreateNotifyProc);
|
||||
|
||||
typedef struct _NLS_USER_INFO
|
||||
{
|
||||
|
|
|
@ -14,6 +14,11 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS ********************************************************************/
|
||||
|
||||
/* User notification procedure to be called when a process is created */
|
||||
static BASE_PROCESS_CREATE_NOTIFY_ROUTINE UserNotifyProcessCreate = NULL;
|
||||
|
||||
/* PUBLIC SERVER APIS *********************************************************/
|
||||
|
||||
CSR_API(BaseSrvDebugProcess)
|
||||
|
@ -167,7 +172,14 @@ CSR_API(BaseSrvCreateProcess)
|
|||
return Status;
|
||||
}
|
||||
|
||||
/* FIXME: Should notify user32 */
|
||||
/* Call the user notification procedure */
|
||||
if (UserNotifyProcessCreate)
|
||||
{
|
||||
UserNotifyProcessCreate(CreateProcessRequest->ClientId.UniqueProcess,
|
||||
Process->ClientId.UniqueThread,
|
||||
0,
|
||||
Flags);
|
||||
}
|
||||
|
||||
/* Check if this is a VDM process */
|
||||
if (CreateProcessRequest->VdmBinaryType)
|
||||
|
@ -295,12 +307,12 @@ CSR_API(BaseSrvSetProcessShutdownParam)
|
|||
|
||||
/* PUBLIC API *****************************************************************/
|
||||
|
||||
NTSTATUS
|
||||
VOID
|
||||
NTAPI
|
||||
BaseSetProcessCreateNotify(IN BASE_PROCESS_CREATE_NOTIFY_ROUTINE ProcessCreateNotifyProc)
|
||||
{
|
||||
DPRINT("BASESRV: %s(%08lx) called\n", __FUNCTION__, ProcessCreateNotifyProc);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
/* Set the user notification procedure to be called when a process is created */
|
||||
UserNotifyProcessCreate = ProcessCreateNotifyProc;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -709,8 +709,8 @@ BOOL
|
|||
NTAPI
|
||||
NtUserNotifyProcessCreate(
|
||||
HANDLE NewProcessId,
|
||||
HANDLE SourceThreadId,
|
||||
DWORD dwUnknown,
|
||||
HANDLE ParentThreadId,
|
||||
ULONG dwUnknown,
|
||||
ULONG CreateFlags)
|
||||
{
|
||||
STUB;
|
||||
|
|
|
@ -261,6 +261,9 @@ CSR_SERVER_DLL_INIT(UserServerDllInitialization)
|
|||
return Status;
|
||||
}
|
||||
|
||||
/* Set the process creation notify routine for BASE */
|
||||
BaseSetProcessCreateNotify(NtUserNotifyProcessCreate);
|
||||
|
||||
/* Initialize the kernel mode subsystem */
|
||||
Status = NtUserInitialize(USER_VERSION,
|
||||
ghPowerRequestEvent,
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
|
||||
// #define NTOS_MODE_USER
|
||||
|
||||
/* BASE Header */
|
||||
#include <win/base.h>
|
||||
|
||||
/* USER Headers */
|
||||
#include <win/winmsg.h>
|
||||
|
||||
|
|
Loading…
Reference in a new issue