From b62ac8152fd22c29e8284d5d4d0a3bd500f1ef77 Mon Sep 17 00:00:00 2001 From: "KJK::Hyperion" Date: Mon, 11 Mar 2002 20:48:25 +0000 Subject: [PATCH] initial code for process attach svn path=/trunk/; revision=2700 --- posix/lib/psxdll/misc/main.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/posix/lib/psxdll/misc/main.c b/posix/lib/psxdll/misc/main.c index 83d3c218912..37e4493e9c7 100644 --- a/posix/lib/psxdll/misc/main.c +++ b/posix/lib/psxdll/misc/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.2 2002/02/20 09:17:57 hyperion Exp $ +/* $Id: main.c,v 1.3 2002/03/11 20:48:25 hyperion Exp $ */ /* * COPYRIGHT: See COPYING in the top level directory @@ -10,8 +10,29 @@ * 27/12/2001: Created */ -int __stdcall DllMain(void *hinstDll, unsigned long int dwReason, void *reserved) +#include +#include + +#define DLL_PROCESS_ATTACH 1 +#define DLL_THREAD_ATTACH 2 +#define DLL_THREAD_DETACH 3 +#define DLL_PROCESS_DETACH 0 + +int __stdcall DllMain(void *pDllInstance, unsigned long int nReason, void *pUnknown) { +#if 0 + if(nReason == DLL_PROCESS_ATTACH) + { + __PPDX_PDATA ppdProcessData = __PdxGetProcessData(); + + if(ppdProcessData == 0) + WARN("this process doesn't have a process data block\n"); + else if(ppdProcessData->Spawned) + { + INFO("the process has been spawned\n"); + } + } +#endif return (1); }