- Some more PSDK compatibility fixes - Misc cleanup... Modified: trunk/reactos/include/libs/pseh/framebased/internal.h Modified: trunk/reactos/include/ndk/umtypes.h Modified: trunk/reactos/include/ndk/zwfuncs.h Modified: trunk/reactos/include/reactos/helper.h Modified: trunk/reactos/lib/kernel32/k32.h Modified: trunk/reactos/lib/kernel32/misc/comm.c Modified: trunk/reactos/lib/kernel32/process/create.c Modified: trunk/reactos/lib/pseh/framebased.c Modified: trunk/reactos/w32api/include/winbase.h Modified: trunk/reactos/w32api/include/winnt.h _____
Modified: trunk/reactos/include/libs/pseh/framebased/internal.h --- trunk/reactos/include/libs/pseh/framebased/internal.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/include/libs/pseh/framebased/internal.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -51,7 +51,7 @@
struct __SEHPortableFrame * );
-typedef __declspec(noreturn) void (__stdcall * _SEHHandler_t) +typedef void (__stdcall * _SEHHandler_t) ( struct __SEHPortableTryLevel * ); _____
Modified: trunk/reactos/include/ndk/umtypes.h --- trunk/reactos/include/ndk/umtypes.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/include/ndk/umtypes.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -59,6 +59,9 @@
#define SYMBOLIC_LINK_QUERY 0x0001 #define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
+/* Duplication Flags */ +#define DUPLICATE_SAME_ATTRIBUTES 0x00000004 + /* I/O Control Codes for communicating with Mailslots */ #define FSCTL_MAILSLOT_PEEK \ CTL_CODE(FILE_DEVICE_MAILSLOT, 0, METHOD_NEITHER, FILE_READ_DATA) _____
Modified: trunk/reactos/include/ndk/zwfuncs.h --- trunk/reactos/include/ndk/zwfuncs.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/include/ndk/zwfuncs.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -13,6 +13,7 @@
#include "lpctypes.h" #include "zwtypes.h" #include "kdtypes.h" +#define _WMIKM_ #include <evntrace.h>
/* FUNCTION TYPES ************************************************************/ _____
Modified: trunk/reactos/include/reactos/helper.h --- trunk/reactos/include/reactos/helper.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/include/reactos/helper.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -1,118 +1,118 @@
-#ifndef _HELPER_H -#define _HELPER_H - -#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b)) -#define ROUNDDOWN(a,b) (((a)/(b))*(b)) -#define ROUND_UP ROUNDUP -#define ROUND_DOWN ROUNDDOWN -#define PAGE_ROUND_DOWN(x) (((ULONG)x)&(~(PAGE_SIZE-1))) -#define PAGE_ROUND_UP(x) ( (((ULONG)x)%PAGE_SIZE) ? ((((ULONG)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG)x) ) -#define ABS_VALUE(V) (((V) < 0) ? -(V) : (V)) -#define RtlRosMin(X,Y) (((X) < (Y))? (X) : (Y)) -#define RtlRosMin3(X,Y,Z) (((X) < (Y)) ? RtlRosMin(X,Z) : RtlRosMin(Y,Z)) -#define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx at %s:%i\n",__FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e) -#define KEBUGCHECK(a) DbgPrint("KeBugCheck at %s:%i\n",__FILE__,__LINE__), KeBugCheck(a) -#define EXPORTED __declspec(dllexport) -#define IMPORTED __declspec(dllimport) -#define LIST_FOR_EACH(entry, head) \ - for(entry = (head)->Flink; entry != (head); entry = entry->Flink) -#define LIST_FOR_EACH_SAFE(tmp_entry, head, ptr, type, field) \ - for ((tmp_entry)=(head)->Flink; (tmp_entry)!=(head) && \ - ((ptr) = CONTAINING_RECORD(tmp_entry,type,field)) && \ - ((tmp_entry) = (tmp_entry)->Flink); ) -#define OPTHDROFFSET(a) ((LPVOID)((BYTE *)a + \ - ((PIMAGE_DOS_HEADER)a)->e_lfanew + \ - sizeof (IMAGE_NT_SIGNATURE) + \ - sizeof (IMAGE_FILE_HEADER))) -#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24)) -#define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m))) -#define NTSTAT_SEVERITY_SHIFT 30 -#define NTSTAT_SEVERITY_MASK 0x00000003 -#define NTSTAT_FACILITY_SHIFT 16 -#define NTSTAT_FACILITY_MASK 0x00000FFF -#define NTSTAT_CUSTOMER_MASK 0x20000000 -#define NT_SEVERITY(StatCode) (((StatCode) >> NTSTAT_SEVERITY_SHIFT) & NTSTAT_SEVERITY_MASK) -#define NT_FACILITY(StatCode) (((StatCode) >> NTSTAT_FACILITY_SHIFT) & NTSTAT_FACILITY_MASK) -#define NT_CUSTOMER(StatCode) ((StatCode) & NTSTAT_CUSTOMER_MASK) -#define RELATIVE_TIME(wait) (-(wait)) -#define NANOS_TO_100NS(nanos) (((LONGLONG)(nanos)) / 100) -#define MICROS_TO_100NS(micros) (((LONGLONG)(micros)) * NANOS_TO_100NS(1000)) -#define MILLIS_TO_100NS(milli) (((LONGLONG)(milli)) * MICROS_TO_100NS(1000)) -#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) * MILLIS_TO_100NS(1000)) -#define MINUTES_TO_100NS(minutes) (((LONGLONG)(minutes)) * SECONDS_TO_100NS(60)) -#define HOURS_TO_100NS(hours) (((LONGLONG)(hours)) * MINUTES_TO_100NS(60)) +#ifndef _HELPER_H +#define _HELPER_H + +#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b)) +#define ROUNDDOWN(a,b) (((a)/(b))*(b)) +#define ROUND_UP ROUNDUP +#define ROUND_DOWN ROUNDDOWN +#define PAGE_ROUND_DOWN(x) (((ULONG)x)&(~(PAGE_SIZE-1))) +#define PAGE_ROUND_UP(x) ( (((ULONG)x)%PAGE_SIZE) ? ((((ULONG)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG)x) ) +#define ABS_VALUE(V) (((V) < 0) ? -(V) : (V)) +#define RtlRosMin(X,Y) (((X) < (Y))? (X) : (Y)) +#define RtlRosMin3(X,Y,Z) (((X) < (Y)) ? RtlRosMin(X,Z) : RtlRosMin(Y,Z)) +#define KEBUGCHECKEX(a,b,c,d,e) DbgPrint("KeBugCheckEx at %s:%i\n",__FILE__,__LINE__), KeBugCheckEx(a,b,c,d,e) +#define KEBUGCHECK(a) DbgPrint("KeBugCheck at %s:%i\n",__FILE__,__LINE__), KeBugCheck(a) +#define EXPORTED __declspec(dllexport) +#define IMPORTED __declspec(dllimport) +#define LIST_FOR_EACH(entry, head) \ + for(entry = (head)->Flink; entry != (head); entry = entry->Flink) +#define LIST_FOR_EACH_SAFE(tmp_entry, head, ptr, type, field) \ + for ((tmp_entry)=(head)->Flink; (tmp_entry)!=(head) && \ + ((ptr) = CONTAINING_RECORD(tmp_entry,type,field)) && \ + ((tmp_entry) = (tmp_entry)->Flink); ) +#define OPTHDROFFSET(a) ((LPVOID)((BYTE *)a + \ + ((PIMAGE_DOS_HEADER)a)->e_lfanew + \ + sizeof (IMAGE_NT_SIGNATURE) + \ + sizeof (IMAGE_FILE_HEADER))) +#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24)) +#define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m))) +#define NTSTAT_SEVERITY_SHIFT 30 +#define NTSTAT_SEVERITY_MASK 0x00000003 +#define NTSTAT_FACILITY_SHIFT 16 +#define NTSTAT_FACILITY_MASK 0x00000FFF +#define NTSTAT_CUSTOMER_MASK 0x20000000 +#define NT_SEVERITY(StatCode) (((StatCode) >> NTSTAT_SEVERITY_SHIFT) & NTSTAT_SEVERITY_MASK) +#define NT_FACILITY(StatCode) (((StatCode) >> NTSTAT_FACILITY_SHIFT) & NTSTAT_FACILITY_MASK) +#define NT_CUSTOMER(StatCode) ((StatCode) & NTSTAT_CUSTOMER_MASK) +#define RELATIVE_TIME(wait) (-(wait)) +#define NANOS_TO_100NS(nanos) (((LONGLONG)(nanos)) / 100) +#define MICROS_TO_100NS(micros) (((LONGLONG)(micros)) * NANOS_TO_100NS(1000)) +#define MILLIS_TO_100NS(milli) (((LONGLONG)(milli)) * MICROS_TO_100NS(1000)) +#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) * MILLIS_TO_100NS(1000)) +#define MINUTES_TO_100NS(minutes) (((LONGLONG)(minutes)) * SECONDS_TO_100NS(60)) +#define HOURS_TO_100NS(hours) (((LONGLONG)(hours)) * MINUTES_TO_100NS(60)) #define UNICODIZE1(x) L##x -#define UNICODIZE(x) UNICODIZE1(x) -#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - -#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - -#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - -#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ -{\ - PLIST_ENTRY current;\ -\ - current = (ListHead)->Flink;\ - while (current != (ListHead))\ - {\ - if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\ - (NewEntry)->SortField)\ - {\ - break;\ - }\ - current = current->Flink;\ - }\ -\ - InsertTailList(current, &((NewEntry)->ListEntryField));\ -} - -#endif +#define UNICODIZE(x) UNICODIZE1(x) +#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + +#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + +#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + +#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\ +{\ + PLIST_ENTRY current;\ +\ + current = (ListHead)->Flink;\ + while (current != (ListHead))\ + {\ + if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\ + (NewEntry)->SortField)\ + {\ + break;\ + }\ + current = current->Flink;\ + }\ +\ + InsertTailList(current, &((NewEntry)->ListEntryField));\ +} + +#endif _____
Modified: trunk/reactos/lib/kernel32/k32.h --- trunk/reactos/lib/kernel32/k32.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/lib/kernel32/k32.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -11,7 +11,6 @@
/* PSDK/NDK Headers */ #define NTOS_MODE_USER #define _KERNEL32_ -#define _WMIKM_ #include <windows.h> #include <ndk/ntndk.h>
_____
Modified: trunk/reactos/lib/kernel32/misc/comm.c --- trunk/reactos/lib/kernel32/misc/comm.c 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/lib/kernel32/misc/comm.c 2005-07-27 06:18:52 UTC (rev 16792) @@ -574,7 +574,7 @@
/* FUNCTIONS */ #define COMMDCB_PARAM(__P__) \ { \ - RTL_CONSTANT_STRING(L""#__P__ ), \ + RTL_CONSTANT_STRING(L""UNICODIZE(#__P__ )), \ (ULONG_PTR)&COMMDCB_ ## __P__ ## Param \ }
_____
Modified: trunk/reactos/lib/kernel32/process/create.c --- trunk/reactos/lib/kernel32/process/create.c 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/lib/kernel32/process/create.c 2005-07-27 06:18:52 UTC (rev 16792) @@ -12,7 +12,7 @@
#include <k32.h>
#define NDEBUG -#include <debug.h> +#include "../include/debug.h"
#define CMD_STRING L"cmd /c "
@@ -648,9 +648,7 @@ lpStartupInfo, lpProcessInformation);
/* Copy Startup Info */ - DPRINT("Foo\n"); RtlMoveMemory(&StartupInfo, lpStartupInfo, sizeof(*lpStartupInfo)); - DPRINT("Foo\n");
/* Initialize all strings to nothing */ LiveCommandLine.Buffer = NULL; @@ -664,26 +662,22 @@ /* Convert the Command line */ if (lpCommandLine) { - DPRINT("Foo\n"); /* If it's too long, then we'll have a problem */ if ((strlen(lpCommandLine) + 1) * sizeof(WCHAR) < NtCurrentTeb()->StaticUnicodeString.MaximumLength) { /* Cache it in the TEB */ - DPRINT("Foo\n"); CommandLine = Basep8BitStringToCachedUnicodeString(lpCommandLine); } else { /* Use a dynamic version */ - DPRINT("Foo\n"); Basep8BitStringToLiveUnicodeString(&LiveCommandLine, lpCommandLine); } } else { - DPRINT("Foo\n"); /* The logic below will use CommandLine, so we must make it valid */ CommandLine = &DummyString; } @@ -691,13 +685,11 @@ /* Convert the Name and Directory */ if (lpApplicationName) { - DPRINT("Foo\n"); Basep8BitStringToLiveUnicodeString(&ApplicationName, lpApplicationName); } if (lpCurrentDirectory) { - DPRINT("Foo\n"); Basep8BitStringToLiveUnicodeString(&CurrentDirectory, lpCurrentDirectory); } @@ -705,19 +697,16 @@ /* Now convert Startup Strings */ if (lpStartupInfo->lpReserved) { - DPRINT("Foo\n"); BasepAnsiStringToHeapUnicodeString(lpStartupInfo->lpReserved, &StartupInfo.lpReserved); } if (lpStartupInfo->lpDesktop) { - DPRINT("Foo\n"); BasepAnsiStringToHeapUnicodeString(lpStartupInfo->lpDesktop, &StartupInfo.lpDesktop); } if (lpStartupInfo->lpTitle) { - DPRINT("Foo\n"); BasepAnsiStringToHeapUnicodeString(lpStartupInfo->lpTitle, &StartupInfo.lpTitle); } @@ -778,6 +767,11 @@ PROCESS_BASIC_INFORMATION ProcessBasicInfo; STARTUPINFOW StartupInfo; ULONG Dummy; + LPWSTR BatchCommandLine; + ULONG CmdLineLength; + UNICODE_STRING CommandLineString; + LPWSTR TempBuffer; + PWCHAR Extension; LPWSTR QuotedCmdLine = NULL; LPWSTR ScanString; LPWSTR NullBuffer; @@ -811,7 +805,7 @@ }
/* Fail on this flag, it's only valid with the WithLogonW function */ - if (dwCreationFlags & CREATE_WITH_USERPROFILE) + if (dwCreationFlags & CREATE_PRESERVE_CODE_AUTHZ_LEVEL) { DPRINT1("Invalid flag used\n"); SetLastError(ERROR_INVALID_PARAMETER); @@ -835,13 +829,13 @@ SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - DPRINT("Foo\n"); + /* * We're going to modify and mask out flags and stuff in lpStartupInfo, * so we'll use our own local copy for that. */ StartupInfo = *lpStartupInfo; - DPRINT("Foo\n"); + /* FIXME: Use default Separate/Shared VDM Flag */
/* If we are inside a Job, use Separate VDM so it won't escape the Job */ @@ -854,7 +848,7 @@
CREATE_SEPARATE_WOW_VDM; } } - DPRINT("Foo\n"); + /* * According to some sites, ShellExecuteEx uses an undocumented flag to * send private handle data (such as HMONITOR or HICON). See: @@ -866,21 +860,21 @@ { StartupInfo.dwFlags &= ~STARTF_USESTDHANDLES; } - DPRINT("Foo\n"); + /* Start by zeroing out the fields */ RtlZeroMemory(lpProcessInformation, sizeof(PROCESS_INFORMATION)); - DPRINT("Foo\n"); + /* Easy stuff first, convert the process priority class */ PriorityClass.Foreground = FALSE; PriorityClass.PriorityClass = BasepConvertPriorityClass(dwCreationFlags); - DPRINT("Foo\n"); + /* Convert the environment */ if(lpEnvironment && !(dwCreationFlags & CREATE_UNICODE_ENVIRONMENT)) { lpEnvironment = BasepConvertUnicodeEnvironment(lpEnvironment); if (!lpEnvironment) return FALSE; } -DPRINT("Foo\n"); + /* Get the application name and do all the proper formating necessary */ GetAppName: /* See if we have an application name (oh please let us have one!) */ @@ -907,7 +901,7 @@ /* Advance past quote */ ScanString++; lpApplicationName = ScanString; - DPRINT("Foo\n"); + /* Find the closing quote */ while (*ScanString) { @@ -918,7 +912,7 @@ FoundQuotes = TRUE; break; } - DPRINT("Foo\n"); + /* Keep looking */ ScanString++; NullBuffer = ScanString; @@ -930,7 +924,7 @@ WhiteScan: /* Reset the pointer */ lpApplicationName = lpCommandLine; - DPRINT("Foo\n"); + /* Find whitespace of Tab */ while (*ScanString) { @@ -940,7 +934,7 @@ NullBuffer = ScanString; break; } - DPRINT("Foo\n"); + /* Keep looking */ ScanString++; NullBuffer = ScanString; @@ -1078,8 +1072,8 @@ case STATUS_INVALID_IMAGE_PROTECT: case STATUS_INVALID_IMAGE_NOT_MZ:
- /* If it's a DOS app, use VDM */ - //if ((BasepCheckDosApp(&ApplicationName))) + /* If it's a DOS app, use VDM + if ((BasepCheckDosApp(&ApplicationName))) */ { DPRINT1("Launching VDM...\n"); RtlFreeHeap(GetProcessHeap(), 0, NameBuffer); @@ -1097,12 +1091,8 @@ }
/* It's a batch file */ - LPWSTR BatchCommandLine; - ULONG CmdLineLength; - UNICODE_STRING CommandLineString; - LPWSTR TempBuffer; - PWCHAR Extension = - &ApplicationName.Buffer[ApplicationName.Length / sizeof(WCHAR) - 4]; + Extension = &ApplicationName.Buffer[ApplicationName.Length / + sizeof(WCHAR) - 4];
/* Make sure the extensions are correct */ if (_wcsnicmp(Extension, L".bat", 4) && _wcsnicmp(Extension, L".cmd", 4)) _____
Modified: trunk/reactos/lib/pseh/framebased.c --- trunk/reactos/lib/pseh/framebased.c 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/lib/pseh/framebased.c 2005-07-27 06:18:52 UTC (rev 16792) @@ -68,7 +68,7 @@
} }
-__declspec(noreturn) void __cdecl _SEHCallHandler +void __cdecl _SEHCallHandler ( _SEHPortableFrame_t * frame, _SEHPortableTryLevel_t * trylevel _____
Modified: trunk/reactos/w32api/include/winbase.h --- trunk/reactos/w32api/include/winbase.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/w32api/include/winbase.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -172,7 +172,7 @@
#define BELOW_NORMAL_PRIORITY_CLASS 0x00004000 #define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000 #define CREATE_BREAKAWAY_FROM_JOB 0x01000000 -#define CREATE_WITH_USERPROFILE 0x02000000 +#define CREATE_PRESERVE_CODE_AUTHZ_LEVEL 0x02000000 #define CREATE_DEFAULT_ERROR_MODE 0x04000000 #define CREATE_NO_WINDOW 0x08000000 #define PROFILE_USER 0x10000000 _____
Modified: trunk/reactos/w32api/include/winnt.h --- trunk/reactos/w32api/include/winnt.h 2005-07-27 05:42:33 UTC (rev 16791) +++ trunk/reactos/w32api/include/winnt.h 2005-07-27 06:18:52 UTC (rev 16792) @@ -355,7 +355,6 @@
/* also in ddk/winddk.h */ #define DUPLICATE_CLOSE_SOURCE 0x00000001 #define DUPLICATE_SAME_ACCESS 0x00000002 -#define DUPLICATE_SAME_ATTRIBUTES 0x00000004 /* end winddk.k */
#define MAILSLOT_NO_MESSAGE ((DWORD)-1)