setupapi: add SPFILENOTIFY_TARGETNEWER support to SetupDefaultQueueCallback

Robert Reif reif at earthlink.net
Fri Dec 15 10:49:44 CST 2006


-------------- next part --------------
Index: dlls/setupapi/queue.c
===================================================================
RCS file: /home/wine/wine/dlls/setupapi/queue.c,v
retrieving revision 1.24
diff -p -u -r1.24 queue.c
--- dlls/setupapi/queue.c	14 Nov 2006 11:15:45 -0000	1.24
+++ dlls/setupapi/queue.c	15 Dec 2006 16:38:56 -0000
@@ -1379,6 +1379,28 @@ UINT WINAPI SetupDefaultQueueCallbackA( 
     case SPFILENOTIFY_NEEDMEDIA:
         TRACE( "need media\n" );
         return FILEOP_SKIP;
+    case SPFILENOTIFY_TARGETNEWER:
+        TRACE( "target newer? Source: %s Target: %s\n",
+               debugstr_a(paths->Source), debugstr_a(paths->Target) );
+        {
+            WIN32_FILE_ATTRIBUTE_DATA Source, Target;
+
+            if (GetFileAttributesExA(paths->Source, GetFileExInfoStandard, &Source))
+            {
+                if (GetFileAttributesExA(paths->Target, GetFileExInfoStandard, &Target))
+                {
+                    TRACE( "Target = 0x%08x%08x, Source = 0x%08x%08x\n",
+                           Target.ftCreationTime.dwHighDateTime, Target.ftCreationTime.dwLowDateTime,
+                           Source.ftCreationTime.dwHighDateTime, Source.ftCreationTime.dwLowDateTime );
+
+                    if (CompareFileTime(&Target.ftCreationTime, &Source.ftCreationTime) == 1)
+                        return TRUE;
+
+                    return FALSE;
+                }
+            }
+        }
+        return FALSE;
     default:
         FIXME( "notification %d params %x,%x\n", notification, param1, param2 );
         break;
@@ -1444,6 +1466,28 @@ UINT WINAPI SetupDefaultQueueCallbackW( 
     case SPFILENOTIFY_NEEDMEDIA:
         TRACE( "need media\n" );
         return FILEOP_SKIP;
+    case SPFILENOTIFY_TARGETNEWER:
+        TRACE( "target newer? Source: %s Target: %s\n",
+               debugstr_w(paths->Source), debugstr_w(paths->Target) );
+        {
+            WIN32_FILE_ATTRIBUTE_DATA Source, Target;
+
+            if (GetFileAttributesExW(paths->Source, GetFileExInfoStandard, &Source))
+            {
+                if (GetFileAttributesExW(paths->Target, GetFileExInfoStandard, &Target))
+                {
+                    TRACE( "Target = 0x%08x%08x, Source = 0x%08x%08x\n",
+                           Target.ftCreationTime.dwHighDateTime, Target.ftCreationTime.dwLowDateTime,
+                           Source.ftCreationTime.dwHighDateTime, Source.ftCreationTime.dwLowDateTime );
+
+                    if (CompareFileTime(&Target.ftCreationTime, &Source.ftCreationTime) == 1)
+                        return TRUE;
+
+                    return FALSE;
+                }
+            }
+        }
+        return FALSE;
     default:
         FIXME( "notification %d params %x,%x\n", notification, param1, param2 );
         break;


More information about the wine-patches mailing list