Added implementation of GetWindowInfo.

diff --git a/dlls/user/user32.spec b/dlls/user/user32.spec
index 828239f..e9edfb7 100644
--- a/dlls/user/user32.spec
+++ b/dlls/user/user32.spec
@@ -327,6 +327,7 @@
 @ stdcall GetWindowTextW(long ptr long) GetWindowTextW
 @ stdcall GetWindowThreadProcessId(long ptr) GetWindowThreadProcessId
 @ stdcall GetWindowWord(long long) GetWindowWord
+@ stdcall GetWindowInfo(long ptr) GetWindowInfo
 @ stdcall GrayStringA(long long ptr long long long long long long) GrayStringA
 @ stdcall GrayStringW(long long ptr long long long long long long) GrayStringW
 @ stdcall HideCaret(long) HideCaret
diff --git a/include/winuser.h b/include/winuser.h
index b7d95fa..0b0f5b9 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -3483,6 +3483,23 @@
 
 #define DEVICE_NOTIFY_WINDOW_HANDLE     0x00000000
 
+/* used for GetWindowInfo() */
+
+#define WS_ACTIVECAPTION    0x0001
+
+typedef struct tagWINDOWINFO {
+    DWORD cbSize;
+    RECT  rcWindow;
+    RECT  rcClient;
+    DWORD dwStyle;
+    DWORD dwExStyle;
+    DWORD dwWindowStatus;
+    UINT  cxWindowBorders;
+    UINT  cyWindowBorders;
+    ATOM  atomWindowType;
+    WORD  wCreatorVersion;
+} WINDOWINFO, *PWINDOWINFO, *LPWINDOWINFO;
+
 #define     EnumTaskWindows(handle,proc,lparam) \
             EnumThreadWindows(handle,proc,lparam)
 #define     OemToAnsiA OemToCharA
@@ -3937,25 +3954,24 @@
 #define     GetUserObjectInformation WINELIB_NAME_AW(GetUserObjectInformation)
 HWND        WINAPI GetWindow(HWND,UINT);
 HDC         WINAPI GetWindowDC(HWND);
+BOOL        WINAPI GetWindowInfo(HWND, PWINDOWINFO);
 LONG        WINAPI GetWindowLongA(HWND,INT);
 LONG        WINAPI GetWindowLongW(HWND,INT);
 #define     GetWindowLong WINELIB_NAME_AW(GetWindowLong)
-BOOL      WINAPI GetWindowPlacement(HWND,LPWINDOWPLACEMENT);
-BOOL      WINAPI GetWindowRect(HWND,LPRECT);
-INT       WINAPI GetWindowRgn(HWND,HRGN);
+BOOL        WINAPI GetWindowPlacement(HWND,LPWINDOWPLACEMENT);
+BOOL        WINAPI GetWindowRect(HWND,LPRECT);
+INT         WINAPI GetWindowRgn(HWND,HRGN);
 HWINSTA     WINAPI GetProcessWindowStation(void);
 #define     GetWindowTask(hwnd) ((HTASK)GetWindowThreadProcessId(hwnd,NULL))
-INT       WINAPI GetWindowTextA(HWND,LPSTR,INT);
-INT       WINAPI GetWindowTextW(HWND,LPWSTR,INT);
+INT         WINAPI GetWindowTextA(HWND,LPSTR,INT);
+INT         WINAPI GetWindowTextW(HWND,LPWSTR,INT);
 #define     GetWindowText WINELIB_NAME_AW(GetWindowText)
-INT       WINAPI GetWindowTextLengthA(HWND);
-INT       WINAPI GetWindowTextLengthW(HWND);
+INT         WINAPI GetWindowTextLengthA(HWND);
+INT         WINAPI GetWindowTextLengthW(HWND);
 #define     GetWindowTextLength WINELIB_NAME_AW(GetWindowTextLength)
 WORD        WINAPI GetWindowWord(HWND,INT);
-BOOL      WINAPI GrayStringA(HDC,HBRUSH,GRAYSTRINGPROC,LPARAM,
-                                 INT,INT,INT,INT,INT);
-BOOL      WINAPI GrayStringW(HDC,HBRUSH,GRAYSTRINGPROC,LPARAM,
-                                 INT,INT,INT,INT,INT);
+BOOL        WINAPI GrayStringA(HDC,HBRUSH,GRAYSTRINGPROC,LPARAM,INT,INT,INT,INT,INT);
+BOOL        WINAPI GrayStringW(HDC,HBRUSH,GRAYSTRINGPROC,LPARAM,INT,INT,INT,INT,INT);
 #define     GrayString WINELIB_NAME_AW(GrayString)
 BOOL        WINAPI HideCaret(HWND);
 BOOL        WINAPI HiliteMenuItem(HWND,HMENU,UINT,UINT);
diff --git a/windows/win.c b/windows/win.c
index 0b7acbc..ca9ab70 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -3340,3 +3340,55 @@
           hwnd, lpszFileName, cchFileNameMax);
     return 0;
 }
+
+/******************************************************************************
+ *              GetWindowInfo (USER32.@)
+ * hwnd: in
+ * pwi:  out.
+ * MS Documentation mentions that pwi->cbSize must be set to SIZEOF(WINDOWINFO)
+ *    this may be because this structure changed over time. If this is the
+ *    the case, then please: FIXME.
+ *    Using the structure described in MSDN for 98/ME/NT(4.0 SP3)/2000/XP.
+ */
+BOOL WINAPI GetWindowInfo( HWND hwnd, PWINDOWINFO pwi)
+{
+    WND *wndInfo = NULL;
+    if (!pwi) return FALSE;
+    if (pwi->cbSize != sizeof(WINDOWINFO))
+    {
+        FIXME("windowinfo->cbSize != sizeof(WINDOWINFO). Please report\n");
+        return FALSE;
+    }
+    wndInfo = WIN_GetPtr(hwnd);
+    if (!wndInfo) return FALSE;
+    if (wndInfo == WND_OTHER_PROCESS)
+    {
+        FIXME("window belong to other process\n");
+        return FALSE;
+    }
+
+    pwi->rcWindow = wndInfo->rectWindow;
+    pwi->rcClient = wndInfo->rectClient;
+    pwi->dwStyle = wndInfo->dwStyle;
+    pwi->dwExStyle = wndInfo->dwExStyle;
+    pwi->dwWindowStatus = ((GetActiveWindow() == hwnd) ? WS_ACTIVECAPTION : 0);
+                    /* if active WS_ACTIVECAPTION, else 0 */
+
+    pwi->cxWindowBorders = ((wndInfo->dwStyle & WS_BORDER) ?
+                    GetSystemMetrics(SM_CXBORDER) : 0);
+    pwi->cyWindowBorders = ((wndInfo->dwStyle & WS_BORDER) ?
+                    GetSystemMetrics(SM_CYBORDER) : 0);
+    /* above two: I'm presuming that borders widths are the same
+     * for each window - so long as its actually using a border.. */
+
+    pwi->atomWindowType = GetClassLongA( hwnd, GCW_ATOM );
+    pwi->wCreatorVersion = GetVersion();
+                    /* Docs say this should be the version that
+                     * CREATED the window. But eh?.. Isn't that just the
+                     * version we are running.. Unless ofcourse its some wacky
+                     * RPC stuff or something */
+
+    WIN_ReleasePtr(wndInfo);
+    return TRUE;
+}
+