<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
- <module name="desk" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_DESK}" installbase="system32" installname="desk.cpl" unicode="yes">
+ <module name="desk" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_DESK}" installbase="system32" installname="desk.cpl" unicode="yes" crt="msvcrt">
- <importlibrary definition="desk.def" />
+ <importlibrary definition="desk.spec" />
<include base="desk">.</include>
<define name="_WIN32" />
<library>kernel32</library>
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
- <module name="intl" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_INTL}" installbase="system32" installname="intl.cpl" unicode="yes">
+ <module name="intl" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_INTL}" installbase="system32" installname="intl.cpl" unicode="yes" crt="msvcrt">
- <importlibrary definition="intl.def" />
- <include base="intl">.</include>
- <library>kernel32</library>
- <library>user32</library>
- <library>comctl32</library>
- <library>advapi32</library>
- <library>setupapi</library>
- <library>shell32</library>
- <file>currency.c</file>
- <file>date.c</file>
- <file>generalp.c</file>
- <file>intl.c</file>
- <file>inplocale.c</file>
- <file>numbers.c</file>
- <file>time.c</file>
- <file>misc.c</file>
- <file>languages.c</file>
- <file>advanced.c</file>
- <file>sort.c</file>
- <file>intl.rc</file>
+ <importlibrary definition="intl.spec" />
+ <include base="intl">.</include>
+ <library>kernel32</library>
+ <library>user32</library>
+ <library>comctl32</library>
+ <library>advapi32</library>
+ <library>setupapi</library>
+ <library>shell32</library>
+ <file>currency.c</file>
+ <file>date.c</file>
+ <file>generalp.c</file>
+ <file>intl.c</file>
+ <file>inplocale.c</file>
+ <file>numbers.c</file>
+ <file>time.c</file>
+ <file>misc.c</file>
+ <file>languages.c</file>
+ <file>advanced.c</file>
+ <file>sort.c</file>
+ <file>intl.rc</file>
</module>
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
- <module name="main" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_MAIN}" installbase="system32" installname="main.cpl" unicode="yes">
+ <module name="main" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_MAIN}" installbase="system32" installname="main.cpl" unicode="yes" crt="msvcrt">
- <importlibrary definition="main.def" />
+ <importlibrary definition="main.spec" />
<include base="main">.</include>
<library>kernel32</library>
<library>advapi32</library>
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
- <module name="usrmgr" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_USRMGR}" installbase="system32" installname="usrmgr.cpl" unicode="yes">
+ <module name="usrmgr" type="win32dll" extension=".cpl" baseaddress="${BASEADDRESS_USRMGR}" installbase="system32" installname="usrmgr.cpl" unicode="yes" crt="msvcrt">
- <importlibrary definition="usrmgr.def" />
+ <importlibrary definition="usrmgr.spec" />
<include base="usrmgr">.</include>
<library>kernel32</library>
<library>advapi32</library>
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
- <module name="ddraw" type="win32dll" installbase="system32" installname="ddraw.dll" allowwarnings ="true" unicode="yes">
+ <module name="ddraw" type="win32dll" installbase="system32" installname="ddraw.dll" allowwarnings ="true" unicode="yes" crt="msvcrt">
- <importlibrary definition="ddraw.def" />
+ <importlibrary definition="ddraw.spec" />
<include base="ddraw">.</include>
<library>kernel32</library>
<library>user32</library>
{
DWORD ErrorCode;
- if (InterlockedCompareExchangePointer(&NtMarta,
+ if (InterlockedCompareExchangePointer((PVOID)&NtMarta,
NULL,
NULL) == NULL)
{
if (ErrorCode == ERROR_SUCCESS)
{
/* try change the NtMarta pointer */
- if (InterlockedCompareExchangePointer(&NtMarta,
+ if (InterlockedCompareExchangePointer((PVOID)&NtMarta,
&NtMartaStatic,
NULL) != NULL)
{
VOID
UnloadNtMarta(VOID)
{
- if (InterlockedExchangePointer(&NtMarta,
+ if (InterlockedExchangePointer((PVOID)&NtMarta,
NULL) != NULL)
{
FreeLibrary(NtMartaStatic.hDllInstance);
for (Priv = 0; Priv < sizeof(DefaultPrivNames) / sizeof(DefaultPrivNames[0]); Priv++)
{
- if (0 == wcsicmp(PrivName, DefaultPrivNames[Priv]))
+ if (0 == _wcsicmp(PrivName, DefaultPrivNames[Priv]))
{
Luid->LowPart = Priv + SE_MIN_WELL_KNOWN_PRIVILEGE;
Luid->HighPart = 0;
- <module name="gdi32" type="win32dll" baseaddress="${BASEADDRESS_GDI32}" installbase="system32" installname="gdi32.dll" unicode="yes" allowwarnings="true">
-<module name="gdi32" type="win32dll" baseaddress="${BASEADDRESS_GDI32}" installbase="system32" installname="gdi32.dll" unicode="yes" crt="dll">
- <importlibrary definition="gdi32.def" />
++<module name="gdi32" type="win32dll" baseaddress="${BASEADDRESS_GDI32}" installbase="system32" installname="gdi32.dll" unicode="yes" crt="dll" allowwarnings="true">
+ <importlibrary definition="gdi32.spec" />
<include base="gdi32">include</include>
<define name="_DISABLE_TIDENTS" />
<define name="LANGPACK" />
<library>pseh</library>
<library>dxguid</library>
<library>ntdll</library>
-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<directory name="include">
<pch>precomp.h</pch>
- <module name="glu32" type="win32dll" entrypoint="0" baseaddress="${BASEADDRESS_GLU32}" installbase="system32" installname="glu32.dll" allowwarnings="true">
+ <module name="glu32" type="win32dll" entrypoint="0" baseaddress="${BASEADDRESS_GLU32}" installbase="system32" installname="glu32.dll" allowwarnings="true" crt="msvcrt">
- <importlibrary definition="glu32.def" />
+ <importlibrary definition="glu32.spec" />
<include base="glu32">include</include>
<include base="glu32">libnurbs/internals</include>
<include base="glu32">libnurbs/interface</include>
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
<group>
- <module name="kernel32_base" type="objectlibrary" allowwarnings="true">
- <module name="kernel32_base" type="objectlibrary" crt="dll">
++ <module name="kernel32_base" type="objectlibrary" crt="dll" allowwarnings="true">
<include base="kernel32_base">.</include>
<include base="kernel32_base">include</include>
<include base="ReactOS">include/reactos/subsys</include>
<file>thread.S</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>fiber.S</file>
+ <file>thread.S</file>
+ </directory>
+ </if>
</directory>
<compilerflag compiler="cpp">-fno-exceptions</compilerflag>
</directory>
<library>normalize</library>
</module>
- <module name="kernel32" type="win32dll" baseaddress="${BASEADDRESS_KERNEL32}" installbase="system32" installname="kernel32.dll">
+ <module name="kernel32" type="win32dll" baseaddress="${BASEADDRESS_KERNEL32}" installbase="system32" installname="kernel32.dll" crt="dll">
- <importlibrary definition="kernel32.def" />
+ <importlibrary definition="kernel32.spec" />
<include base="kernel32">.</include>
<include base="kernel32" root="intermediate">.</include>
<include base="kernel32">include</include>
<module name="msvcrt" type="win32dll" baseaddress="${BASEADDRESS_MSVCRT}" mangledsymbols="true" installbase="system32" installname="msvcrt.dll" iscrt="yes">
- <importlibrary definition="msvcrt.def" />
+ <importlibrary definition="msvcrt-$(ARCH).def" />
<include base="msvcrt">.</include>
<include base="crt">include</include>
<define name="_DISABLE_TIDENTS" />
<library>wine</library>
<library>kernel32</library>
<library>ntdll</library>
+ <library>pseh</library>
<pch>precomp.h</pch>
<file>dllmain.c</file>
<file>msvcrt.rc</file>
- <module name="opengl32" type="win32dll" baseaddress="${BASEADDRESS_OPENGL32}" installbase="system32" installname="opengl32.dll" unicode="yes">
+ <module name="opengl32" type="win32dll" baseaddress="${BASEADDRESS_OPENGL32}" installbase="system32" installname="opengl32.dll" unicode="yes" crt="msvcrt">
- <importlibrary definition="opengl32.def" />
+ <importlibrary definition="opengl32.spec" />
<define name="_DISABLE_TIDENTS" />
<library>ntdll</library>
<library>kernel32</library>
- <module name="user32" type="win32dll" baseaddress="${BASEADDRESS_USER32}" installbase="system32" installname="user32.dll" unicode="yes" allowwarnings="true">
-<module name="user32" type="win32dll" baseaddress="${BASEADDRESS_USER32}" installbase="system32" installname="user32.dll" unicode="yes" crt="dll">
- <importlibrary definition="user32.def" />
++<module name="user32" type="win32dll" baseaddress="${BASEADDRESS_USER32}" installbase="system32" installname="user32.dll" unicode="yes" crt="dll" allowwarnings="true">
+ <importlibrary definition="user32.pspec" />
<include base="user32">.</include>
<include base="user32">include</include>
<include base="ReactOS">include/reactos/subsys</include>
would use in the same case
*/
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
/*** Stack frame juggling ***/
#define _ReturnAddress() (__builtin_return_address(0))
#define _AddressOfReturnAddress() (&(((void **)(__builtin_frame_address(0)))[1]))
/* TODO: __getcallerseflags but how??? */
+/* Maybe the same for x86? */
+#ifdef _x86_64
+#define _alloca(s) __builtin_alloca(s)
+#endif
/*** Atomic operations ***/
return retval;
}
- static __inline__ __attribute__((always_inline)) unsigned char _rotl8(const unsigned char value, const unsigned char shift)
+ static __inline__ __attribute__((always_inline)) unsigned char _rotl8(unsigned char value, unsigned char shift)
{
unsigned char retval;
__asm__("rolb %b[shift], %b[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
return retval;
}
- static __inline__ __attribute__((always_inline)) unsigned short _rotl16(const unsigned short value, const unsigned char shift)
+ static __inline__ __attribute__((always_inline)) unsigned short _rotl16(unsigned short value, unsigned char shift)
{
unsigned short retval;
__asm__("rolw %b[shift], %w[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
}
#ifndef __MSVCRT__
- static __inline__ __attribute__((always_inline)) unsigned int _rotl(const unsigned int value, const int shift)
+ static __inline__ __attribute__((always_inline)) unsigned int _rotl(unsigned int value, int shift)
{
unsigned long retval;
__asm__("roll %b[shift], %k[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
return retval;
}
- static __inline__ __attribute__((always_inline)) unsigned long _rotr(const unsigned int value, const unsigned char shift)
+ static __inline__ __attribute__((always_inline)) unsigned int _rotr(unsigned int value, int shift)
{
unsigned long retval;
__asm__("rorl %b[shift], %k[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
}
#endif
- static __inline__ __attribute__((always_inline)) unsigned char _rotr8(const unsigned char value, const unsigned char shift)
+ static __inline__ __attribute__((always_inline)) unsigned char _rotr8(unsigned char value, unsigned char shift)
{
unsigned char retval;
__asm__("rorb %b[shift], %b[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
return retval;
}
- static __inline__ __attribute__((always_inline)) unsigned short _rotr16(const unsigned short value, const unsigned char shift)
+ static __inline__ __attribute__((always_inline)) unsigned short _rotr16(unsigned short value, unsigned char shift)
{
unsigned short retval;
__asm__("rorw %b[shift], %w[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
__asm__ __volatile__("sidt %0" : : "m"(*(short*)Destination) : "memory");
}
+ #ifdef __cplusplus
+ }
+ #endif
+
#endif /* KJK_INTRIN_X86_H_ */
/* EOF */
LIST_ENTRY ProcessLocksList;
DWORD EntryCount;
DWORD ContentionCount;
- DWORD Spare [2];
+//#ifdef __WINESRC__ //not all wine code is marked so
+ DWORD_PTR Spare[8/sizeof(DWORD_PTR)];/* in Wine they store a string here */
+//#else
+ //WORD SpareWORD;
+//#endif
} CRITICAL_SECTION_DEBUG,*PCRITICAL_SECTION_DEBUG;
typedef struct _CRITICAL_SECTION {
PCRITICAL_SECTION_DEBUG DebugInfo;
DWORD dwPageSize;
PVOID lpMinimumApplicationAddress;
PVOID lpMaximumApplicationAddress;
- DWORD dwActiveProcessorMask;
+ DWORD_PTR dwActiveProcessorMask;
DWORD dwNumberOfProcessors;
DWORD dwProcessorType;
DWORD dwAllocationGranularity;
HANDLE ulAssemblyRosterIndex;
} ACTCTX_SECTION_KEYED_DATA,*PACTCTX_SECTION_KEYED_DATA;
typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA;
+ typedef struct _ACTIVATION_CONTEXT_BASIC_INFORMATION {
+ HANDLE hActCtx;
+ DWORD dwFlags;
+ } ACTIVATION_CONTEXT_BASIC_INFORMATION, *PACTIVATION_CONTEXT_BASIC_INFORMATION;
+ typedef const struct _ACTIVATION_CONTEXT_BASIC_INFORMATION *PCACTIVATION_CONTEXT_BASIC_INFORMATION;
typedef enum {
LowMemoryResourceNotification ,
HighMemoryResourceNotification
BOOL WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
BOOL WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
FARPROC WINAPI GetProcAddress(HINSTANCE,LPCSTR);
-BOOL WINAPI GetProcessAffinityMask(HANDLE,PDWORD,PDWORD);
+BOOL WINAPI GetProcessAffinityMask(HANDLE,PDWORD_PTR,PDWORD_PTR);
#if (_WIN32_WINNT >= 0x0502)
BOOL WINAPI GetProcessHandleCount(HANDLE,PDWORD);
#endif
BOOL WINAPI GlobalUnWire(HGLOBAL); /* Obsolete: Has no effect. */
PVOID WINAPI GlobalWire(HGLOBAL); /* Obsolete: Has no effect. */
#define HasOverlappedIoCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
-PVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD);
+PVOID WINAPI HeapAlloc(HANDLE,DWORD,SIZE_T);
SIZE_T WINAPI HeapCompact(HANDLE,DWORD);
HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD);
BOOL WINAPI HeapDestroy(HANDLE);
BOOL WINAPI ReadFile(HANDLE,PVOID,DWORD,PDWORD,LPOVERLAPPED);
BOOL WINAPI ReadFileEx(HANDLE,PVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
BOOL WINAPI ReadFileScatter(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED);
-BOOL WINAPI ReadProcessMemory(HANDLE,PCVOID,PVOID,DWORD,PDWORD);
+BOOL WINAPI ReadProcessMemory(HANDLE,PCVOID,PVOID,SIZE_T,SIZE_T*);
#if (_WIN32_WINNT >= 0x0600)
VOID WINAPI RecoveryFinished(BOOL);
HRESULT WINAPI RecoveryInProgress(OUT PBOOL);
BOOL WINAPI SetNamedPipeHandleState(HANDLE,PDWORD,PDWORD,PDWORD);
BOOL WINAPI SetPriorityClass(HANDLE,DWORD);
BOOL WINAPI SetPrivateObjectSecurity(SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR *,PGENERIC_MAPPING,HANDLE);
-BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD);
+BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD_PTR);
BOOL WINAPI SetProcessPriorityBoost(HANDLE,BOOL);
BOOL WINAPI SetProcessShutdownParameters(DWORD,DWORD);
BOOL WINAPI SetProcessWorkingSetSize(HANDLE,SIZE_T,SIZE_T);
#ifdef _X86_
#define UNALIGNED
#else
+#undef UNALIGNED
#define UNALIGNED
#endif
typedef WORD LANGID;
#ifdef __GNUC__
#define _HAVE_INT64
- #define _INTEGRAL_MAX_BITS 64
+ #ifndef _INTEGRAL_MAX_BITS
+ # define _INTEGRAL_MAX_BITS 64
+ #endif
#undef __int64
#define __int64 long long
#elif defined(__WATCOMC__) && (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64 )
#define SECTION_QUERY 1
#define SECTION_MAP_EXECUTE 8
#define SECTION_ALL_ACCESS 0xf001f
+ #define WRITE_WATCH_FLAG_RESET 0x01
#ifndef __NTDDK_H
#define MESSAGE_RESOURCE_UNICODE 1
#endif
#define IMAGE_REL_BASED_HIGHLOW 3
#define IMAGE_REL_BASED_HIGHADJ 4
#define IMAGE_REL_BASED_MIPS_JMPADDR 5
+#define IMAGE_REL_BASED_MIPS_JMPADDR16 9
+#define IMAGE_REL_BASED_IA64_IMM64 9
+#define IMAGE_REL_BASED_DIR64 10
#define IMAGE_ARCHIVE_START_SIZE 8
#define IMAGE_ARCHIVE_START "!<arch>\n"
#define IMAGE_ARCHIVE_END "`\n"
#define RUNTIME_FUNCTION_INDIRECT 0x1
- typedef struct _RUNTIME_FUNCTION {
+typedef struct _RUNTIME_FUNCTION {
DWORD BeginAddress;
DWORD EndAddress;
DWORD UnwindData;
- } RUNTIME_FUNCTION,*PRUNTIME_FUNCTION;
+} RUNTIME_FUNCTION,*PRUNTIME_FUNCTION;
- typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD64 ControlPc,PVOID Context);
- typedef DWORD (*POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)(HANDLE Process,PVOID TableAddress,PDWORD Entries,PRUNTIME_FUNCTION *Functions);
+#define UNWIND_HISTORY_TABLE_SIZE 12
- #define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
+typedef struct _UNWIND_HISTORY_TABLE_ENTRY
+{
+ ULONG64 ImageBase;
+ PRUNTIME_FUNCTION FunctionEntry;
+} UNWIND_HISTORY_TABLE_ENTRY, *PUNWIND_HISTORY_TABLE_ENTRY;
+
+typedef struct _UNWIND_HISTORY_TABLE
+{
+ ULONG Count;
+ UCHAR Search;
+ ULONG64 LowAddress;
+ ULONG64 HighAddress;
+ UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
+} UNWIND_HISTORY_TABLE, *PUNWIND_HISTORY_TABLE;
+
+typedef PRUNTIME_FUNCTION (*PGET_RUNTIME_FUNCTION_CALLBACK)(DWORD64 ControlPc,PVOID Context);
+typedef DWORD (*POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)(HANDLE Process,PVOID TableAddress,PDWORD Entries,PRUNTIME_FUNCTION *Functions);
+
+#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
NTSYSAPI
VOID
#elif defined (_M_AMD64)
FORCEINLINE PVOID GetCurrentFiber(VOID)
{
+ #ifdef NONAMELESSUNION
+ return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB, DUMMYUNIONNAME.FiberData));
+ #else
return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB, FiberData));
+ #endif
}
#elif defined (_M_ARM)
PVOID WINAPI GetCurrentFiber(VOID);
}
#endif
#elif defined (_M_AMD64)
-#define MemoryBarrier()
+#define MemoryBarrier __faststorefence
#elif defined(_M_PPC)
#define MemoryBarrier()
#elif defined(_M_ARM)
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
+#ifdef _M_AMD64
+#include "pseh2_64.h"
+#else
#ifndef KJK_PSEH2_H_
#define KJK_PSEH2_H_
{
#endif
- extern void __cdecl _SEH2EnterFrame(_SEH2Frame_t *);
+ extern __attribute__((returns_twice)) void __cdecl _SEH2EnterFrame(_SEH2Frame_t *);
extern void __cdecl _SEH2LeaveFrame(void);
extern void __cdecl _SEH2Return(void);
/* GCC doesn't know that this equals zero */
#define __SEH_VOLATILE_ZERO ({ int zero = 0; __asm__ __volatile__("#" : "+g" (zero)); zero; })
- /* GCC believes this is setjmp */
- #define __SEH_PRETEND_SETJMP() (_SEH2PretendSetjmp(), 0)
-
#define __SEH_VOLATILE_FALSE __builtin_expect(__SEH_VOLATILE_ZERO, 0)
#define __SEH_VOLATILE_TRUE __builtin_expect(!__SEH_VOLATILE_ZERO, 1)
#define ___SEH_STRINGIFY(X_) # X_
#define __SEH_STRINGIFY(X_) ___SEH_STRINGIFY(X_)
- static
- __inline__
- __attribute__((returns_twice))
- __attribute__((always_inline))
- void _SEH2PretendSetjmp(void)
- {
- }
-
#define __SEH_FORCE_NEST \
__asm__ __volatile__("#%0" : : "r" (&_SEHFrame))
#define __SEH_RETURN_FINALLY() return
#define __SEH_BEGIN_TRY \
- if(!__SEH_PRETEND_SETJMP()) \
{ \
__label__ _SEHEndTry; \
\
#endif
+#endif
/* EOF */
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Cleanup after exception */
- IopCleanupAfterException(FileObject, Irp, Event, NULL);
+ IopCleanupAfterException(FileObject, Irp, EventObject, NULL);
Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Cleanup after exception */
- IopCleanupAfterException(FileObject, Irp, Event, NULL);
+ IopCleanupAfterException(FileObject, Irp, EventObject, NULL);
Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Allocating failed, clean up */
- IopCleanupAfterException(FileObject, Irp, NULL, Event);
+ IopCleanupAfterException(FileObject, Irp, EventObject, NULL);
Status = _SEH2_GetExceptionCode();
}
_SEH2_END;
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Allocating failed, clean up */
- IopCleanupAfterException(FileObject, Irp, Event, NULL);
+ IopCleanupAfterException(FileObject, Irp, EventObject, NULL);
Status = _SEH2_GetExceptionCode();
_SEH2_YIELD(return Status);
}
/* Set the Data */
Context->Key = CompletionInfo->Key;
Context->Port = Queue;
- if (InterlockedCompareExchangePointer(&FileObject->
+ if (InterlockedCompareExchangePointer((PVOID*)&FileObject->
CompletionContext,
Context,
NULL))
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Allocating failed, clean up */
- IopCleanupAfterException(FileObject, Irp, Event, NULL);
+ IopCleanupAfterException(FileObject, Irp, EventObject, NULL);
Status = _SEH2_GetExceptionCode();
_SEH2_YIELD(return Status);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Allocating failed, clean up */
- IopCleanupAfterException(FileObject, Irp, Event, NULL);
+ IopCleanupAfterException(FileObject, Irp, EventObject, NULL);
Status = _SEH2_GetExceptionCode();
_SEH2_YIELD(return Status);
}
return "static";
case Win32DLL:
case Win32OCX:
- return "msvcrt";
+ return "ntdll";
case NativeDLL:
case NativeCUI:
return "ntdll";
result = "_";
result += entrypoint;
+
+ if (Environment::GetArch() == "amd64")
+ {
+ size_t at_index = result.find_last_of( '@' );
+ if ( at_index != result.npos )
+ return result.substr (0, at_index );
+ }
+
return result;
}
}
else if (is_ptr(t) || is_conformant_array(t))
{
- size = sizeof(void *);
+ #if defined(TARGET_i386)
+ size = 4;
+ #elif defined(TARGET_amd64)
+ size = 8;
+ #else
+ #error Unsupported CPU
+ #endif
if (size > *align) *align = size;
}
else switch (t->type)
}
if (phase == PHASE_MARSHAL)
- print_file(file, indent, "MIDL_memset(_StubMsg.Buffer, 0, (0x%x - (long)_StubMsg.Buffer) & 0x%x);\n", alignment, alignment - 1);
- print_file(file, indent, "_StubMsg.Buffer = (unsigned char *)(((long)_StubMsg.Buffer + %u) & ~0x%x);\n",
+ print_file(file, indent, "MIDL_memset(_StubMsg.Buffer, 0, (0x%x - (size_t)_StubMsg.Buffer) & 0x%x);\n", alignment, alignment - 1);
+ print_file(file, indent, "_StubMsg.Buffer = (unsigned char *)(((size_t)_StubMsg.Buffer + %u) & ~0x%x);\n",
alignment - 1, alignment - 1);
if (phase == PHASE_MARSHAL)