10285{
10291 HKEY prodkey, patches, udprod;
10292 HKEY userkey, hpatch, udpatch;
10298
10302
10305
10306
10312 "Expected ERROR_INVALID_PARAMETER, got %d\n",
r);
10314 "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10316 "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10318
10319
10325 "Expected ERROR_INVALID_PARAMETER, got %d\n",
r);
10327 "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10329 "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10331
10332
10338 "Expected ERROR_INVALID_PARAMETER, got %d\n",
r);
10340 "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10342 "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10344
10345
10350 transforms, &
size);
10352 "Expected ERROR_INVALID_PARAMETER, got %d\n",
r);
10354 "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10356 "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10358
10359
10364 transforms, &
size);
10366 "Expected ERROR_UNKNOWN_PRODUCT, got %d\n",
r);
10368 "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10370 "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10372
10373
10378 transforms, &
size);
10380 "Expected ERROR_INVALID_PARAMETER, got %d\n",
r);
10382 "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10384 "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10386
10387
10388
10394 "Expected ERROR_UNKNOWN_PRODUCT, got %d\n",
r);
10396 "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10398 "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10400
10401 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\");
10403 lstrcatA(keypath,
"\\Installer\\Products\\");
10405
10408 {
10409 skip(
"Not enough rights to perform tests\n");
10411 return;
10412 }
10414
10415
10422 "Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10424 "Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10426
10429
10430
10436 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10437 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10439
10442
10443
10449 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10450 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10452
10455
10456
10462 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10463 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10465
10466 patch_squashed[
lstrlenA(patch_squashed) + 1] =
'\0';
10469
10470
10476 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10477 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10479
10482
10483
10489 ok(!
lstrcmpA(patch, patchcode),
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
10490 ok(!
lstrcmpA(transforms,
"whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
10492
10493
10498 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10500
10501
10506 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10508
10509
10514 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10515 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10516
10517
10523 ok(!
lstrcmpA(patch, patchcode),
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
10524 ok(!
lstrcmpA(transforms,
"whate"),
"Expected \"whate\", got \"%s\"\n", transforms);
10525 ok(
size == 8 ||
size == 16,
"Expected 8 or 16, got %lu\n",
size);
10526
10527
10533 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10534 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10536
10537
10543 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10544 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10546
10552
10553
10554
10560 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10561 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10563
10564 lstrcpyA(keypath,
"Software\\Microsoft\\Installer\\Products\\");
10566
10569
10570
10576 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10577 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10579
10582
10583
10589 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10590 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10592
10595
10596
10602 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10603 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10605
10608
10609
10615 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10616 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10618
10619 patch_squashed[
lstrlenA(patch_squashed) + 1] =
'\0';
10622
10623
10629 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10630 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10632
10635
10636
10642 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10643 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10645
10646 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
10649 lstrcatA(keypath, patch_squashed);
10650
10653 {
10654 skip(
"Not enough rights to perform tests\n");
10656 return;
10657 }
10659
10660
10666 ok(!
lstrcmpA(patch, patchcode),
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
10667 ok(!
lstrcmpA(transforms,
"whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
10669
10678
10679
10680
10686 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10687 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10689
10690 lstrcpyA(keypath,
"Software\\Classes\\Installer\\Products\\");
10692
10695 {
10696 skip(
"Not enough rights to perform tests\n");
10698 return;
10699 }
10701
10702
10708 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10709 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10711
10714
10715
10721 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10722 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10724
10727
10728
10734 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10735 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10737
10740
10741
10747 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10748 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10750
10751 patch_squashed[
lstrlenA(patch_squashed) + 1] =
'\0';
10754
10755
10761 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10762 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10764
10767
10768
10774 ok(!
lstrcmpA(patch, patchcode),
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
10775 ok(!
lstrcmpA(transforms,
"whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
10777
10778 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\");
10779 lstrcatA(keypath,
"Installer\\UserData\\S-1-5-18\\Products\\");
10781
10784
10785
10791 ok(!
lstrcmpA(patch, patchcode),
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
10792 ok(!
lstrcmpA(transforms,
"whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
10794
10797
10798
10804 ok(!
lstrcmpA(patch, patchcode),
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
10805 ok(!
lstrcmpA(transforms,
"whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
10807
10810
10811
10817 ok(!
lstrcmpA(patch,
"apple"),
"Expected lpPatchBuf to be unchanged, got \"%s\"\n", patch);
10818 ok(!
lstrcmpA(transforms,
"banana"),
"Expected lpTransformsBuf to be unchanged, got \"%s\"\n", transforms);
10820
10824
10825
10831 ok(!
lstrcmpA(patch, patchcode),
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
10832 ok(!
lstrcmpA(transforms,
"whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
10834
10835
10836
10837
10846 ok(!
lstrcmpA(patch, patchcode),
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
10847 ok(!
lstrcmpA(transforms,
"whate"),
"Expected \"whate\", got \"%s\"\n", transforms);
10848 ok(
size == 8,
"Expected 8, got %lu\n",
size);
10849
10850
10858 ok(!
lstrcmpA(patch, patchcode),
"Expected \"%s\", got \"%s\"\n", patchcode, patch);
10859 ok(!
lstrcmpA(transforms,
"whatever"),
"Expected \"whatever\", got \"%s\"\n", transforms);
10861
10876}
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
UINT WINAPI MsiEnumPatchesW(const WCHAR *szProduct, DWORD iPatchIndex, WCHAR *lpPatchBuf, WCHAR *lpTransformsBuf, DWORD *pcchTransformsBuf)
UINT WINAPI MsiEnumPatchesA(const char *szProduct, DWORD iPatchIndex, char *lpPatchBuf, char *lpTransformsBuf, DWORD *pcchTransformsBuf)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define ERROR_BAD_CONFIGURATION
#define HKEY_CURRENT_USER