Re: ReactOS W32API merge

"Luke Dunstan" <[email protected]> Sun, 18 Apr 2004 14:15:03 +0800
Newsgroups gmane.comp.gnu.mingw.patches
Message-ID <[email protected]>
1. I've added #defines for NMTBGETINFOTIP
2. What is this CreateUserProfileW function? I don't see it documented and
it's not in userenv.def.
3. I think WM_MOUSELAST needs to be defined for all Windows versions. It
could be defined to 525 for >=Win2K and 522 otherwise, but setting it to 525
always would probably be okay (not sure). Comments?

I will commit after these issues are resolved.

Luke

----- Original Message ----- 
From: "Filip Navara" <xnavara-VIXq6x/[email protected]>
To: <[email protected]>
Sent: Wednesday, April 14, 2004 3:27 AM
Subject: [MinGW-patches] ReactOS W32API merge


> Merge most of the changes from ReactOS copy of w32api.
>
> - Filip
>
>


----------------------------------------------------------------------------
----


> --- include/userenv.h Sat Mar  9 08:04:10 2002
> +++ include/userenv.h Sun Mar 14 19:15:08 2004
> @@ -1,5 +1,6 @@
>  #ifndef _USERENV_H
>  #define _USERENV_H
> +
>  #if __GNUC__ >=3
>  #pragma GCC system_header
>  #endif
> @@ -29,29 +35,42 @@
>    LPWSTR lpPolicyPath;
>    HANDLE hProfile;
>  } PROFILEINFOW, *LPPROFILEINFOW;
> +
> +BOOL WINAPI CreateUserProfileW(PSID,LPCWSTR);
>  BOOL WINAPI LoadUserProfileA(HANDLE,LPPROFILEINFOA);
>  BOOL WINAPI LoadUserProfileW(HANDLE,LPPROFILEINFOW);
>  BOOL WINAPI UnloadUserProfile(HANDLE,HANDLE);
> +BOOL WINAPI GetAllUsersProfileDirectoryA(LPSTR,LPDWORD);
> +BOOL WINAPI GetAllUsersProfileDirectoryW(LPWSTR,LPDWORD);
> +BOOL WINAPI GetDefaultUserProfileDirectoryA(LPSTR,LPDWORD);
> +BOOL WINAPI GetDefaultUserProfileDirectoryW(LPWSTR,LPDWORD);
>  BOOL WINAPI GetProfilesDirectoryA(LPSTR,LPDWORD);
>  BOOL WINAPI GetProfilesDirectoryW(LPWSTR,LPDWORD);
>  BOOL WINAPI GetUserProfileDirectoryA(HANDLE,LPSTR,LPDWORD);
>  BOOL WINAPI GetUserProfileDirectoryW(HANDLE,LPWSTR,LPDWORD);
>  BOOL WINAPI CreateEnvironmentBlock(LPVOID*,HANDLE,BOOL);
>  BOOL WINAPI DestroyEnvironmentBlock(LPVOID);
> +
>  #ifdef UNICODE
>  typedef PROFILEINFOW PROFILEINFO;
>  typedef LPPROFILEINFOW LPPROFILEINFO;
>  #define LoadUserProfile  LoadUserProfileW
> +#define GetAllUsersProfileDirectory  GetAllUsersProfileDirectoryW
> +#define GetDefaultUserProfileDirectory  GetDefaultUserProfileDirectoryW
>  #define GetProfilesDirectory  GetProfilesDirectoryW
>  #define GetUserProfileDirectory  GetUserProfileDirectoryW
>  #else
>  typedef PROFILEINFOA PROFILEINFO;
>  typedef LPPROFILEINFOA LPPROFILEINFO;
>  #define LoadUserProfile  LoadUserProfileA
> +#define GetAllUsersProfileDirectory  GetAllUsersProfileDirectoryA
> +#define GetDefaultUserProfileDirectory  GetDefaultUserProfileDirectoryA
>  #define GetProfilesDirectory  GetProfilesDirectoryA
>  #define GetUserProfileDirectory  GetUserProfileDirectoryA
>  #endif
> +
>  #ifdef __cplusplus
>  }
>  #endif
> +
>  #endif /* _USERENV_H */
>


