BOOL
(CALLBACK *BASE_PROCESS_CREATE_NOTIFY_ROUTINE)(
HANDLE NewProcessId,
- HANDLE SourceThreadId,
- DWORD dwUnknown,
- ULONG CreateFlags);
+ 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
{
#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)
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)
/* 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 */
return Status;
}
+ /* Set the process creation notify routine for BASE */
+ BaseSetProcessCreateNotify(NtUserNotifyProcessCreate);
+
/* Initialize the kernel mode subsystem */
Status = NtUserInitialize(USER_VERSION,
ghPowerRequestEvent,