Allow building with released 2.4 w32api and current pre-2.5 CVS w32api

svn path=/trunk/; revision=7667
This commit is contained in:
Gé van Geldorp 2004-01-15 22:21:36 +00:00
parent b125070d51
commit 304b25bbb6
11 changed files with 219 additions and 0 deletions

25
reactos/include/objbase.h Normal file
View file

@ -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 <objbase.h>

View file

@ -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 <commctrl.h>
#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 */

View file

@ -19,6 +19,11 @@
#define WINOLEAPI STDAPI
#define WINOLEAPI_(type) STDAPI_(type)
#ifdef DBG
#undef DBG
#define DBG 1
#endif
#include_next <objbase.h>
#ifndef _OBJBASE_H_

View file

@ -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 <olectl.h>
#ifndef __WINE_OLECTL_H
#define __WINE_OLECTL_H
#include <w32api.h>
#if (__W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5)
#include <ocidl.h>
#endif /* __W32API_MAJOR_VERSION < 2 || __W32API_MINOR_VERSION < 5 */
#endif /* __WINE_GDI_H */

View file

@ -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 <winbase.h>
#ifndef __WINE_WINBASE_H
#define __WINE_WINBASE_H
#include <w32api.h>
#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 */

View file

@ -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 */

View file

@ -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 <winspool.h>
#ifndef WINE_WINSPOOL_H
#define WINE_WINSPOOL_H
#include <w32api.h>
#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 */

View file

@ -22,6 +22,7 @@
#define __WINE_WINTERNAL_H
#include <windef.h>
#include <wine/winnt.h>
#ifdef __cplusplus
extern "C" {

23
reactos/include/winuser.h Normal file
View file

@ -0,0 +1,23 @@
/* $Id $
*
* Compatibility header
*/
#ifndef REACTOS_WINUSER_H
#define REACTOS_WINUSER_H
#include <w32api.h>
#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 <winuser.h>
#endif /* REACTOS_WINUSER_H */

View file

@ -7,6 +7,7 @@
* REVISIONS:
* CSH 01/09-2000 Created
*/
#include <w32api.h>
#include <ws2_32.h>
#include <catalog.h>
#include <handle.h>
@ -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);

View file

@ -7,6 +7,8 @@
* REVISIONS:
* CSH 01/09-2000 Created
*/
#include <w32api.h>
#include <ws2_32.h>
#include <catalog.h>
#include <handle.h>
@ -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);