msvcp140: Skip _Reschedule_chore tests when CreateThreadpoolWork is not available.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c
index 8252865..9b1d7b1 100644
--- a/dlls/msvcp140/tests/msvcp140.c
+++ b/dlls/msvcp140/tests/msvcp140.c
@@ -487,6 +487,14 @@
     wait = WaitForSingleObject(event, 500);
     ok(wait == WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", wait);
 
+    if(!GetProcAddress(GetModuleHandleA("kernel32"), "CreateThreadpoolWork"))
+    {
+        win_skip("_Reschedule_chore not supported\n");
+        p__Release_chore(&chore);
+        CloseHandle(event);
+        return;
+    }
+
     old_chore = chore;
     ret = p__Schedule_chore(&chore);
     ok(!ret, "_Schedule_chore returned %d\n", ret);
@@ -505,6 +513,8 @@
     ok(chore.callback == chore_callback, "chore.callback = %p, expected %p\n", chore.callback, chore_callback);
     ok(chore.arg == event, "chore.arg = %p, expected %p\n", chore.arg, event);
     p__Release_chore(&chore);
+
+    CloseHandle(event);
 }
 
 static void test_to_byte(void)