[ros-diffs] [tkreuzer] 34779: Sync with trunk head (34777)

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Fri Jul 25 15:10:01 CEST 2008


Author: tkreuzer
Date: Fri Jul 25 08:10:00 2008
New Revision: 34779

URL: http://svn.reactos.org/svn/reactos?rev=34779&view=rev
Log:
Sync with trunk head (34777)

Added:
    branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid.spec
      - copied unchanged from r34778, trunk/reactos/drivers/base/bootvid/bootvid.spec
Removed:
    branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid_arm.def
    branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid_i386.def
Modified:
    branches/ros-amd64-bringup/reactos/base/services/umpnpmgr/umpnpmgr.c
    branches/ros-amd64-bringup/reactos/dll/win32/advapi32/service/scm.c
    branches/ros-amd64-bringup/reactos/dll/win32/shell32/folder_options.c
    branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/hook.c
    branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/message.c
    branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid.rbuild
    branches/ros-amd64-bringup/reactos/include/psdk/winuser.h
    branches/ros-amd64-bringup/reactos/include/reactos/idl/pnp.idl
    branches/ros-amd64-bringup/reactos/include/reactos/win32k/ntuser.h
    branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mminit.c
    branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/callback.c
    branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/clipboard.c
    branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/hook.c
    branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/message.c
    branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
    branches/ros-amd64-bringup/reactos/tools/cabman/cabinet.cxx
    branches/ros-amd64-bringup/reactos/tools/sysreg/os_support.cpp

Modified: branches/ros-amd64-bringup/reactos/base/services/umpnpmgr/umpnpmgr.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/services/umpnpmgr/umpnpmgr.c?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -160,7 +160,7 @@
 
 
 /* Function 0 */
-DWORD PNP_Function0(
+DWORD PNP_Disconnect(
     handle_t hBinding)
 {
     UNREFERENCED_PARAMETER(hBinding);
@@ -170,7 +170,7 @@
 
 
 /* Function 1 */
-DWORD PNP_Function1(
+DWORD PNP_Connect(
     handle_t hBinding)
 {
     UNREFERENCED_PARAMETER(hBinding);
@@ -1681,7 +1681,7 @@
 
 
 /* Function 55 */
-DWORD PNP_Function55(
+DWORD PNP_SetHwProf(
     handle_t hBinding)
 {
     UNIMPLEMENTED;
@@ -1690,7 +1690,7 @@
 
 
 /* Function 56 */
-DWORD PNP_Function56(
+DWORD PNP_QueryArbitratorFreeData(
     handle_t hBinding)
 {
     UNIMPLEMENTED;
@@ -1699,7 +1699,7 @@
 
 
 /* Function 57 */
-DWORD PNP_Function57(
+DWORD PNP_QueryArbitratorFreeSize(
     handle_t hBinding)
 {
     UNIMPLEMENTED;
@@ -1710,7 +1710,7 @@
 /* Function 58 */
 CONFIGRET
 PNP_RunDetection(
-    handle_t BindingHandle,
+    handle_t hBinding,
     DWORD ulFlags)
 {
     UNIMPLEMENTED;
@@ -1719,7 +1719,7 @@
 
 
 /* Function 59 */
-DWORD PNP_Function59(
+DWORD PNP_RegisterNotification(
     handle_t hBinding)
 {
     UNIMPLEMENTED;
@@ -1728,7 +1728,7 @@
 
 
 /* Function 60 */
-DWORD PNP_Function60(
+DWORD PNP_UnregisterNotification(
     handle_t hBinding)
 {
     UNIMPLEMENTED;
@@ -1831,6 +1831,69 @@
     PNP_PROP_SIZE PropertySize,
     BYTE *PropertyBuffer,
     DWORD Flags)
+{
+    UNIMPLEMENTED;
+    return CR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/* Function 68 */
+DWORD PNP_InstallDevInst(
+    handle_t hBinding)
+{
+    UNIMPLEMENTED;
+    return CR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/* Function 69 */
+DWORD PNP_ApplyPowerSettings(
+    handle_t hBinding)
+{
+    UNIMPLEMENTED;
+    return CR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/* Function 70 */
+DWORD PNP_DriverStoreAddDriverPackage(
+    handle_t hBinding)
+{
+    UNIMPLEMENTED;
+    return CR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/* Function 71 */
+DWORD PNP_DriverStoreDeleteDriverPackage(
+    handle_t hBinding)
+{
+    UNIMPLEMENTED;
+    return CR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/* Function 72 */
+DWORD PNP_RegisterServiceNotification(
+    handle_t hBinding)
+{
+    UNIMPLEMENTED;
+    return CR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/* Function 73 */
+DWORD PNP_SetActiveService(
+    handle_t hBinding)
+{
+    UNIMPLEMENTED;
+    return CR_CALL_NOT_IMPLEMENTED;
+}
+
+
+/* Function 74 */
+DWORD PNP_DeleteServiceDevices(
+    handle_t hBinding)
 {
     UNIMPLEMENTED;
     return CR_CALL_NOT_IMPLEMENTED;

Modified: branches/ros-amd64-bringup/reactos/dll/win32/advapi32/service/scm.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/win32/advapi32/service/scm.c?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -502,7 +502,7 @@
             SetLastError(ERROR_NOT_ENOUGH_MEMORY);
             goto cleanup;
         }
-        MultiByteToWideChar(CP_ACP, 0, lpDependencies, -1, lpDependenciesW, dwDependenciesLength);
+        MultiByteToWideChar(CP_ACP, 0, lpDependencies, dwDependenciesLength, lpDependenciesW, dwDependenciesLength);
     }
 
     if (lpServiceStartName)

Modified: branches/ros-amd64-bringup/reactos/dll/win32/shell32/folder_options.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/win32/shell32/folder_options.c?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/shell32/folder_options.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/shell32/folder_options.c [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -80,6 +80,105 @@
     return FALSE;
 }
 
+VOID
+InitializeFileTypesListCtrlColumns(HWND hDlgCtrl)
+{
+    RECT clientRect;
+    LVCOLUMNW col;
+    WCHAR szName[50];
+
+    if (!LoadStringW(shell32_hInstance, IDS_COLUMN_EXTENSION, szName, sizeof(szName) / sizeof(WCHAR)))
+        szName[0] = 0;
+    szName[(sizeof(szName)/sizeof(WCHAR))-1] = 0;
+
+    GetClientRect(hDlgCtrl, &clientRect);
+    ZeroMemory(&col, sizeof(LV_COLUMN));
+    col.mask      = LVCF_SUBITEM | LVCF_WIDTH | LVCF_FMT;
+    col.iSubItem  = 0;
+    col.pszText = szName;
+    col.fmt = LVCFMT_LEFT;
+    col.cx        = (clientRect.right - clientRect.left) - GetSystemMetrics(SM_CXVSCROLL);
+    (void)ListView_InsertColumnW(hDlgCtrl, 0, &col);
+}
+INT
+FindItem(HWND hDlgCtrl, WCHAR * ItemName)
+{
+    LVFINDINFOW findInfo;
+    ZeroMemory(&findInfo, sizeof(LVFINDINFOW));
+
+    findInfo.flags = LVFI_STRING;
+    findInfo.psz = ItemName;
+    return ListView_FindItem(hDlgCtrl, 0, &findInfo);
+}
+
+VOID
+InsertFileType(HWND hDlgCtrl, WCHAR * szName, DWORD Size, INT iItem)
+{
+    WCHAR szPath[100];
+    HKEY hKey;
+    LVITEMW lvItem;
+    DWORD dwSize;
+
+    if (FindItem(hDlgCtrl, szName) != -1)
+        return;
+
+    wcscpy(szPath, szName);
+    /* get the name */
+    if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szPath, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+    {
+        if (RegLoadMUIStringW(hKey, L"FriendlyTypeName", szName, Size, NULL, 0, NULL) != ERROR_SUCCESS)
+        {
+            dwSize = Size;
+            if (RegQueryValueExW(hKey, NULL, NULL, NULL, (LPBYTE)szName, &dwSize) != ERROR_SUCCESS)
+            {
+                wcscpy(szName, szPath);
+            }
+        }
+        RegCloseKey(hKey);
+        szName[(Size/sizeof(WCHAR))-1] = 0;
+    }
+    wcscat(szPath, L"\\shell");
+
+    ZeroMemory(&lvItem, sizeof(LVITEMW));
+    lvItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE;
+    lvItem.state = LVIS_SELECTED; 
+    lvItem.pszText = szName;
+    lvItem.iItem = iItem;
+
+    if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szPath, 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+    {
+        lvItem.lParam = 0;
+        (void)ListView_InsertItemW(hDlgCtrl, &lvItem);
+        RegCloseKey(hKey);
+    }
+}
+
+BOOL
+InitializeFileTypesListCtrl(HWND hwndDlg)
+{
+    HWND hDlgCtrl;
+    DWORD dwIndex = 0;
+    WCHAR szName[50];
+    DWORD dwName;
+    INT iItem = 0;
+
+
+    hDlgCtrl = GetDlgItem(hwndDlg, 14000);
+    InitializeFileTypesListCtrlColumns(hDlgCtrl);
+
+
+
+    dwName = sizeof(szName) / sizeof(WCHAR);
+
+    while(RegEnumKeyExW(HKEY_CLASSES_ROOT, dwIndex++, szName, &dwName, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
+    {
+        InsertFileType(hDlgCtrl, szName, sizeof(szName), iItem++);
+        dwName = sizeof(szName) / sizeof(WCHAR);
+    }
+    return TRUE;
+}
+
+
 INT_PTR
 CALLBACK
 FolderOptionsFileTypesDlg(
@@ -89,7 +188,12 @@
     LPARAM lParam
 )
 {
-
+    switch(uMsg)
+    {
+        case WM_INITDIALOG:
+            InitializeFileTypesListCtrl(hwndDlg);
+            return TRUE;
+    }
 
 
     return FALSE;
@@ -102,7 +206,7 @@
     PROPSHEETHEADERW pinfo;
     HPROPSHEETPAGE hppages[3];
     HPROPSHEETPAGE hpage;
-	UINT num_pages = 0;
+    UINT num_pages = 0;
     WCHAR szOptions[100];
 
     hpage = SH_CreatePropertySheetPage("FOLDER_OPTIONS_GENERAL_DLG", FolderOptionsGeneralDlg, 0, NULL);
@@ -116,14 +220,14 @@
     hpage = SH_CreatePropertySheetPage("FOLDER_OPTIONS_FILETYPES_DLG", FolderOptionsFileTypesDlg, 0, NULL);
     if (hpage)
         hppages[num_pages++] = hpage;
-    
+
     szOptions[0] = L'\0';
-    LoadStringW(hInst, IDS_FOLDER_OPTIONS, szOptions, sizeof(szOptions) / sizeof(WCHAR));
-    szOptions[99] = L'\0';
-    
+    LoadStringW(shell32_hInstance, IDS_FOLDER_OPTIONS, szOptions, sizeof(szOptions) / sizeof(WCHAR));
+    szOptions[(sizeof(szOptions)/sizeof(WCHAR))-1] = L'\0';
+
     memset(&pinfo, 0x0, sizeof(PROPSHEETHEADERW));
     pinfo.dwSize = sizeof(PROPSHEETHEADERW);
-    pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE;
+    pinfo.dwFlags = PSH_NOCONTEXTHELP;
     pinfo.nPages = num_pages;
     pinfo.u3.phpage = hppages;
     pinfo.pszCaption = szOptions;

Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/hook.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/hook.c?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/hook.c [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -422,6 +422,9 @@
   PKBDLLHOOKSTRUCT KeyboardLlData;
   PMSLLHOOKSTRUCT MouseLlData;
   PMSG Msg;
+  PMOUSEHOOKSTRUCT MHook;
+  PCWPSTRUCT CWP;
+  PCWPRETSTRUCT CWPR;
 
   Common = (PHOOKPROC_CALLBACK_ARGUMENTS) Arguments;
 
@@ -502,12 +505,27 @@
       MouseLlData = (PMSLLHOOKSTRUCT)((PCHAR) Common + Common->lParam);
       Result = Common->Proc(Common->Code, Common->wParam, (LPARAM) MouseLlData);
       break;
+    case WH_MOUSE:
+      MHook = (PMOUSEHOOKSTRUCT)((PCHAR) Common + Common->lParam);
+      Result = Common->Proc(Common->Code, Common->wParam, (LPARAM) MHook);
+      break;
+    case WH_CALLWNDPROC:
+      CWP = (PCWPSTRUCT)((PCHAR) Common + Common->lParam);
+      Result = Common->Proc(Common->Code, Common->wParam, (LPARAM) CWP);
+      break;
+    case WH_CALLWNDPROCRET:
+      CWPR = (PCWPRETSTRUCT)((PCHAR) Common + Common->lParam);
+      Result = Common->Proc(Common->Code, Common->wParam, (LPARAM) CWPR);
+      break;
     case WH_MSGFILTER:
     case WH_SYSMSGFILTER:
     case WH_GETMESSAGE:
       Msg = (PMSG)((PCHAR) Common + Common->lParam);
 //      FIXME("UHOOK Memory: %x: %x\n",Common, Msg);
       Result = Common->Proc(Common->Code, Common->wParam, (LPARAM) Msg);
+      break;
+    case WH_KEYBOARD:
+      Result = Common->Proc(Common->Code, Common->wParam, Common->lParam);
       break;
     default:
       return ZwCallbackReturn(NULL, 0, STATUS_NOT_SUPPORTED);

Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/message.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/message.c?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -1441,6 +1441,11 @@
       MsgiKMToUMCleanup(&Info.Msg, &Conversion.UnicodeMsg);
       return (BOOL) -1;
     }
+  if (!lpMsg)
+  {
+     SetLastError( ERROR_NOACCESS );
+     return FALSE;
+  }
   *lpMsg = Conversion.AnsiMsg;
   Conversion.Ansi = TRUE;
   Conversion.FinalMsg = lpMsg;
@@ -1481,6 +1486,11 @@
     {
       return (BOOL) -1;
     }
+  if (!lpMsg)
+  {
+     SetLastError( ERROR_NOACCESS );
+     return FALSE;
+  }
   *lpMsg = Conversion.UnicodeMsg;
   Conversion.Ansi = FALSE;
   Conversion.FinalMsg = lpMsg;
@@ -1527,6 +1537,11 @@
       MsgiKMToUMCleanup(&Info.Msg, &Conversion.UnicodeMsg);
       return (BOOL) -1;
     }
+  if (!lpMsg)
+  {
+     SetLastError( ERROR_NOACCESS );
+     return FALSE;
+  }
   *lpMsg = Conversion.AnsiMsg;
   Conversion.Ansi = TRUE;
   Conversion.FinalMsg = lpMsg;
@@ -1570,6 +1585,11 @@
     {
       return (BOOL) -1;
     }
+  if (!lpMsg)
+  {
+     SetLastError( ERROR_NOACCESS );
+     return FALSE;
+  }
   *lpMsg = Conversion.UnicodeMsg;
   Conversion.Ansi = FALSE;
   Conversion.FinalMsg = lpMsg;
@@ -2560,15 +2580,6 @@
     return IsDialogMessageW( hwndDlg, &msg );
 }
 
-typedef struct _BROADCASTPARM
-{
-    DWORD flags;
-    DWORD recipients;
-    HDESK hDesk;
-    HWND  hWnd;
-    LUID  luid;
-} BROADCASTPARM, *PBROADCASTPARM;
-
 LONG
 STDCALL
 IntBroadcastSystemMessage(

Modified: branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid.rbuild
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid.rbuild?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid.rbuild [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
 <module name="bootvid" type="kernelmodedll" entrypoint="DriverEntry at 8" installbase="system32/drivers" installname="bootvid.dll">
-	<importlibrary definition="bootvid_$(ARCH).def"></importlibrary>
+	<importlibrary definition="bootvid.spec.def"></importlibrary>
 	<bootstrap installbase="$(CDOUTPUT)" nameoncd="bootvid.dll" />
 	<include base="bootvid">.</include>
 	<library>ntoskrnl</library>
@@ -20,5 +20,6 @@
 		</directory>
 	</if>
 	<file>bootvid.rc</file>
+	<file>bootvid.spec</file>
 	<pch>precomp.h</pch>
 </module>

Removed: branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid_arm.def
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid_arm.def?rev=34778&view=auto
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid_arm.def [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid_arm.def (removed)
@@ -1,15 +1,0 @@
-LIBRARY BOOTVID.DLL
-
-EXPORTS
-VidBitBlt
-VidBufferToScreenBlt
-VidCleanUp
-VidDisplayString
-VidDisplayStringXY
-VidInitialize
-VidResetDisplay
-VidScreenToBufferBlt
-VidSetScrollRegion
-VidSetTextColor
-VidSolidColorFill
-

Removed: branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid_i386.def
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid_i386.def?rev=34778&view=auto
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid_i386.def [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/base/bootvid/bootvid_i386.def (removed)
@@ -1,15 +1,0 @@
-LIBRARY BOOTVID.DLL
-
-EXPORTS
-VidBitBlt at 12
-VidBufferToScreenBlt at 24
-VidCleanUp at 0
-VidDisplayString at 4
-VidDisplayStringXY
-VidInitialize at 4
-VidResetDisplay at 4
-VidScreenToBufferBlt at 24
-VidSetScrollRegion at 16
-VidSetTextColor at 4
-VidSolidColorFill at 20
-

Modified: branches/ros-amd64-bringup/reactos/include/psdk/winuser.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/include/psdk/winuser.h?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/psdk/winuser.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/psdk/winuser.h [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -1170,6 +1170,12 @@
 #define SMTO_ABORTIFHUNG 2
 #define SMTO_BLOCK 1
 #define SMTO_NORMAL 0
+#if (WINVER >= 0x0500)
+#define SMTO_NOTIMEOUTIFNOTHUNG 8
+#endif
+#if (WINVER >= 0x0600)
+#define SMTO_ERRORONEXIT 32
+#endif
 #define SIF_ALL 23
 #define SIF_PAGE 2
 #define SIF_POS 4

Modified: branches/ros-amd64-bringup/reactos/include/reactos/idl/pnp.idl
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/include/reactos/idl/pnp.idl?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/reactos/idl/pnp.idl [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/reactos/idl/pnp.idl [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -253,11 +253,11 @@
 interface pnp
 {
     /* Function 0 */
-    DWORD PNP_Function0(
+    DWORD PNP_Disconnect(
         [in] handle_t hBinding); /* FIXME */
 
     /* Function 1 */
-    DWORD PNP_Function1(
+    DWORD PNP_Connect(
         [in] handle_t hBinding); /* FIXME */
 
     /* Function 2 */
@@ -716,15 +716,15 @@
         [in] DWORD ulFlags);
 
     /* Function 55 */
-    DWORD PNP_Function55(
+    DWORD PNP_SetHwProf(
         [in] handle_t hBinding);
 
     /* Function 56 */
-    DWORD PNP_Function56(
+    DWORD PNP_QueryArbitratorFreeData(
         [in] handle_t hBinding);
 
     /* Function 57 */
-    DWORD PNP_Function57(
+    DWORD PNP_QueryArbitratorFreeSize(
         [in] handle_t hBinding);
 
     /* Function 58 */
@@ -733,12 +733,14 @@
         [in] DWORD ulFlags);
 
     /* Function 59 */
-    DWORD PNP_Function59(
+    DWORD PNP_RegisterNotification(
         [in] handle_t hBinding);
 
     /* Function 60 */
-    DWORD PNP_Function60(
+    DWORD PNP_UnregisterNotification(
         [in] handle_t hBinding);
+
+cpp_quote("#if _WIN32_WINNT >= 0x0501")
 
     /* Function 61 */
     DWORD PNP_GetCustomDevProp(
@@ -769,6 +771,8 @@
         [in] handle_t hBinding,
         [out] DWORD *pulSSDIFlags,
         [in] DWORD ulFlags);
+
+cpp_quote("#if _WIN32_WINNT >= 0x0600")
 
     /* Function 65 */
     DWORD PNP_GetObjectPropKeys(
@@ -805,4 +809,36 @@
         [in] PNP_PROP_SIZE PropertySize,
         [in, unique, size_is(PropertySize)] BYTE *PropertyBuffer,
         [in] DWORD Flags);
+
+    /* Function 68 */
+    DWORD PNP_InstallDevInst(
+        [in] handle_t hBinding); /* FIXME */
+
+    /* Function 69 */
+    DWORD PNP_ApplyPowerSettings(
+        [in] handle_t hBinding); /* FIXME */
+
+    /* Function 70 */
+    DWORD PNP_DriverStoreAddDriverPackage(
+        [in] handle_t hBinding); /* FIXME */
+
+    /* Function 71 */
+    DWORD PNP_DriverStoreDeleteDriverPackage(
+        [in] handle_t hBinding); /* FIXME */
+
+    /* Function 72 */
+    DWORD PNP_RegisterServiceNotification(
+        [in] handle_t hBinding); /* FIXME */
+
+    /* Function 73 */
+    DWORD PNP_SetActiveService(
+        [in] handle_t hBinding); /* FIXME */
+
+    /* Function 74 */
+    DWORD PNP_DeleteServiceDevices(
+        [in] handle_t hBinding); /* FIXME */
+
+cpp_quote("#endif /* WIN32_WINNT >= 0x0600 */")
+cpp_quote("#endif /* WIN32_WINNT >= 0x0501 */")
+
 }

Modified: branches/ros-amd64-bringup/reactos/include/reactos/win32k/ntuser.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/include/reactos/win32k/ntuser.h?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -392,7 +392,14 @@
   ATOM Atom;
 } PROPERTY, *PPROPERTY;
 
-
+typedef struct _BROADCASTPARM
+{
+  DWORD flags;
+  DWORD recipients;
+  HDESK hDesk;
+  HWND  hWnd;
+  LUID  luid;  
+} BROADCASTPARM, *PBROADCASTPARM;
 
 PW32THREADINFO GetW32ThreadInfo(VOID);
 PW32PROCESSINFO GetW32ProcessInfo(VOID);

Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mminit.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mminit.c?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -342,19 +342,22 @@
     PLIST_ENTRY NextEntry;
     PMEMORY_ALLOCATION_DESCRIPTOR Md;
     ULONG_PTR LastKrnlPhysAddr = 0;
-    
+
     for (NextEntry = KeLoaderBlock->MemoryDescriptorListHead.Flink;
          NextEntry != &KeLoaderBlock->MemoryDescriptorListHead;
          NextEntry = NextEntry->Flink)
     {
         Md = CONTAINING_RECORD(NextEntry, MEMORY_ALLOCATION_DESCRIPTOR, ListEntry);
-        if (Md->MemoryType != LoaderFree)
+
+        if (Md->MemoryType != LoaderFree &&
+            Md->MemoryType != LoaderFirmwareTemporary &&
+            Md->MemoryType != LoaderSpecialMemory)
         {
             if (Md->BasePage+Md->PageCount > LastKrnlPhysAddr)
-                LastKrnlPhysAddr = Md->BasePage+Md->PageCount;   
+                LastKrnlPhysAddr = Md->BasePage+Md->PageCount;
         }
     }
-    
+
     /* Convert to a physical address */
     return LastKrnlPhysAddr << PAGE_SHIFT;
 }

Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/callback.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/callback.c?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/callback.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/callback.c [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -379,13 +379,23 @@
       case WH_MOUSE_LL:
          ArgumentLength += sizeof(MSLLHOOKSTRUCT);
          break;
+      case WH_MOUSE:
+         ArgumentLength += sizeof(MOUSEHOOKSTRUCT);
+         break;
+     case WH_CALLWNDPROC:
+         ArgumentLength += sizeof(CWPSTRUCT);
+         break;
+      case WH_CALLWNDPROCRET:
+         ArgumentLength += sizeof(CWPRETSTRUCT);
+         break;
       case WH_MSGFILTER:
       case WH_SYSMSGFILTER:
       case WH_GETMESSAGE:
          ArgumentLength += sizeof(MSG);
          break;
+      case WH_KEYBOARD:
 //      case WH_SHELL:
-//         break;
+         break;
       default:
          DPRINT1("Trying to call unsupported window hook %d\n", HookId);
          return 0;
@@ -444,6 +454,18 @@
          RtlCopyMemory(Extra, (PVOID) lParam, sizeof(MSLLHOOKSTRUCT));
          Common->lParam = (LPARAM) (Extra - (PCHAR) Common);
          break;
+      case WH_MOUSE:
+         RtlCopyMemory(Extra, (PVOID) lParam, sizeof(MOUSEHOOKSTRUCT));
+         Common->lParam = (LPARAM) (Extra - (PCHAR) Common);
+         break;         
+      case WH_CALLWNDPROC:
+         RtlCopyMemory(Extra, (PVOID) lParam, sizeof(CWPSTRUCT));
+         Common->lParam = (LPARAM) (Extra - (PCHAR) Common);
+         break;         
+      case WH_CALLWNDPROCRET:
+         RtlCopyMemory(Extra, (PVOID) lParam, sizeof(CWPRETSTRUCT));
+         Common->lParam = (LPARAM) (Extra - (PCHAR) Common);
+         break;         
       case WH_MSGFILTER:
       case WH_SYSMSGFILTER:
       case WH_GETMESSAGE:
@@ -451,9 +473,11 @@
          Common->lParam = (LPARAM) (Extra - (PCHAR) Common);
 //         DPRINT1("KHOOK Memory: %x\n",Common);
          break;
+      case WH_KEYBOARD:
+         break;
 //      case WH_SHELL:
 //         Extra = lParam;
-//        break;         
+         break;         
    }
 
    ResultPointer = NULL;

Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/clipboard.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/clipboard.c?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/clipboard.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/clipboard.c [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -922,7 +922,9 @@
                     {
                         //TODO : sinthesize CF_UNICODETEXT & CF_OEMTEXT
                         // CF_TEXT -> CF_UNICODETEXT
-                        RtlAnsiStringToUnicodeString(&unicodeString, hCBData, TRUE);
+                        ansiString.Buffer = hCBData;
+                        ansiString.Length = size;
+                        RtlAnsiStringToUnicodeString(&unicodeString, &ansiString, TRUE);
                         intAddFormatedData(CF_UNICODETEXT, unicodeString.Buffer, unicodeString.Length * sizeof(WCHAR));
                         // CF_TEXT -> CF_OEMTEXT
                         RtlUnicodeStringToOemString(&oemString, &unicodeString, TRUE);

Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/hook.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/hook.c?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/hook.c [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -1003,14 +1003,10 @@
    /* We only (partially) support local WH_CBT hooks and
     * WH_KEYBOARD_LL, WH_MOUSE_LL and WH_GETMESSAGE hooks for now 
     */
-   if  (WH_CALLWNDPROC == HookId &&
-        WH_CALLWNDPROCRET == HookId &&
-        WH_DEBUG == HookId &&
-        WH_JOURNALPLAYBACK == HookId &&
-        WH_JOURNALRECORD == HookId &&
-        WH_FOREGROUNDIDLE == HookId &&
-        WH_KEYBOARD == HookId &&
-        WH_MOUSE == HookId &&
+   if  (WH_DEBUG == HookId ||
+        WH_JOURNALPLAYBACK == HookId ||
+        WH_JOURNALRECORD == HookId ||
+        WH_FOREGROUNDIDLE == HookId ||
         WH_SHELL == HookId)
    {
 #if 0 /* Removed to get winEmbed working again */

Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/message.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/message.c?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -658,6 +658,7 @@
    BOOL Present, RemoveMessages;
    USER_REFERENCE_ENTRY Ref;
    USHORT HitTest;
+   MOUSEHOOKSTRUCT MHook;
 
    /* The queues and order in which they are checked are documented in the MSDN
       article on GetMessage() */
@@ -814,9 +815,51 @@
          goto CheckMessages;
       }
 MsgExit:
+      if ( ISITHOOKED(WH_MOUSE) &&
+           Msg->Msg.message >= WM_MOUSEFIRST &&
+           Msg->Msg.message <= WM_MOUSELAST )
+      {
+         MHook.pt           = Msg->Msg.pt;
+         MHook.hwnd         = Msg->Msg.hwnd;
+         MHook.wHitTestCode = HitTest;
+         MHook.dwExtraInfo  = 0;
+         if (co_HOOK_CallHooks( WH_MOUSE,
+                                RemoveMsg ? HC_ACTION : HC_NOREMOVE,
+                                Msg->Msg.message,
+                                (LPARAM)&MHook ))
+         {
+            if (ISITHOOKED(WH_CBT))
+            {
+                MHook.pt           = Msg->Msg.pt;
+                MHook.hwnd         = Msg->Msg.hwnd;
+                MHook.wHitTestCode = HitTest;
+                MHook.dwExtraInfo  = 0;
+                co_HOOK_CallHooks( WH_CBT, HCBT_CLICKSKIPPED, 
+                                   Msg->Msg.message, (LPARAM)&MHook);
+            }
+            return FALSE;
+         }
+      }
+      if ( ISITHOOKED(WH_KEYBOARD) &&
+          (Msg->Msg.message == WM_KEYDOWN || Msg->Msg.message == WM_KEYUP) )
+      {
+         if (co_HOOK_CallHooks( WH_KEYBOARD,
+                                RemoveMsg ? HC_ACTION : HC_NOREMOVE,
+                                LOWORD(Msg->Msg.wParam),
+                                Msg->Msg.lParam))
+         {
+            if (ISITHOOKED(WH_CBT))
+            {
+               /* skip this message */
+               co_HOOK_CallHooks( WH_CBT, HCBT_KEYSKIPPED,
+                                  LOWORD(Msg->Msg.wParam), Msg->Msg.lParam );
+            }
+            return FALSE;
+         }
+      }
       // The WH_GETMESSAGE hook enables an application to monitor messages about to
       // be returned by the GetMessage or PeekMessage function.
-      if(ISITHOOKED(WH_GETMESSAGE))
+      if (ISITHOOKED(WH_GETMESSAGE))
       {
          //DPRINT1("Peek WH_GETMESSAGE -> %x\n",&Msg);
          co_HOOK_CallHooks( WH_GETMESSAGE, HC_ACTION, RemoveMsg & PM_REMOVE, (LPARAM)&Msg->Msg);
@@ -863,7 +906,6 @@
    }
 
    Present = co_IntPeekMessage(&Msg, hWnd, MsgFilterMin, MsgFilterMax, RemoveMsg);
-
    if (Present)
    {
 
@@ -1346,8 +1388,8 @@
    PW32THREAD Win32Thread;
    DECLARE_RETURN(LRESULT);
    USER_REFERENCE_ENTRY Ref;
-
-   /* FIXME: Call hooks. */
+   BOOL SameThread = FALSE;
+
    if (!(Window = UserGetWindowObject(hWnd)))
    {
        RETURN( FALSE);
@@ -1357,8 +1399,22 @@
 
    Win32Thread = PsGetCurrentThreadWin32Thread();
 
+   if (Window->ti == Win32Thread->ThreadInfo)
+      SameThread = TRUE;
+
+   if ((!SameThread && (Window->ti->Hooks & HOOKID_TO_FLAG(WH_CALLWNDPROC))) ||
+        (SameThread && ISITHOOKED(WH_CALLWNDPROC)) )
+   {
+      CWPSTRUCT CWP;
+      CWP.hwnd    = hWnd;
+      CWP.message = Msg;
+      CWP.wParam  = wParam;
+      CWP.lParam  = lParam;
+      co_HOOK_CallHooks( WH_CALLWNDPROC, HC_ACTION, SameThread, (LPARAM)&CWP );
+   }
+   
    if (NULL != Win32Thread &&
-         Window->MessageQueue == Win32Thread->MessageQueue)
+       Window->MessageQueue == Win32Thread->MessageQueue)
    {
       if (Win32Thread->IsExiting)
       {
@@ -1379,7 +1435,7 @@
 
       if (! NT_SUCCESS(PackParam(&lParamPacked, Msg, wParam, lParam)))
       {
-         DPRINT1("Failed to pack message parameters\n");
+          DPRINT1("Failed to pack message parameters\n");
           RETURN( FALSE);
       }
 
@@ -1391,42 +1447,85 @@
          *uResult = Result;
       }
 
+      if ((!SameThread && (Window->ti->Hooks & HOOKID_TO_FLAG(WH_CALLWNDPROCRET))) ||
+           (SameThread && ISITHOOKED(WH_CALLWNDPROCRET)) )
+      {
+         CWPRETSTRUCT CWPR;
+         CWPR.hwnd    = hWnd;
+         CWPR.message = Msg;
+         CWPR.wParam  = wParam;
+         CWPR.lParam  = lParam;
+         CWPR.lResult = Result;
+         co_HOOK_CallHooks( WH_CALLWNDPROCRET, HC_ACTION, SameThread, (LPARAM)&CWPR );
+      }
+
       if (! NT_SUCCESS(UnpackParam(lParamPacked, Msg, wParam, lParam)))
       {
          DPRINT1("Failed to unpack message parameters\n");
-          RETURN( TRUE);
-      }
-
-       RETURN( TRUE);
-   }
-
-   if(uFlags & SMTO_ABORTIFHUNG && MsqIsHung(Window->MessageQueue))
+         RETURN( TRUE);
+      }
+
+      RETURN( TRUE);
+   }
+
+   if (uFlags & SMTO_ABORTIFHUNG && MsqIsHung(Window->MessageQueue))
    {
       /* FIXME - Set a LastError? */
-       RETURN( FALSE);
-   }
-
-   if(Window->Status & WINDOWSTATUS_DESTROYING)
+      RETURN( FALSE);
+   }
+
+   if (Window->Status & WINDOWSTATUS_DESTROYING)
    {
       /* FIXME - last error? */
       DPRINT1("Attempted to send message to window 0x%x that is being destroyed!\n", hWnd);
-       RETURN( FALSE);
-   }
-
-   Status = co_MsqSendMessage(Window->MessageQueue, hWnd, Msg, wParam, lParam,
-                              uTimeout, (uFlags & SMTO_BLOCK), FALSE, uResult);
-
+      RETURN( FALSE);
+   }
+
+   do
+   {
+      Status = co_MsqSendMessage( Window->MessageQueue,
+                                                  hWnd,
+                                                   Msg,
+                                                wParam,
+                                                lParam,
+                                              uTimeout,
+                                 (uFlags & SMTO_BLOCK),
+                                                 FALSE,
+                                               uResult);
+   }
+   while ((STATUS_TIMEOUT == Status) &&
+          (uFlags & SMTO_NOTIMEOUTIFNOTHUNG) &&
+          !MsqIsHung(Window->MessageQueue));
+
+   if ((!SameThread && (Window->ti->Hooks & HOOKID_TO_FLAG(WH_CALLWNDPROCRET))) ||
+        (SameThread && ISITHOOKED(WH_CALLWNDPROCRET)) )
+   {
+      CWPRETSTRUCT CWPR;
+      CWPR.hwnd    = hWnd;
+      CWPR.message = Msg;
+      CWPR.wParam  = wParam;
+      CWPR.lParam  = lParam;
+      CWPR.lResult = *uResult;
+      co_HOOK_CallHooks( WH_CALLWNDPROCRET, HC_ACTION, SameThread, (LPARAM)&CWPR );
+   }
 
    if (STATUS_TIMEOUT == Status)
    {
-      /* MSDN says GetLastError() should return 0 after timeout */
-      SetLastWin32Error(0);
-       RETURN( FALSE);
+/* 
+   MSDN says:
+      Microsoft Windows 2000: If GetLastError returns zero, then the function
+      timed out.
+      XP+ : If the function fails or times out, the return value is zero.
+      To get extended error information, call GetLastError. If GetLastError
+      returns ERROR_TIMEOUT, then the function timed out.
+ */
+      SetLastWin32Error(ERROR_TIMEOUT);
+      RETURN( FALSE);
    }
    else if (! NT_SUCCESS(Status))
    {
       SetLastNtError(Status);
-       RETURN( FALSE);
+      RETURN( FALSE);
    }
 
    RETURN( TRUE);
@@ -1506,8 +1605,7 @@
    }
    else
    {
-      if(!co_IntSendMessageTimeoutSingle(hWnd, Msg, wParam, lParam, SMTO_NORMAL, 0, &Result))
-      {
+      if(!co_IntSendMessageTimeoutSingle(hWnd, Msg, wParam, lParam, SMTO_NORMAL, 0, &Result))      {
          Result = 0;
       }
    }
@@ -1863,14 +1961,121 @@
    {
       return 0;
    }   
-   UserRefObjectCo(Window, &Ref);
    switch(dwType)
    {
       case FNID_DEFWINDOWPROC:
+         UserRefObjectCo(Window, &Ref);
          lResult = IntDefWindowProc(Window, Msg, wParam, lParam, Ansi);
+         UserDerefObjectCo(Window);
       break;
-   }
-   UserDerefObjectCo(Window);
+      case FNID_BROADCASTSYSTEMMESSAGE:
+      {
+         PBROADCASTPARM parm;
+         BOOL BadChk = FALSE;
+         DWORD_PTR RetVal = 0;
+         lResult = -1;
+
+         if (ResultInfo)
+         {
+            _SEH_TRY
+            {
+               ProbeForWrite((PVOID)ResultInfo,
+                         sizeof(BROADCASTPARM),
+                                             1);               
+               parm = (PBROADCASTPARM)ResultInfo;
+            }
+            _SEH_HANDLE
+            {
+               BadChk = TRUE;
+            }
+            _SEH_END;
+            if (BadChk) break;
+         }
+         else
+           break;
+
+         if ( parm->recipients & BSM_ALLDESKTOPS ||
+              parm->recipients == BSM_ALLCOMPONENTS )
+         {
+         }
+         else if (parm->recipients & BSM_APPLICATIONS)
+         {
+            if (parm->flags & BSF_QUERY)
+            {
+               if (parm->flags & BSF_FORCEIFHUNG || parm->flags & BSF_NOHANG)
+               {
+                  co_IntSendMessageTimeout( HWND_BROADCAST,
+                                            Msg,
+                                            wParam,
+                                            lParam,
+                                            SMTO_ABORTIFHUNG,
+                                            2000,
+                                            &RetVal);
+               }
+               else if (parm->flags & BSF_NOTIMEOUTIFNOTHUNG)
+               {
+                  co_IntSendMessageTimeout( HWND_BROADCAST,
+                                            Msg,
+                                            wParam,
+                                            lParam,
+                                            SMTO_NOTIMEOUTIFNOTHUNG,
+                                            2000,
+                                            &RetVal);
+               }
+               else
+               {
+                  co_IntSendMessageTimeout( HWND_BROADCAST,
+                                            Msg,
+                                            wParam,
+                                            lParam,
+                                            SMTO_NORMAL,
+                                            2000,
+                                            &RetVal);
+               }
+            }
+            else if (parm->flags & BSF_POSTMESSAGE)
+            {
+               lResult = UserPostMessage(HWND_BROADCAST, Msg, wParam, lParam);
+            }
+            else if ( parm->flags & BSF_SENDNOTIFYMESSAGE)
+            {
+               lResult = UserSendNotifyMessage(HWND_BROADCAST, Msg, wParam, lParam);
+            }
+         }
+      }
+      break;
+      case FNID_SENDMESSAGECALLBACK:
+      break;
+      case FNID_CALLWNDPROC:
+      {
+         CWPSTRUCT CWP;
+         PW32CLIENTINFO ClientInfo = GetWin32ClientInfo();
+         CWP.hwnd    = hWnd;
+         CWP.message = Msg;
+         CWP.wParam  = wParam;
+         CWP.lParam  = lParam;
+         lResult = co_HOOK_CallHooks( WH_CALLWNDPROC,
+                                      HC_ACTION,
+                                      ((ClientInfo->CI_flags & CI_CURTHPRHOOK) ? 1 : 0),
+                                      (LPARAM)&CWP );
+      }
+      break;
+      case FNID_CALLWNDPROCRET:
+      {
+         CWPRETSTRUCT CWPR;
+         PW32CLIENTINFO ClientInfo = GetWin32ClientInfo();
+         CWPR.hwnd    = hWnd;
+         CWPR.message = Msg;
+         CWPR.wParam  = wParam;
+         CWPR.lParam  = lParam;
+         CWPR.lResult = ClientInfo->dwHookData;
+         lResult = co_HOOK_CallHooks( WH_CALLWNDPROCRET,
+                                      HC_ACTION,
+                                      ((ClientInfo->CI_flags & CI_CURTHPRHOOK) ? 1 : 0),
+                                      (LPARAM)&CWPR );
+      }
+      break;
+   }
    UserLeave();
    return lResult;
 }

Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/msgqueue.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/msgqueue.c?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/msgqueue.c [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -70,7 +70,22 @@
 static VOID FASTCALL
 IdlePing(VOID)
 {
+  HWND hWnd;
+  PWINDOW_OBJECT Window;
   PW32PROCESS W32d = PsGetCurrentProcessWin32Process();
+
+  hWnd = UserGetForegroundWindow();
+
+  Window = UserGetWindowObject(hWnd);
+
+  if (Window && Window->ti)
+  {
+     if (Window->ti->Hooks & HOOKID_TO_FLAG(WH_FOREGROUNDIDLE))
+     {
+        co_HOOK_CallHooks(WH_FOREGROUNDIDLE,HC_ACTION,0,0);
+     }
+  }
+
   if (W32d && W32d->InputIdleEvent)
      KePulseEvent( W32d->InputIdleEvent, EVENT_INCREMENT, TRUE);
 }
@@ -159,6 +174,7 @@
    LARGE_INTEGER LargeTickCount;
    KIRQL OldIrql;
    ULONG Prev;
+   EVENTMSG Event;
 
    IntLockSystemMessageQueue(OldIrql);
 
@@ -175,6 +191,13 @@
 
    KeQueryTickCount(&LargeTickCount);
    Msg->time = MsqCalculateMessageTime(&LargeTickCount);
+
+   Event.message = Msg->message;
+   Event.time    = Msg->time;
+   Event.hwnd    = Msg->hwnd;
+   Event.paramL  = Msg->pt.x;
+   Event.paramH  = Msg->pt.y;
+   co_HOOK_CallHooks( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)&Event);
 
    /*
     * If we got WM_MOUSEMOVE and there are already messages in the
@@ -713,20 +736,36 @@
    MSG Msg;
    LARGE_INTEGER LargeTickCount;
    KBDLLHOOKSTRUCT KbdHookData;
+   EVENTMSG Event;
+
+   DPRINT("MsqPostKeyboardMessage(uMsg 0x%x, wParam 0x%x, lParam 0x%x)\n",
+          uMsg, wParam, lParam);
 
    // Condition may arise when calling MsqPostMessage and waiting for an event.
    if (!UserIsEntered()) UserEnterExclusive(); // Fixme: Not sure ATM if this thread is locked.
 
-   DPRINT("MsqPostKeyboardMessage(uMsg 0x%x, wParam 0x%x, lParam 0x%x)\n",
-          uMsg, wParam, lParam);
+   FocusMessageQueue = IntGetFocusMessageQueue();
 
    Msg.hwnd = 0;
+
+   if (FocusMessageQueue && (FocusMessageQueue->FocusWindow != (HWND)0))
+       Msg.hwnd = FocusMessageQueue->FocusWindow;
+
    Msg.message = uMsg;
    Msg.wParam = wParam;
    Msg.lParam = lParam;
 
    KeQueryTickCount(&LargeTickCount);
    Msg.time = MsqCalculateMessageTime(&LargeTickCount);
+
+   Event.message = Msg.message;
+   Event.hwnd    = Msg.hwnd;
+   Event.time    = Msg.time;
+   Event.paramL  = (Msg.wParam & 0xFF) | (HIWORD(Msg.lParam) << 8);
+   Event.paramH  = Msg.lParam & 0x7FFF;
+   if (HIWORD(Msg.lParam) & 0x0100) Event.paramH |= 0x8000;
+   co_HOOK_CallHooks( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)&Event);
+
    /* We can't get the Msg.pt point here since we don't know thread
       (and thus the window station) the message will end up in yet. */
 
@@ -744,7 +783,6 @@
       return;
    }
 
-   FocusMessageQueue = IntGetFocusMessageQueue();
    if (FocusMessageQueue == NULL)
    {
          DPRINT("No focus message queue\n");

Modified: branches/ros-amd64-bringup/reactos/tools/cabman/cabinet.cxx
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools/cabman/cabinet.cxx?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/cabman/cabinet.cxx [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/tools/cabman/cabinet.cxx [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -1694,8 +1694,7 @@
                 return CAB_STATUS_INVALID_CAB;
             }
 
-            *(unsigned char**)&CurrentIBuffer += BytesRead;
-
+            CurrentIBuffer = (unsigned char*)CurrentIBuffer + BytesRead;
             CurrentIBufferSize += (USHORT)BytesRead;
 
             if (CurrentIBufferSize == CAB_BLOCKSIZE)
@@ -3573,8 +3572,8 @@
     CurrentFolderNode->TotalFolderSize += (BytesWritten + sizeof(CFDATA));
     CurrentFolderNode->Folder.DataBlockCount++;
 
-    *(unsigned char**)&CurrentOBuffer += DataNode->Data.CompSize;
-    CurrentOBufferSize     -= DataNode->Data.CompSize;
+    CurrentOBuffer = (unsigned char*)CurrentOBuffer + DataNode->Data.CompSize;
+    CurrentOBufferSize -= DataNode->Data.CompSize;
 
     LastBlockStart += DataNode->Data.UncompSize;
 

Modified: branches/ros-amd64-bringup/reactos/tools/sysreg/os_support.cpp
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools/sysreg/os_support.cpp?rev=34779&r1=34778&r2=34779&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/sysreg/os_support.cpp [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/tools/sysreg/os_support.cpp [iso-8859-1] Fri Jul 25 08:10:00 2008
@@ -22,6 +22,8 @@
         size_t i;
 #if 0
 //        gettimeofday(&tm, 0);
+#else
+        memset(&tm, 0, sizeof(tm));
 #endif
         for (i = 0; i < s_Entries.size(); i++)
         {



More information about the Ros-diffs mailing list