diff --git a/reactos/include/objbase.h b/reactos/include/objbase.h new file mode 100644 index 00000000000..76ee174e912 --- /dev/null +++ b/reactos/include/objbase.h @@ -0,0 +1,25 @@ +/* $Id $ + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#if (__W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5) +#ifdef DBG +#undef DBG +#define DBG 1 +#endif /* defined(DBG) */ +#endif /* __W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5 */ + +#include_next diff --git a/reactos/include/wine/commctrl.h b/reactos/include/wine/commctrl.h index 44215b982cc..4182c5d70ee 100644 --- a/reactos/include/wine/commctrl.h +++ b/reactos/include/wine/commctrl.h @@ -1,3 +1,12 @@ +/* $Id $ + * + * Compatibility header + * + * This header is wrapper to allow compilation of Wine DLLs under ReactOS + * build system. It contains definitions commonly refered to as Wineisms + * and definitions that are missing in w32api. + */ + #include_next #ifndef __WINE_COMMCTRL_H @@ -51,4 +60,58 @@ typedef LPFINDINFOW LPLVFINDINFOW; #define FLATSB_CLASSA "flatsb_class32" +#if (__W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5) + +#if (_WIN32_IE >= 0x0500) +#if (_WIN32_WINNT >= 0x0501) +#define COMCTL32_VERSION 6 +#else +#define COMCTL32_VERSION 5 +#endif +#endif + +#define DPAS_SORTED 1 +#define DPAS_INSERTBEFORE 2 +#define DPAS_INSERTAFTER 4 + +#if (_WIN32_IE >= 0x0400) +#define TCIS_HIGHLIGHTED 2 +#endif + +typedef struct _DSA *HDSA; +typedef struct _DPA *HDPA; +typedef INT (CALLBACK *PFNDPAENUMCALLBACK)(PVOID,PVOID); +typedef INT (CALLBACK *PFNDSAENUMCALLBACK)(PVOID,PVOID); +typedef INT (CALLBACK *PFNDPACOMPARE)(PVOID,PVOID,LPARAM); +#if (_WIN32_WINNT >= 0x0501) +typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND,UINT,WPARAM,LPARAM,UINT_PTR,DWORD_PTR); +#endif /* _WIN32_WINNT >= 0x0501 */ + +HDSA WINAPI DSA_Create(INT,INT); +BOOL WINAPI DSA_Destroy(HDSA); +VOID WINAPI DSA_DestroyCallback(HDSA,PFNDSAENUMCALLBACK,PVOID); +PVOID WINAPI DSA_GetItemPtr(HDSA,INT); +INT WINAPI DSA_InsertItem(HDSA,INT,PVOID); + +HDPA WINAPI DPA_Create(INT); +BOOL WINAPI DPA_Destroy(HDPA); +PVOID WINAPI DPA_DeletePtr(HDPA,INT); +BOOL WINAPI DPA_DeleteAllPtrs(HDPA); +VOID WINAPI DPA_EnumCallback(HDPA,PFNDPAENUMCALLBACK,PVOID); +VOID WINAPI DPA_DestroyCallback(HDPA,PFNDPAENUMCALLBACK,PVOID); +BOOL WINAPI DPA_SetPtr(HDPA,INT,PVOID); +INT WINAPI DPA_InsertPtr(HDPA,INT,PVOID); +PVOID WINAPI DPA_GetPtr(HDPA,INT_PTR); +BOOL WINAPI DPA_Sort(HDPA,PFNDPACOMPARE,LPARAM); +INT WINAPI DPA_Search(HDPA,PVOID,INT,PFNDPACOMPARE,LPARAM,UINT); +BOOL WINAPI Str_SetPtrW(LPWSTR*,LPCWSTR); + +#if (_WIN32_WINNT >= 0x0501) +BOOL WINAPI SetWindowSubclass(HWND,SUBCLASSPROC,UINT_PTR,DWORD_PTR); +BOOL WINAPI RemoveWindowSubclass(HWND,SUBCLASSPROC,UINT_PTR); +LRESULT WINAPI DefSubclassProc(HWND,UINT,WPARAM,LPARAM); +#endif /* _WIN32_WINNT >= 0x0501 */ + +#endif /* __W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5 */ + #endif /* __WINE_COMMCTRL_H */ diff --git a/reactos/include/wine/objbase.h b/reactos/include/wine/objbase.h index d46d9751e51..1c32e60ca51 100644 --- a/reactos/include/wine/objbase.h +++ b/reactos/include/wine/objbase.h @@ -19,6 +19,11 @@ #define WINOLEAPI STDAPI #define WINOLEAPI_(type) STDAPI_(type) +#ifdef DBG +#undef DBG +#define DBG 1 +#endif + #include_next #ifndef _OBJBASE_H_ diff --git a/reactos/include/wine/olectl.h b/reactos/include/wine/olectl.h new file mode 100644 index 00000000000..0eeee70ec56 --- /dev/null +++ b/reactos/include/wine/olectl.h @@ -0,0 +1,24 @@ +/* $Id $ + * + * Compatibility header + * + * This header is wrapper to allow compilation of Wine DLLs under ReactOS + * build system. It contains definitions commonly refered to as Wineisms + * and definitions that are missing in w32api. + */ + +#include_next + +#ifndef __WINE_OLECTL_H +#define __WINE_OLECTL_H + +#include + +#if (__W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5) + +#include + +#endif /* __W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5 */ + + +#endif /* __WINE_GDI_H */ diff --git a/reactos/include/wine/winbase.h b/reactos/include/wine/winbase.h new file mode 100644 index 00000000000..656ac521e05 --- /dev/null +++ b/reactos/include/wine/winbase.h @@ -0,0 +1,25 @@ +/* $Id $ + * + * Compatibility header + * + * This header is wrapper to allow compilation of Wine DLLs under ReactOS + * build system. It contains definitions commonly refered to as Wineisms + * and definitions that are missing in w32api. + */ + +#include_next + +#ifndef __WINE_WINBASE_H +#define __WINE_WINBASE_H + +#include + +#if (__W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5) + +#if (_WIN32_WINNT >= 0x0500) +UINT WINAPI GetSystemWindowsDirectoryW(LPWSTR,UINT); +#endif + +#endif /* __W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5 */ + +#endif /* __WINE_WINSPOOL_H */ diff --git a/reactos/include/wine/winnt.h b/reactos/include/wine/winnt.h index 3ea44a0817b..c6623cdc730 100644 --- a/reactos/include/wine/winnt.h +++ b/reactos/include/wine/winnt.h @@ -57,6 +57,14 @@ static inline struct _TEB * NtCurrentTeb(void) return pTeb; } +#if (_WIN32_WINNT >= 0x0500) +typedef LONG (WINAPI *PVECTORED_EXCEPTION_HANDLER)(PEXCEPTION_POINTERS); #endif +/* Fix buggy definition in w32api 2.4 */ +#undef INVALID_FILE_ATTRIBUTES +#define INVALID_FILE_ATTRIBUTES ((DWORD) (-1)) + +#endif /* __W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5 */ + #endif /* __WINE_WINNT_H */ diff --git a/reactos/include/wine/winspool.h b/reactos/include/wine/winspool.h new file mode 100644 index 00000000000..2e1d09ecfa5 --- /dev/null +++ b/reactos/include/wine/winspool.h @@ -0,0 +1,26 @@ +/* $Id $ + * + * Compatibility header + * + * This header is wrapper to allow compilation of Wine DLLs under ReactOS + * build system. It contains definitions commonly refered to as Wineisms + * and definitions that are missing in w32api. + */ + +#include_next + +#ifndef WINE_WINSPOOL_H +#define WINE_WINSPOOL_H + +#include + +#if (__W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5) + +#if _WIN32_WINNT >= 0x0500 +BOOL WINAPI GetDefaultPrinterA(LPSTR,LPDWORD); +BOOL WINAPI GetDefaultPrinterW(LPWSTR,LPDWORD); +#endif + +#endif /* __W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5 */ + +#endif /* WINE_WINSPOOL_H */ diff --git a/reactos/include/wine/winternl.h b/reactos/include/wine/winternl.h index 41046674492..6b8e07a3974 100644 --- a/reactos/include/wine/winternl.h +++ b/reactos/include/wine/winternl.h @@ -22,6 +22,7 @@ #define __WINE_WINTERNAL_H #include +#include #ifdef __cplusplus extern "C" { diff --git a/reactos/include/winuser.h b/reactos/include/winuser.h new file mode 100644 index 00000000000..856bbdaeb4f --- /dev/null +++ b/reactos/include/winuser.h @@ -0,0 +1,23 @@ +/* $Id $ + * + * Compatibility header + */ + +#ifndef REACTOS_WINUSER_H +#define REACTOS_WINUSER_H + +#include + +#if (__W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5) + +#ifdef WINVER +#undef WINVER +#endif + +#define WINVER 0x0501 + +#endif /* __W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5 */ + +#include_next + +#endif /* REACTOS_WINUSER_H */ diff --git a/reactos/lib/ws2_32/misc/dllmain.c b/reactos/lib/ws2_32/misc/dllmain.c index 25eba0f87ac..94bd5f6b941 100644 --- a/reactos/lib/ws2_32/misc/dllmain.c +++ b/reactos/lib/ws2_32/misc/dllmain.c @@ -7,6 +7,7 @@ * REVISIONS: * CSH 01/09-2000 Created */ +#include #include #include #include @@ -394,8 +395,13 @@ bind( return SOCKET_ERROR; } +#if (__W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5) + Status = Provider->ProcTable.lpWSPBind( + s, (CONST LPSOCKADDR) name, namelen, &Errno); +#else Status = Provider->ProcTable.lpWSPBind( s, name, namelen, &Errno); +#endif /* __W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5 */ DereferenceProviderByPointer(Provider); @@ -538,8 +544,13 @@ WSAConnect( return SOCKET_ERROR; } +#if (__W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5) + Status = Provider->ProcTable.lpWSPConnect( + s, (CONST LPSOCKADDR) name, namelen, lpCallerData, lpCalleeData, lpSQOS, lpGQOS, &Errno); +#else Status = Provider->ProcTable.lpWSPConnect( s, name, namelen, lpCallerData, lpCalleeData, lpSQOS, lpGQOS, &Errno); +#endif DereferenceProviderByPointer(Provider); diff --git a/reactos/lib/ws2_32/misc/sndrcv.c b/reactos/lib/ws2_32/misc/sndrcv.c index b92562c000d..0c31b80cb52 100644 --- a/reactos/lib/ws2_32/misc/sndrcv.c +++ b/reactos/lib/ws2_32/misc/sndrcv.c @@ -7,6 +7,8 @@ * REVISIONS: * CSH 01/09-2000 Created */ + +#include #include #include #include @@ -297,9 +299,15 @@ WSASendTo( assert(Provider->ProcTable.lpWSPSendTo); +#if (__W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5) + Code = Provider->ProcTable.lpWSPSendTo(s, lpBuffers, dwBufferCount, + lpNumberOfBytesSent, dwFlags, (CONST LPSOCKADDR) lpTo, iToLen, lpOverlapped, + lpCompletionRoutine, NULL /* lpThreadId */, &Errno); +#else Code = Provider->ProcTable.lpWSPSendTo(s, lpBuffers, dwBufferCount, lpNumberOfBytesSent, dwFlags, lpTo, iToLen, lpOverlapped, lpCompletionRoutine, NULL /* lpThreadId */, &Errno); +#endif /* __W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5 */ DereferenceProviderByPointer(Provider);