Author: tkreuzer
Date: Wed Jul 23 17:49:16 2008
New Revision: 34706
URL:
http://svn.reactos.org/svn/reactos?rev=34706&view=rev
Log:
- fix ENUMRESLANGPROC, ENUMRESNAMEPROC and ENUMRESTYPEPROC
- add Interlocked functions for pointers
Modified:
branches/ros-amd64-bringup/reactos/include/psdk/winbase.h
Modified: branches/ros-amd64-bringup/reactos/include/psdk/winbase.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/psdk/winbase.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/psdk/winbase.h [iso-8859-1] Wed Jul 23
17:49:16 2008
@@ -23,7 +23,7 @@
#define FILE_SYSTEM_NOT_SUPPORT 6
#define FILE_USER_DISALLOWED 7
#define FILE_READ_ONLY 8
-#define FILE_DIR_DISALOWED 9
+#define FILE_DIR_DISALOWED 9
#define COMMPROP_INITIALIZED 0xE73CF52E
#define SP_SERIALCOMM 1
@@ -1081,12 +1081,12 @@
typedef DWORD(WINAPI
*LPPROGRESS_ROUTINE)(LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,DWORD,DWORD,HANDLE,HANDLE,LPVOID);
typedef void(WINAPI *LPFIBER_START_ROUTINE)(PVOID);
typedef VOID (WINAPI *PFLS_CALLBACK_FUNCTION)(PVOID);
-typedef BOOL(CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG);
-typedef BOOL(CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG);
-typedef BOOL(CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG);
-typedef BOOL(CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG);
-typedef BOOL(CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG);
-typedef BOOL(CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG);
+typedef BOOL(CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG_PTR);
+typedef BOOL(CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG_PTR);
+typedef BOOL(CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG_PTR);
+typedef BOOL(CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG_PTR);
+typedef BOOL(CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG_PTR);
+typedef BOOL(CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG_PTR);
typedef void(CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPOVERLAPPED);
typedef LONG(CALLBACK *PTOP_LEVEL_EXCEPTION_FILTER)(LPEXCEPTION_POINTERS);
typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
@@ -1707,14 +1707,23 @@
#ifndef __INTERLOCKED_DECLARED
#define __INTERLOCKED_DECLARED
LONG WINAPI InterlockedCompareExchange(IN OUT LONG volatile *,LONG,LONG);
-/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
-#define InterlockedCompareExchangePointer(d,e,c) \
- (PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c))
LONG WINAPI InterlockedDecrement(IN OUT LONG volatile *);
LONG WINAPI InterlockedExchange(IN OUT LONG volatile *,LONG);
-/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
-#define InterlockedExchangePointer(t,v) \
+#if defined(_WIN64)
+ /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
+ #define InterlockedExchangePointer(t,v) \
+ (PVOID)InterlockedExchange64((LONGLONG*)(t),(LONGLONG)(v))
+ /* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
+ #define InterlockedCompareExchangePointer(d,e,c) \
+ (PVOID)InterlockedCompareExchange64((LONGLONG*)(d),(LONGLONG)(e),(LONGLONG)(c))
+#else
+ /* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
+ #define InterlockedExchangePointer(t,v) \
(PVOID)InterlockedExchange((LPLONG)(t),(LONG)(v))
+ /* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
+ #define InterlockedCompareExchangePointer(d,e,c) \
+ (PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c))
+#endif
LONG WINAPI InterlockedExchangeAdd(IN OUT LONG volatile *,LONG);
#if (_WIN32_WINNT >= 0x0501)
PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER);