[SHELL32]
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 6 Nov 2014 16:11:48 +0000 (16:11 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 6 Nov 2014 16:11:48 +0000 (16:11 +0000)
* Partial sync of changenotify.c with Wine 1.7.27.
CORE-8540

svn path=/branches/shell-experiments/; revision=65287

dll/win32/shell32/wine/changenotify.c

index 5c01e8e..75be39a 100644 (file)
@@ -50,13 +50,13 @@ typedef struct _NOTIFICATIONLIST
 {
     struct _NOTIFICATIONLIST *next;
     struct _NOTIFICATIONLIST *prev;
-    HWND hwnd;        /* window to notify */
-    DWORD uMsg;        /* message to send */
-    LPNOTIFYREGISTER apidl; /* array of entries to watch*/
-    UINT cidl;        /* number of pidls in array */
-    LONG wEventMask;    /* subscribed events */
+       HWND hwnd;              /* window to notify */
+       DWORD uMsg;             /* message to send */
+       LPNOTIFYREGISTER apidl; /* array of entries to watch*/
+       UINT cidl;              /* number of pidls in array */
+       LONG wEventMask;        /* subscribed events */
     LONG wSignalledEvent;   /* event that occurred */
-    DWORD dwFlags;        /* client flags */
+       DWORD dwFlags;          /* client flags */
     LPCITEMIDLIST pidlSignaled; /*pidl of the path that caused the signal*/
 
 } NOTIFICATIONLIST, *LPNOTIFICATIONLIST;
@@ -186,7 +186,7 @@ void FreeChangeNotifications(void)
 }
 
 /*************************************************************************
- * SHChangeNotifyRegister            [SHELL32.2]
+ * SHChangeNotifyRegister                      [SHELL32.2]
  *
  */
 ULONG WINAPI
@@ -204,7 +204,7 @@ SHChangeNotifyRegister(
     item = (NOTIFICATIONLIST *)SHAlloc(sizeof(NOTIFICATIONLIST));
 
     TRACE("(%p,0x%08x,0x%08x,0x%08x,%d,%p) item=%p\n",
-    hwnd, fSources, wEventMask, uMsg, cItems, lpItems, item);
+       hwnd, fSources, wEventMask, uMsg, cItems, lpItems, item);
 
     item->next = NULL;
     item->prev = NULL;
@@ -233,7 +233,7 @@ SHChangeNotifyRegister(
 }
 
 /*************************************************************************
- * SHChangeNotifyDeregister            [SHELL32.4]
+ * SHChangeNotifyDeregister                    [SHELL32.4]
  */
 BOOL WINAPI SHChangeNotifyDeregister(ULONG hNotify)
 {
@@ -248,15 +248,14 @@ BOOL WINAPI SHChangeNotifyDeregister(ULONG hNotify)
         DeleteNode(node);
 
     LeaveCriticalSection(&SHELL32_ChangenotifyCS);
-
     return node?TRUE:FALSE;
 }
 
 /*************************************************************************
- * SHChangeNotifyUpdateEntryList               [SHELL32.5]
+ * SHChangeNotifyUpdateEntryList                       [SHELL32.5]
  */
 EXTERN_C BOOL WINAPI SHChangeNotifyUpdateEntryList(DWORD unknown1, DWORD unknown2,
-                  DWORD unknown3, DWORD unknown4)
+                             DWORD unknown3, DWORD unknown4)
 {
     FIXME("(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
           unknown1, unknown2, unknown3, unknown4);
@@ -297,7 +296,7 @@ static BOOL should_notify( LPCITEMIDLIST changed, LPCITEMIDLIST watched, BOOL su
 }
 
 /*************************************************************************
- * SHChangeNotify                [SHELL32.@]
+ * SHChangeNotify                              [SHELL32.@]
  */
 void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
 {
@@ -324,11 +323,11 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
         return;
     }
 
-    if( ( ( wEventId & SHCNE_NOITEMEVENTS ) &&
+    if( ( ( wEventId & SHCNE_NOITEMEVENTS ) && 
           ( wEventId & ~SHCNE_NOITEMEVENTS ) ) ||
-        ( ( wEventId & SHCNE_ONEITEMEVENTS ) &&
+        ( ( wEventId & SHCNE_ONEITEMEVENTS ) && 
           ( wEventId & ~SHCNE_ONEITEMEVENTS ) ) ||
-        ( ( wEventId & SHCNE_TWOITEMEVENTS ) &&
+        ( ( wEventId & SHCNE_TWOITEMEVENTS ) && 
           ( wEventId & ~SHCNE_TWOITEMEVENTS ) ) )
     {
         WARN("mutually incompatible events listed\n");
@@ -485,13 +484,13 @@ EXTERN_C ULONG WINAPI NTSHChangeNotifyRegister(
 }
 
 /*************************************************************************
- * SHChangeNotification_Lock            [SHELL32.644]
+ * SHChangeNotification_Lock                   [SHELL32.644]
  */
 HANDLE WINAPI SHChangeNotification_Lock(
-    HANDLE hChange,
-    DWORD dwProcessId,
-    LPITEMIDLIST **lppidls,
-    LPLONG lpwEventId)
+       HANDLE hChange,
+       DWORD dwProcessId,
+       LPITEMIDLIST **lppidls,
+       LPLONG lpwEventId)
 {
     DWORD i;
     LPNOTIFICATIONLIST node;
@@ -499,8 +498,6 @@ HANDLE WINAPI SHChangeNotification_Lock(
 
     TRACE("%p %08x %p %p\n", hChange, dwProcessId, lppidls, lpwEventId);
 
-    /* EnterCriticalSection(&SHELL32_ChangenotifyCS); */
-
     node = FindNode( hChange );
     if( node )
     {
@@ -514,13 +511,11 @@ HANDLE WINAPI SHChangeNotification_Lock(
     else
         ERR("Couldn't find %p\n", hChange );
 
-    /* LeaveCriticalSection(&SHELL32_ChangenotifyCS); */
-
     return (HANDLE) node;
 }
 
 /*************************************************************************
- * SHChangeNotification_Unlock            [SHELL32.645]
+ * SHChangeNotification_Unlock                 [SHELL32.645]
  */
 BOOL WINAPI SHChangeNotification_Unlock ( HANDLE hLock)
 {
@@ -529,7 +524,7 @@ BOOL WINAPI SHChangeNotification_Unlock ( HANDLE hLock)
 }
 
 /*************************************************************************
- * NTSHChangeNotifyDeregister            [SHELL32.641]
+ * NTSHChangeNotifyDeregister                  [SHELL32.641]
  */
 EXTERN_C DWORD WINAPI NTSHChangeNotifyDeregister(ULONG x1)
 {