----------------------------------------------------------------------------
----


> 2004-04-13  Eric Kohl  <[email protected]>
>
> * include/userenv.h (CreateUserProfileW,
> GetAllUsersProfileDirectory[AW], GetDefaultUserProfileDirectory[AW]):
> Declare.
>


----------------------------------------------------------------------------
----




> --- include/winbase.h Thu Nov 13 08:43:08 2003
> +++ include/winbase.h Fri Apr  9 17:22:40 2004
> @@ -1369,6 +1369,7 @@
>  DWORD WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*);
>  BOOL WINAPI GetHandleInformation(HANDLE,PDWORD);
>  BOOL WINAPI
GetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWO
RD,PDWORD);
> +DWORD WINAPI GetLastError(void);
>  DWORD WINAPI GetLengthSid(PSID);
>  void WINAPI GetLocalTime(LPSYSTEMTIME);
>  DWORD WINAPI GetLogicalDrives(void);
> @@ -1562,7 +1563,7 @@
>  DWORD WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION,DWORD);
>  BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
>  BOOL WINAPI InitializeSid (PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
> -#if (_WIN32_WINNT >= 0x0501)
> +#if !defined(__WINDDK_H) && _WIN32_WINNT >= 0x0501
>  VOID WINAPI InitializeSListHead(PSLIST_HEADER);
>  #endif
>  #ifndef __INTERLOCKED_DECLARED
> --- include/winuser.h Sun Mar 28 12:16:10 2004
> +++ include/winuser.h Fri Apr  9 15:39:04 2004
> @@ -534,6 +534,7 @@
>  #define SB_RIGHT 7
>  #define SB_BOTTOM 7
>  #define SB_TOP 6
> +#define IS_INTRESOURCE(i) (((ULONG_PTR)(i) >> 16) == 0)
>  #define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
>  #define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
>  #ifndef XFree86Server
> @@ -743,6 +744,9 @@
>  #define MB_NOFOCUS 0x00008000
>  #define MB_TYPEMASK 15
>  #define MB_TOPMOST 0x40000
> +#if (WINVER >= 0x0500)
> +#define MB_CANCELTRYCONTINUE 6
> +#endif
>
>  #define IDOK 1
>  #define IDCANCEL 2
> @@ -1203,6 +1207,41 @@
>  #define SPI_SETTOGGLEKEYS 53
>  #define SPI_SETWHEELSCROLLLINES 105
>  #define SPI_SETWORKAREA 47
> +#if (WINVER >= 0x0500)
> +#define SPI_GETDESKWALLPAPER 115
> +#define SPI_GETMOUSESPEED 112
> +#define SPI_GETSCREENSAVERRUNNING 114
> +#define SPI_GETACTIVEWINDOWTRACKING 0x1000
> +#define SPI_GETACTIVEWNDTRKZORDER 0x100C
> +#define SPI_GETCOMBOBOXANIMATION 0x1004
> +#define SPI_GETCURSORSHADOW 0x101A
> +#define SPI_GETGRADIENTCAPTIONS 0x1008
> +#define SPI_GETHOTTRACKING 0x100E
> +#define SPI_GETKEYBOARDCUES 0x100A
> +#define SPI_GETLISTBOXSMOOTHSCROLLING 0x1006
> +#define SPI_GETMENUANIMATION 0x1002
> +#define SPI_GETMENUFADE 0x1012
> +#define SPI_GETMENUUNDERLINES 0x100A
> +#define SPI_GETSELECTIONFADE 0x1014
> +#define SPI_GETTOOLTIPANIMATION 0x1016
> +#define SPI_GETTOOLTIPFADE 0x1018
> +#define SPI_SETACTIVEWINDOWTRACKING 0x1001
> +#define SPI_SETACTIVEWNDTRKZORDER 0x100D
> +#define SPI_SETCOMBOBOXANIMATION 0x1005
> +#define SPI_SETCURSORSHADOW 0x101B
> +#define SPI_SETGRADIENTCAPTIONS 0x1009
> +#define SPI_SETHOTTRACKING 0x100F
> +#define SPI_SETKEYBOARDCUES 0x100B
> +#define SPI_SETLISTBOXSMOOTHSCROLLING 0x1007
> +#define SPI_SETMENUANIMATION 0x1003
> +#define SPI_SETMENUFADE 0x1013
> +#define SPI_SETMENUUNDERLINES 0x100B
> +#define SPI_SETMOUSESPEED 113
> +#define SPI_SETSELECTIONFADE 0x1015
> +#define SPI_SETTOOLTIPANIMATION 0x1017
> +#define SPI_SETTOOLTIPFADE 0x1019
> +#endif
> +
>  #define SPIF_UPDATEINIFILE 1
>  #define SPIF_SENDWININICHANGE 2
>  #define SPIF_SENDCHANGE 2
> @@ -1314,6 +1353,11 @@
>  #define WM_NCMBUTTONDBLCLK 169
>  #define WM_NCMBUTTONDOWN 167
>  #define WM_NCMBUTTONUP 168
> +#if (_WIN32_WINNT >= 0x0500)
> +#define WM_NCXBUTTONDOWN 171
> +#define WM_NCXBUTTONUP 172
> +#define WM_NCXBUTTONDBLCLK 173
> +#endif
>  #define WM_NCMOUSEMOVE 160
>  #define WM_NCPAINT 133
>  #define WM_NCRBUTTONDBLCLK 166
> @@ -1394,7 +1438,12 @@
>  #define WM_MBUTTONDBLCLK 521
>  #define WM_MOUSEWHEEL 522
>  #define WM_MOUSEFIRST 512
> -#define WM_MOUSELAST 522
> +#if (_WIN32_WINNT >= 0x0500)
> +#define WM_XBUTTONDOWN 523
> +#define WM_XBUTTONUP 524
> +#define WM_XBUTTONDBLCLK 525
> +#define WM_MOUSELAST 525
> +#endif
>  #define WM_MOUSEHOVER 0x2A1
>  #define WM_MOUSELEAVE 0x2A3
>  #if (_WIN32_WINNT >= 0x0400)
> @@ -1594,6 +1643,7 @@
>  #define DCX_CLIPSIBLINGS 16
>  #define DCX_CLIPCHILDREN 8
>  #define DCX_NORESETATTRS 4
> +#define DCX_INTERSECTUPDATE 0x200
>  #define DCX_LOCKWINDOWUPDATE 0x400
>  #define DCX_EXCLUDERGN 64
>  #define DCX_INTERSECTRGN 128
> @@ -1813,6 +1863,10 @@
>  #define MK_SHIFT 4
>  #define MK_CONTROL 8
>  #define MK_MBUTTON 16
> +#if(_WIN32_WINNT >= 0x0500)
> +#define MK_XBUTTON1 32
> +#define MK_XBUTTON2 64
> +#endif
>  #define TPM_CENTERALIGN 4
>  #define TPM_LEFTALIGN 0
>  #define TPM_RIGHTALIGN 8
> @@ -1841,6 +1895,7 @@
>  #define HELP_QUIT 2
>  #define HELP_SETCONTENTS 5
>  #define HELP_SETINDEX 5
> +#define HELP_SETWINPOS 0x203
>  #define HELP_CONTEXTMENU 0xa
>  #define HELP_FINDER 0xb
>  #define HELP_WM_HELP 0xc
> @@ -3136,7 +3191,8 @@
>  long WINAPI
BroadcastSystemMessageExA(DWORD,LPDWORD,UINT,WPARAM,LPARAM,PBSMINFO);
>  long WINAPI
BroadcastSystemMessageExW(DWORD,LPDWORD,UINT,WPARAM,LPARAM,PBSMINFO);
>  #endif /* (_WIN32_WINNT >= 0x0501) */
> -BOOL WINAPI CallMsgFilter(PMSG,int);
> +BOOL WINAPI CallMsgFilterA(LPMSG,INT);
> +BOOL WINAPI CallMsgFilterW(LPMSG,INT);
>  LRESULT WINAPI CallNextHookEx(HHOOK,int,WPARAM,LPARAM);
>  LRESULT WINAPI CallWindowProcA(WNDPROC,HWND,UINT,WPARAM,LPARAM);
>  LRESULT WINAPI CallWindowProcW(WNDPROC,HWND,UINT,WPARAM,LPARAM);
> @@ -3377,7 +3433,6 @@
>  int WINAPI GetKeyNameTextW(LONG,LPWSTR,int);
>  SHORT WINAPI GetKeyState(int);
>  HWND WINAPI GetLastActivePopup(HWND);
> -DWORD WINAPI GetLastError(void);
>  HMENU WINAPI GetMenu(HWND);
>  LONG WINAPI GetMenuCheckMarkDimensions(void);
>  DWORD WINAPI GetMenuContextHelpId(HMENU);
> @@ -3492,6 +3547,7 @@
>  BOOL WINAPI InsertMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
>  BOOL WINAPI InsertMenuItemA(HMENU,UINT,BOOL,LPCMENUITEMINFOA);
>  BOOL WINAPI InsertMenuItemW(HMENU,UINT,BOOL,LPCMENUITEMINFOW);
> +INT WINAPI InternalGetWindowText(HWND,LPWSTR,INT);
>  BOOL WINAPI IntersectRect(LPRECT,LPCRECT,LPCRECT);
>  BOOL WINAPI InvalidateRect(HWND,LPCRECT,BOOL);
>  BOOL WINAPI InvalidateRgn(HWND,HRGN,BOOL);
> @@ -3711,7 +3767,8 @@
>  BOOL WINAPI SetWindowPlacement(HWND hWnd,const WINDOWPLACEMENT*);
>  BOOL WINAPI SetWindowPos(HWND,HWND,int,int,int,int,UINT);
>  int WINAPI SetWindowRgn(HWND,HRGN,BOOL);
> -HOOKPROC WINAPI SetWindowsHookA(int,HOOKPROC);
> +HHOOK WINAPI SetWindowsHookA(int,HOOKPROC);
> +HHOOK WINAPI SetWindowsHookW(int,HOOKPROC);
>  HHOOK WINAPI SetWindowsHookExA(int,HOOKPROC,HINSTANCE,DWORD);
>  HHOOK WINAPI SetWindowsHookExW(int,HOOKPROC,HINSTANCE,DWORD);
>  BOOL WINAPI SetWindowTextA(HWND,LPCSTR);
> @@ -3817,6 +3870,7 @@
>  #define AppendMenu AppendMenuW
>  #define BroadcastSystemMessage BroadcastSystemMessageW
>  #define BroadcastSystemMessageEx BroadcastSystemMessageExW
> +#define CallMsgFilter CallMsgFilterW
>  #define CallWindowProc CallWindowProcW
>  #define ChangeMenu ChangeMenuW
>  #define CharLower CharLowerW
> @@ -3981,6 +4035,7 @@
>  #define AppendMenu AppendMenuA
>  #define BroadcastSystemMessage BroadcastSystemMessageA
>  #define BroadcastSystemMessageEx BroadcastSystemMessageExA
> +#define CallMsgFilter CallMsgFilterA
>  #define CallWindowProc CallWindowProcA
>  #define ChangeMenu ChangeMenuA
>  #define CharLower CharLowerA
>


----------------------------------------------------------------------------
----



2004-04-13  Filip Navara  <xnavara-VIXq6x/[email protected]>

        * include/winuser.h (IS_INTRESOURCE, MB_CANCELTRYCONTINUE,
        WM_NCXBUTTONDOWN, WM_NCXBUTTONUP, WM_NCXBUTTONDBLCLK,
        WM_XBUTTONDOWN, WM_XBUTTONUP, WM_XBUTTONDBLCLK,
        DCX_INTERSECTUPDATE, MK_XBUTTON1, MK_XBUTTON2,
        HELP_SETWINPOS): Define.
        (WM_MOUSELAST): Define only for _WIN32_WINNT >= 0x500.
        (SPI_*): Add new definitions for WINVER >= 0x500.
(CallMsgFilter[AW], SetWindowsHookA): Correct prototype.
(InternalGetWindowText, SetWindowsHookW): Declare.
* include/winbase.h (InitializeSListHead): Avoid conflicting
definition with DDK headers.

2004-04-13  Gé van Geldorp  <xnavara-VIXq6x/[email protected]>

        * include/winuser.h (GetLastError): Move from here...
* include/winbase.h: ... to here.


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click