Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • wine/wine
  • rbernon/wine
  • stefan/wine
  • FireBurn/wine
  • alesliehughes/wine
  • zhiyi/wine
  • huw/wine
  • jsikorski/wine
  • hmc/wine
  • dadangnh/wine
  • epo/wine
  • dlesho/wine
  • DarkShadow44/wine
  • iamahuman/wine
  • jacek/wine
  • mstorsjo/wine
  • gofman/wine
  • alexhenrie/wine
  • giomasce/wine
  • tclem/wine
  • besentv/wine
  • dlehman25/wine
  • aeikum/wine
  • cdavis5e/wine
  • sbaars/wine
  • baskanov/wine
  • pperdigao/wine
  • DavidHusicka/wine
  • DadSchoorse/wine
  • gverm/wine
  • bshanks/wine
  • gonzoMD/wine
  • Mystral/wine
  • tmatthies/wine
  • zlice/wine
  • AndreRH/wine
  • madewokherd/wine
  • zfigura/wine
  • fgouget/wine
  • nsivov/wine
  • ElementalWarrior/wine
  • piotr/wine
  • timozuccarello/wine
  • DavidCurtiss/wine
  • cmcadams/wine
  • davidebeatrici/wine
  • hans/wine
  • insn/wine
  • danrm/wine
  • jklemann/wine
  • saedo/wine
  • sgwaki/wine
  • puetzk/wine
  • bernhardu/wine
  • ReDress/wine
  • jlucfarias/wine
  • sloper42/wine
  • ivyl/wine
  • zhui/wine
  • julliard/wine
  • ClearlyClaire/wine
  • Alexander-Wilms/wine
  • rndtrash/wine
  • redmcg/wine
  • jkfloris/wine
  • maljaf/wine
  • Tuupertunut/wine
  • bsjeon/wine
  • tati/wine
  • whydoubt/wine
  • doitsujin/wine
  • shaunren/wine
  • szanni/wine
  • tobi.goergens/wine-cabinet-patch
  • winspool/wine
  • olivierfrdierick/wine
  • linkmauve/wine
  • jin-king1/wine
  • yeyeshun/wine
  • sulix/wine
  • bgc/wine
  • fanwenjie/wine
  • IncubusRK/wine
  • js6pak/wine
  • AurimasF/wine
  • etaash.mathamsetty/wine
  • hverbeet/wine
  • Fox2Code/wine
  • jhol/wine
  • jrueger/wine
  • afrantzis/wine
  • lauri.kentta/wine
  • ehoover/wine
  • cdenton/wine
  • jkloetzke/wine
  • baryluk/wine
  • restet/wine-personal
  • orudge/wine
  • Gcenx/wine
  • mstefani/wine
  • hibbsncc1701/wine
  • jchw/wine
  • moceap/wine
  • Skryptonyte/wine
  • marzent/wine
  • msmeissn/wine
  • learn-more/wine
  • logos128/wine
  • xe/wine
  • florian-kuebler/wine
  • eason329/wine
  • gang65/wine
  • binarymaster/wine
  • nbosio1001/wine
  • sh.owais95/wine
  • yaoyuan.0553/wine
  • AnthonyLaurienti/wine
  • mivanchev/wine
  • Hi-Angel/wine
  • vt/wine
  • wyrquill/wine
  • waynus/wine
  • wuliande/wine
  • yao.yuan.wn/wine
  • K1K1/wine
  • lukehutch1027/wine
  • etang-cw/wine
  • Josueblanco/wine
  • jplotz/wine
  • j20001970/wine
  • jsm174/wine
  • aricstewart/wine
  • uncoveryoureyestheresnosun/wine
  • VitorRamos/wine
  • 0e4ef622/wine
  • tj4048750/wine
  • xantares/wine
  • maxfigura/wine
  • sanane/wine
  • juniorjr9345/wine
  • lucaspereira1234/wine
  • gerald/wine
  • lepemiguel32/wine
  • caibb2018/wine
  • CNB_Kevin/wine
  • thc13/wine
  • jaihysc/wine
  • youngsecurity/wine
  • chendeqiang1024/wine
  • rhendric/wine
  • databoose/wine
  • memory-thrasher/wine
  • salman.tajik22/wine
  • CowFroggers/wine
  • kbdharun/wine
  • dreamer/wine
  • babyjoey711/wine
  • ripxorip/wine
  • PSzczepanski1996/wine
  • steveshe006/wine
  • joshua/wine
  • cmccarthy/wine
  • tomjansen/wine
  • sonyps5201314/wine
  • katelynnking4281/wine
  • dhary686/wine
  • mathematician/wine
  • rhabacker/wine
  • steveschnepp/wine
  • nekotekina/wine
  • Aaron1011/wine
  • catsout/wine
  • kasper93/wine
  • beef331/wine
  • ESD/wine
  • sarosib/wine
  • ghurmcardash/wine
  • AMZN-hgoffin/wine
  • gtmikw/wine
  • Keming/wine
  • dpjh747-gl/wine
  • tzluo/wine
  • rfz/wine
  • illia.a.polishchuk/wine
  • new_kleth/wine
  • serkan-maker/wine
  • w-flo/wine
  • mikayahlevi/wine
  • nulleve/wine
  • pgruebele/wine
  • athiele/wine
  • paparaha4/wine
  • novenary/wine
  • Plavil/wine
  • longjunyu/wine
  • chrisli/wine
  • samkottler/wine
  • danielzgtg/wine
  • twcassel/wine
  • guo/wine
  • didier31/wine
  • Zhaoyi/wine
  • twhitehead/wine
  • svyatpro/wine
  • infyquest/wine-iq-devel
  • sebres/wine
  • endrift/wine
  • zhengbl/wine
  • joelikeyan/wine
  • IsaacMarovitz/wine
  • LouiseTheGoldenGoddess/wine
  • SergeGautherie/wine
  • Klittiklatsch/wine
  • ldhacker/wine
  • dk1006498/wine
  • ishitatsuyuki/wine
  • h3c/wine
  • wincenty.bandyta41/wine
  • ayhankus482/wine
  • q4a/wine
  • mjgarton/wine
  • agusev/wine
  • vovams/wine
  • shardulsb08/wine
  • lylythechosenone/wine
  • artemist/wine
  • dropbear/wine
  • Cherser-s/wine
  • smayr/wine
  • loveptong/wine
  • chendeqiang/wine
  • gaber139/wine
  • shytzedaka/wine
  • ghkmufc/wine
  • TornadoCookie/wine
  • klownwolfman/wine
  • bylaws/wine
  • vitorhnn/wine
  • mide1337/wine
  • mewinkler/wine
  • firelzrd/wine
  • Samsuper/wine
  • kkartaltepe/wine
  • petravion/wine
  • Maaka00524/jacob-wine
  • petrathekat/wine
  • dj/wine
  • liam-middlebrook/wine
  • padolkarlucky/wine
  • maarten/wine
  • yhd986/wine
  • linkmecry/wine
  • tehrantoday/wine
  • xuxin12345/wine
  • dmjc/wine
  • sedwards/wine
  • hanslehnert/wine
  • 3ts75/wine
  • EkaterinePapava/wine
  • lav/wine
  • lygstate/wine
  • mxkrsv/wine
  • xutaxkamay/wine
  • cbialorucki/wine
  • yshui/wine
  • baikaishiuc/wine
  • HuwCampbell/wine
  • llde/wine
  • rockdrilla/wine
  • aidanhs/wine
  • SwimmingTiger/wine
  • fvalasiad/wine
  • zsoltiv/wine
  • mailnew4ster/wine
  • ake.rehnman/wine
  • IDocin/wine
  • dmitry/wine
  • Cthuflu/wine
  • corngood/wine
  • whindsaks/wine
  • telans/wine
  • DmitrySokolov/wine
  • Pospelove/wine
  • ellingtonsantos/wine
  • roro/wine
  • wurenny/wine
  • KokoseiJ/wine
  • amurzeau/wine
  • spazzymoto/wine
  • searchingin/wine
  • marler8997/wine
  • Alcaro/wine
  • aunali1/wine
  • snaccslocc420/wine
  • ajkhoury/wine
  • qsniyg/wine
  • Matheus-TestUser1/wine
  • adamrehn/wine
  • brobston/wine
  • aalyaev/wine
  • thongthai/wine
  • j.bayer1988/wine
  • skitt/wine
  • benben/wine
  • ahmouse15/wine
  • achurch/wine
  • mfaqiri2/wine
  • yseo/wine
  • kingjinni/wine
  • userid0x0/wine
  • titan/wine
  • Komoszek/wine
  • GamzeeRakoon/wine
  • joanluc/wine
  • Alan/wine
  • meshine/wine
  • EBADF/wine
  • vibhavp/wine
  • quininer/wine
  • pawelulita/wine
  • muek2211/wine
  • chenhaoyang/wine
  • nishiyama/wine
  • silviuxgaming/wine
  • nell/wine
  • 29jm/wine
  • arilou/wine
  • Mini-Gaunt/wine
  • DodoGTA/wine
  • davispuh/wine
  • mzent/wine
  • arakmar/wine
  • number201724/wine
  • yhd986/wine-up
  • rpisl/wine
  • zp1/wine-zp-cs-464
  • h0tc0d3/wine
  • Snowiiii/wine
  • gabrielb/wine
  • PureBulb/wine
  • OO/wine
  • Clara/wine
  • Saancreed/wine
  • enolp/wine
  • arthunix/wine
  • halfline/wine
  • carlo-bramini/wine
  • jfmu/wine
  • russelltg/wine
  • ntay/wine
  • YellowOnion/wine
  • niversesu/wine
  • gilvbp/wine
  • tingling0072/wine
  • DandD1517/wine
  • rastos/add-GetAnycastIpAddressTable
  • gnif/wine
  • gibsonpil/wine
  • antenabr2/wine
  • kvashis/wine
  • CKolle/wine
  • kubni/wine
  • ten0s/wine
  • Yvonne8873/wine
  • kurikaesu/wine
  • minggr/wine
  • JohnSebastienNadeau/wine
  • karshnicholas/wine
  • SamB/wine
  • apgrc/wine
  • Samiklom/wine
  • llyyr/wine
  • nberner/wine
  • katharinechui/wine
  • kirill.zhumarin/wine
  • vaxerski/wine
  • infiniteloop/wine
  • K0bin/wine
  • arethusa/wine
  • mrdeathjr28/wine
  • dank_meme/wine
  • dh/wine
  • tuomasjjrasanen/wine
  • mmcdonnell/wine
  • mxnny00/wine-manjaro-arch-compatibility
  • Joan/wine
  • g.mo.alcauter/wine
  • zhenbo_li/wine
  • tsmx/wine
  • xaqumin/wine
  • peterjc123/wine
  • ruslangaripov/wine
  • blyss/wine
  • xanathar/wine
  • michael.bond/wine
  • Quix0r/wine
  • sinisa.susnjar/wine
  • Rapid/wine
  • theli.ua/wine
  • shaun.din/wine
  • zhaohongxin/wine
  • dylan.eskew/wine
  • humbertoperezs991/wine
  • vaevi/wine
  • Riesi/wine
  • francisdb/wine
  • 1480c1/wine
  • trcrsired/wine
  • npatt/wine
  • muhammmadalli/wine9.0
  • Czahrien/wine
  • nilsen.jonas/wine
  • underdogest/wine
  • djordjem/wine
  • frubin/wine
  • LucasChollet/wine
  • lipengfei-loongson/wine
  • JacobCzekalla/wine-fork-jacob
  • omar_elantil/wine
  • lumarel/wine
  • principeagustin/wine
  • gotzl/wine
  • OneTester250376/wine
  • austin987/wine
  • unknown62627/wine
  • navi/wine
  • somedevfox/wine
  • notaz/wine
  • fcasas/wine
  • Asteroz/wine
  • MariusSchiffer/wine
  • kevinrmartinez/wine-devel
  • St1gven/wine
  • maarten256/wine
  • rcstarr87/wine
  • tinozzo123/wine
  • GermanAizek/wine
  • spencerwallace/wine
  • schloegl/wine
  • giuppococco/wine
  • shayan7878/wine
  • N080DY12/wine
  • ralf.habacker/wine
  • oh-ok/wine
  • johnporter/wine
  • Low-power/wine
  • thelande/wine
  • riyu12383/wine
  • kubapet/wine
  • Ivan_83/wine
  • SmithGoll/wine
  • gmesmer/wine
  • akarisu.de/wine
  • jwffrey9046/wine
  • anders/wine
  • markbhasawut/wine
  • dy-tea/wine
  • Benjamin_Loison/wine
  • frmdstryr/wine
  • zzam/wine
  • haydenhestad/wine
  • Deppy04/wine
  • osbre/wine
  • CharlottePabst/wine
  • SunlitTango/wine
  • ritalat/wine
  • AlexeyLushnikov/wine
  • mickdermack/wine
  • s1UMBa/wine
  • huangqinjin/wine
  • caseyr297/wine
  • d1saster/wine
  • ayufdh222/wine
  • janstrakowski/wine
  • petur/wine
  • matheus.venturini/wine-fix-ohm-sign
  • rayrapetyan/wine
  • xiaotong/wine
  • ovarley1/wine
  • dos1/wine
  • BZZZZ/wine
  • joesoroka/wine
  • toadking/wine
  • JoshuaBrest/wine
  • elias/wine
  • michele.dionisio/wine
  • garlett/wine-send-arp
  • eugenemcardle/wine
  • hugwijst/wine
  • whrvt/wine
  • loisgomez/wine
  • ramleejo/wine
  • self/wine
  • fr33z00/wine
  • JoeS209/wine
  • JacKeTUs/wine
  • nak.ak2015/wine
  • morgwai/wine
  • funfunctor/wine
  • donnyjoe/wine
  • sitter/wine
  • atticf/wine
  • xipster/wine
  • sebastian/wine
  • AlexanderWillner/wine
  • yaoyongjie/wine
  • wayne/wine
  • AMark/wine
  • zamaudio/wine
  • TomaszPakula/wine
  • Freakness109/wine
  • amorozov/wine
  • HP/wine
  • danlm/wine
  • rariema/wine
  • Biswa96/wine
  • rlippmann/wine
  • yangkun/wine
  • greyghoster/wine
519 results
Show changes
Commits on Source (77)
Showing
with 1256 additions and 990 deletions
...@@ -1227,6 +1227,7 @@ enable_msvcp120 ...@@ -1227,6 +1227,7 @@ enable_msvcp120
enable_msvcp120_app enable_msvcp120_app
enable_msvcp140 enable_msvcp140
enable_msvcp140_1 enable_msvcp140_1
enable_msvcp140_2
enable_msvcp140_atomic_wait enable_msvcp140_atomic_wait
enable_msvcp60 enable_msvcp60
enable_msvcp70 enable_msvcp70
...@@ -21657,6 +21658,7 @@ wine_fn_config_makefile dlls/msvcp140 enable_msvcp140 ...@@ -21657,6 +21658,7 @@ wine_fn_config_makefile dlls/msvcp140 enable_msvcp140
wine_fn_config_makefile dlls/msvcp140/tests enable_tests wine_fn_config_makefile dlls/msvcp140/tests enable_tests
wine_fn_config_makefile dlls/msvcp140_1 enable_msvcp140_1 wine_fn_config_makefile dlls/msvcp140_1 enable_msvcp140_1
wine_fn_config_makefile dlls/msvcp140_1/tests enable_tests wine_fn_config_makefile dlls/msvcp140_1/tests enable_tests
wine_fn_config_makefile dlls/msvcp140_2 enable_msvcp140_2
wine_fn_config_makefile dlls/msvcp140_atomic_wait enable_msvcp140_atomic_wait wine_fn_config_makefile dlls/msvcp140_atomic_wait enable_msvcp140_atomic_wait
wine_fn_config_makefile dlls/msvcp140_atomic_wait/tests enable_tests wine_fn_config_makefile dlls/msvcp140_atomic_wait/tests enable_tests
wine_fn_config_makefile dlls/msvcp60 enable_msvcp60 wine_fn_config_makefile dlls/msvcp60 enable_msvcp60
......
...@@ -2825,6 +2825,7 @@ WINE_CONFIG_MAKEFILE(dlls/msvcp140) ...@@ -2825,6 +2825,7 @@ WINE_CONFIG_MAKEFILE(dlls/msvcp140)
WINE_CONFIG_MAKEFILE(dlls/msvcp140/tests) WINE_CONFIG_MAKEFILE(dlls/msvcp140/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_1) WINE_CONFIG_MAKEFILE(dlls/msvcp140_1)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_1/tests) WINE_CONFIG_MAKEFILE(dlls/msvcp140_1/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_2)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait) WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait/tests) WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp60) WINE_CONFIG_MAKEFILE(dlls/msvcp60)
......
...@@ -1310,13 +1310,7 @@ static void test_reg_create_key(void) ...@@ -1310,13 +1310,7 @@ static void test_reg_create_key(void)
/* beginning backslash character */ /* beginning backslash character */
ret = RegCreateKeyExA(hkey_main, "\\Subkey3", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL); ret = RegCreateKeyExA(hkey_main, "\\Subkey3", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL);
if (!(GetVersion() & 0x80000000)) ok(ret == ERROR_BAD_PATHNAME, "expected ERROR_BAD_PATHNAME, got %ld\n", ret);
ok(ret == ERROR_BAD_PATHNAME, "expected ERROR_BAD_PATHNAME, got %ld\n", ret);
else {
ok(!ret, "RegCreateKeyExA failed with error %ld\n", ret);
RegDeleteKeyA(hkey1, "");
RegCloseKey(hkey1);
}
/* trailing backslash characters */ /* trailing backslash characters */
ret = RegCreateKeyExA(hkey_main, "Subkey4\\\\", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL); ret = RegCreateKeyExA(hkey_main, "Subkey4\\\\", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL);
...@@ -1327,13 +1321,13 @@ static void test_reg_create_key(void) ...@@ -1327,13 +1321,13 @@ static void test_reg_create_key(void)
/* WOW64 flags - open an existing key */ /* WOW64 flags - open an existing key */
hkey1 = NULL; hkey1 = NULL;
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_32KEY, NULL, &hkey1, NULL); ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_32KEY, NULL, &hkey1, NULL);
ok((ret == ERROR_SUCCESS && hkey1 != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), ok(ret == ERROR_SUCCESS && hkey1 != NULL,
"RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%lu)\n", ret); "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%lu)\n", ret);
RegCloseKey(hkey1); RegCloseKey(hkey1);
hkey1 = NULL; hkey1 = NULL;
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_64KEY, NULL, &hkey1, NULL); ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_64KEY, NULL, &hkey1, NULL);
ok((ret == ERROR_SUCCESS && hkey1 != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */), ok(ret == ERROR_SUCCESS && hkey1 != NULL,
"RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%lu)\n", ret); "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%lu)\n", ret);
RegCloseKey(hkey1); RegCloseKey(hkey1);
...@@ -2465,9 +2459,9 @@ static DWORD get_key_value( HKEY root, const char *name, DWORD flags ) ...@@ -2465,9 +2459,9 @@ static DWORD get_key_value( HKEY root, const char *name, DWORD flags )
HKEY key; HKEY key;
DWORD err, type, dw, len = sizeof(dw); DWORD err, type, dw, len = sizeof(dw);
err = RegCreateKeyExA( root, name, 0, NULL, 0, flags | KEY_ALL_ACCESS, NULL, &key, NULL ); err = RegOpenKeyExA( root, name, 0, flags | KEY_ALL_ACCESS, &key );
if (err == ERROR_FILE_NOT_FOUND) return 0; if (err == ERROR_FILE_NOT_FOUND) return 0;
ok( err == ERROR_SUCCESS, "%08lx: RegCreateKeyEx failed: %lu\n", flags, err ); ok( err == ERROR_SUCCESS, "%08lx: RegOpenKeyEx failed: %lu\n", flags, err );
err = RegQueryValueExA( key, "value", NULL, &type, (BYTE *)&dw, &len ); err = RegQueryValueExA( key, "value", NULL, &type, (BYTE *)&dw, &len );
if (err == ERROR_FILE_NOT_FOUND) if (err == ERROR_FILE_NOT_FOUND)
...@@ -2489,7 +2483,6 @@ static void test_redirection(void) ...@@ -2489,7 +2483,6 @@ static void test_redirection(void)
{ {
DWORD err, type, dw, len; DWORD err, type, dw, len;
HKEY key, root32, root64, key32, key64, native, op_key; HKEY key, root32, root64, key32, key64, native, op_key;
BOOL is_vista = FALSE;
REGSAM opposite = (sizeof(void*) == 8 ? KEY_WOW64_32KEY : KEY_WOW64_64KEY); REGSAM opposite = (sizeof(void*) == 8 ? KEY_WOW64_32KEY : KEY_WOW64_64KEY);
if (ptr_size != 64) if (ptr_size != 64)
...@@ -2548,186 +2541,121 @@ static void test_redirection(void) ...@@ -2548,186 +2541,121 @@ static void test_redirection(void)
KEY_ALL_ACCESS, NULL, &key, NULL ); KEY_ALL_ACCESS, NULL, &key, NULL );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
if (ptr_size == 32) check_key_value( key, "Wine\\Winetest", 0, ptr_size );
{ check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, ptr_size );
/* the Vista mechanism allows opening Wow6432Node from a 32-bit key too */ dw = get_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY );
/* the new (and simpler) Win7 mechanism doesn't */ todo_wine_if (ptr_size == 64) ok( dw == 32, "wrong value %lu\n", dw );
if (get_key_value( key, "Wow6432Node\\Wine\\Winetest", 0 ) == 32)
{ check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, ptr_size == 32 ? 0 : 32 );
trace( "using Vista-style Wow6432Node handling\n" ); check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, ptr_size == 32 ? 0 : 32 );
is_vista = TRUE; check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, ptr_size == 32 ? 0 : 32 );
}
check_key_value( key, "Wine\\Winetest", 0, 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, is_vista ? 32 : 0 );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 0 );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, is_vista ? 32 : 0 );
}
else
{
if (get_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY ) == 64)
{
trace( "using Vista-style Wow6432Node handling\n" );
is_vista = TRUE;
}
check_key_value( key, "Wine\\Winetest", 0, 64 );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 32 );
}
RegCloseKey( key ); RegCloseKey( key );
if (ptr_size == 32) err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0,
{ KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); dw = get_key_value( key, "Wine\\Winetest", 0 );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); ok( dw == 64 || broken(dw == 32) /* win7 */, "wrong value %lu\n", dw );
dw = get_key_value( key, "Wine\\Winetest", 0 ); check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, 64 );
ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %lu\n", dw ); dw = get_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, 64 ); todo_wine_if (ptr_size == 64) ok( dw == 32, "wrong value %lu\n", dw );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 32 );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 32 ); check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, 32 );
dw = get_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY ); check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 );
ok( dw == 32 || broken(dw == 64) /* xp64 */, "wrong value %lu\n", dw ); RegCloseKey( key );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 );
RegCloseKey( key ); err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0,
KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); check_key_value( key, "Wine\\Winetest", 0, 32 );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, 32 );
check_key_value( key, "Wine\\Winetest", 0, 32 ); check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 0 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, 0 );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, is_vista ? 32 : 0 ); check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 0 );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 0 ); RegCloseKey( key );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, is_vista ? 32 : 0 );
RegCloseKey( key );
}
else
{
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0,
KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
check_key_value( key, "Wine\\Winetest", 0, 64 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, 64 );
dw = get_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY );
todo_wine ok( dw == 32, "wrong value %lu\n", dw );
check_key_value( key, "Wow6432Node\\Wine\\Winetest", 0, 32 );
RegCloseKey( key );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0,
KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
check_key_value( key, "Wine\\Winetest", 0, 32 );
dw = get_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY );
ok( dw == 32 || broken(dw == 64) /* vista */, "wrong value %lu\n", dw );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
RegCloseKey( key );
}
check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", 0, ptr_size ); check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", 0, ptr_size );
check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", 0, 32 ); check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", 0, 32 );
if (ptr_size == 64) check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_64KEY, 64 );
{ check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_32KEY, 32 );
/* KEY_WOW64 flags have no effect on 64-bit */ check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, 32 );
check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_64KEY, 64 ); check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 );
check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_32KEY, 32 );
check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 );
}
else
{
check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_64KEY, 64 );
check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wine\\Winetest", KEY_WOW64_32KEY, 32 );
check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\Winetest", KEY_WOW64_32KEY, 32 );
}
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0, err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0,
KEY_ALL_ACCESS, NULL, &key, NULL ); KEY_ALL_ACCESS, NULL, &key, NULL );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
check_key_value( key, "Wine\\Winetest", 0, 32 ); check_key_value( key, "Wine\\Winetest", 0, 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
RegCloseKey( key ); RegCloseKey( key );
if (ptr_size == 32) err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0,
{ KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0, ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); check_key_value( key, "Wine\\Winetest", 0, 32 );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, 32 );
dw = get_key_value( key, "Wine\\Winetest", 0 ); check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
ok( dw == (is_vista ? 64 : 32) || broken(dw == 32) /* xp64 */, "wrong value %lu\n", dw ); RegCloseKey( key );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 ); err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0,
RegCloseKey( key ); KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node", 0, NULL, 0, check_key_value( key, "Wine\\Winetest", 0, 32 );
KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, 32 );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
check_key_value( key, "Wine\\Winetest", 0, 32 ); RegCloseKey( key );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Wine\\Winetest", KEY_WOW64_32KEY, 32 );
RegCloseKey( key );
}
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0, err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0,
KEY_ALL_ACCESS, NULL, &key, NULL ); KEY_ALL_ACCESS, NULL, &key, NULL );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
check_key_value( key, "Winetest", 0, 32 ); check_key_value( key, "Winetest", 0, 32 );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, 32 );
check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 );
RegCloseKey( key ); RegCloseKey( key );
if (ptr_size == 32) err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0,
{ KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0, ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); check_key_value( key, "Winetest", 0, 32 );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, 32 );
dw = get_key_value( key, "Winetest", 0 ); check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 );
ok( dw == 32 || (is_vista && dw == 64), "wrong value %lu\n", dw ); RegCloseKey( key );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 ); err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0,
RegCloseKey( key ); KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine", 0, NULL, 0, check_key_value( key, "Winetest", 0, 32 );
KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, 32 );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 );
check_key_value( key, "Winetest", 0, 32 ); RegCloseKey( key );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 );
RegCloseKey( key );
}
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0,
KEY_ALL_ACCESS, NULL, &key, NULL ); KEY_ALL_ACCESS, NULL, &key, NULL );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
check_key_value( key, "Winetest", 0, ptr_size ); check_key_value( key, "Winetest", 0, ptr_size );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : ptr_size ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, ptr_size );
dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY ); dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY );
todo_wine_if (ptr_size != 32) todo_wine_if (ptr_size != 32)
ok( dw == 32, "wrong value %lu\n", dw ); ok( dw == 32, "wrong value %lu\n", dw );
RegCloseKey( key ); RegCloseKey( key );
if (ptr_size == 32) err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0,
{ KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); check_key_value( key, "Winetest", 0, 64 );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, 64 );
dw = get_key_value( key, "Winetest", 0 ); dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY );
ok( dw == 64 || broken(dw == 32) /* xp64 */, "wrong value %lu\n", dw ); todo_wine ok( dw == 32, "wrong value %lu\n", dw );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, 64 ); RegCloseKey( key );
dw = get_key_value( key, "Winetest", KEY_WOW64_32KEY );
todo_wine ok( dw == 32, "wrong value %lu\n", dw ); err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0,
RegCloseKey( key ); KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err );
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Wine", 0, NULL, 0, check_key_value( key, "Winetest", 0, 32 );
KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &key, NULL ); check_key_value( key, "Winetest", KEY_WOW64_64KEY, 32 );
ok( err == ERROR_SUCCESS, "RegCreateKeyExA failed: %lu\n", err ); check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 );
check_key_value( key, "Winetest", 0, 32 ); RegCloseKey( key );
check_key_value( key, "Winetest", KEY_WOW64_64KEY, is_vista ? 64 : 32 );
check_key_value( key, "Winetest", KEY_WOW64_32KEY, 32 );
RegCloseKey( key );
}
if (pRegDeleteKeyExA) if (pRegDeleteKeyExA)
{ {
...@@ -2775,9 +2703,7 @@ static void test_redirection(void) ...@@ -2775,9 +2703,7 @@ static void test_redirection(void)
/* verify subkey is not present in native mode */ /* verify subkey is not present in native mode */
err = RegOpenKeyExA(native, "AWineTest", 0, KEY_ALL_ACCESS, &key); err = RegOpenKeyExA(native, "AWineTest", 0, KEY_ALL_ACCESS, &key);
ok(err == ERROR_FILE_NOT_FOUND || ok(err == ERROR_FILE_NOT_FOUND, "got %li\n", err);
broken(err == ERROR_SUCCESS), /* before Win7, HKCR is reflected instead of redirected */
"got %li\n", err);
err = pRegDeleteKeyExA(op_key, "AWineTest", opposite, 0); err = pRegDeleteKeyExA(op_key, "AWineTest", opposite, 0);
ok(err == ERROR_SUCCESS, "got %li\n", err); ok(err == ERROR_SUCCESS, "got %li\n", err);
......
...@@ -477,6 +477,9 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process) ...@@ -477,6 +477,9 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process)
{ {
static const WCHAR embeddingW[] = L" -Embedding"; static const WCHAR embeddingW[] = L" -Embedding";
HKEY key; HKEY key;
int arch = (sizeof(void *) > sizeof(int)) ? 64 : 32;
REGSAM opposite = (arch == 64) ? KEY_WOW64_32KEY : KEY_WOW64_64KEY;
BOOL is_wow64 = FALSE, is_opposite = FALSE;
HRESULT hr; HRESULT hr;
WCHAR command[MAX_PATH + ARRAY_SIZE(embeddingW)]; WCHAR command[MAX_PATH + ARRAY_SIZE(embeddingW)];
DWORD size = (MAX_PATH+1) * sizeof(WCHAR); DWORD size = (MAX_PATH+1) * sizeof(WCHAR);
...@@ -484,7 +487,14 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process) ...@@ -484,7 +487,14 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process)
PROCESS_INFORMATION pinfo; PROCESS_INFORMATION pinfo;
LONG ret; LONG ret;
TRACE("Attempting to start server for %s\n", debugstr_guid(rclsid));
hr = open_key_for_clsid(rclsid, L"LocalServer32", KEY_READ, &key); hr = open_key_for_clsid(rclsid, L"LocalServer32", KEY_READ, &key);
if (FAILED(hr) && (arch == 64 || (IsWow64Process(GetCurrentProcess(), &is_wow64) && is_wow64)))
{
hr = open_key_for_clsid(rclsid, L"LocalServer32", opposite | KEY_READ, &key);
is_opposite = TRUE;
}
if (FAILED(hr)) if (FAILED(hr))
{ {
ERR("class %s not registered\n", debugstr_guid(rclsid)); ERR("class %s not registered\n", debugstr_guid(rclsid));
...@@ -510,7 +520,19 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process) ...@@ -510,7 +520,19 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process)
/* FIXME: Win2003 supports a ServerExecutable value that is passed into /* FIXME: Win2003 supports a ServerExecutable value that is passed into
* CreateProcess */ * CreateProcess */
if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &sinfo, &pinfo)) if (is_opposite)
{
void *cookie;
Wow64DisableWow64FsRedirection(&cookie);
if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &sinfo, &pinfo))
{
WARN("failed to run local server %s\n", debugstr_w(command));
hr = HRESULT_FROM_WIN32(GetLastError());
}
Wow64RevertWow64FsRedirection(cookie);
if (FAILED(hr)) return hr;
}
else if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &sinfo, &pinfo))
{ {
WARN("failed to run local server %s\n", debugstr_w(command)); WARN("failed to run local server %s\n", debugstr_w(command));
return HRESULT_FROM_WIN32(GetLastError()); return HRESULT_FROM_WIN32(GetLastError());
...@@ -527,7 +549,7 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process) ...@@ -527,7 +549,7 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process)
HKEY key; HKEY key;
int arch = (sizeof(void *) > sizeof(int)) ? 64 : 32; int arch = (sizeof(void *) > sizeof(int)) ? 64 : 32;
REGSAM opposite = (arch == 64) ? KEY_WOW64_32KEY : KEY_WOW64_64KEY; REGSAM opposite = (arch == 64) ? KEY_WOW64_32KEY : KEY_WOW64_64KEY;
BOOL is_wow64 = FALSE; BOOL is_wow64 = FALSE, is_opposite = FALSE;
HRESULT hr; HRESULT hr;
WCHAR command[MAX_PATH + ARRAY_SIZE(processidW) + CHARS_IN_GUID]; WCHAR command[MAX_PATH + ARRAY_SIZE(processidW) + CHARS_IN_GUID];
DWORD size; DWORD size;
...@@ -548,6 +570,7 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process) ...@@ -548,6 +570,7 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process)
{ {
hr = open_appidkey_from_clsid(rclsid, opposite | KEY_READ, &key); hr = open_appidkey_from_clsid(rclsid, opposite | KEY_READ, &key);
if (FAILED(hr)) return hr; if (FAILED(hr)) return hr;
is_opposite = TRUE;
} }
size = (MAX_PATH + 1) * sizeof(WCHAR); size = (MAX_PATH + 1) * sizeof(WCHAR);
...@@ -574,7 +597,7 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process) ...@@ -574,7 +597,7 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process)
TRACE("Activating surrogate local server %s\n", debugstr_w(command)); TRACE("Activating surrogate local server %s\n", debugstr_w(command));
if (is_wow64 && arch == 64) if (is_opposite)
{ {
void *cookie; void *cookie;
Wow64DisableWow64FsRedirection(&cookie); Wow64DisableWow64FsRedirection(&cookie);
......
...@@ -267,9 +267,9 @@ ...@@ -267,9 +267,9 @@
@ stub -arch=arm ??1_SpinLock@details@Concurrency@@QAA@XZ @ stub -arch=arm ??1_SpinLock@details@Concurrency@@QAA@XZ
@ stub -arch=i386 ??1_SpinLock@details@Concurrency@@QAE@XZ @ stub -arch=i386 ??1_SpinLock@details@Concurrency@@QAE@XZ
@ stub -arch=win64 ??1_SpinLock@details@Concurrency@@QEAA@XZ @ stub -arch=win64 ??1_SpinLock@details@Concurrency@@QEAA@XZ
@ stub -arch=arm ??1_StructuredTaskCollection@details@Concurrency@@QAA@XZ @ cdecl -arch=arm ??1_StructuredTaskCollection@details@Concurrency@@QAA@XZ(ptr) _StructuredTaskCollection_dtor
@ stub -arch=i386 ??1_StructuredTaskCollection@details@Concurrency@@QAE@XZ @ thiscall -arch=i386 ??1_StructuredTaskCollection@details@Concurrency@@QAE@XZ(ptr) _StructuredTaskCollection_dtor
@ stub -arch=win64 ??1_StructuredTaskCollection@details@Concurrency@@QEAA@XZ @ cdecl -arch=win64 ??1_StructuredTaskCollection@details@Concurrency@@QEAA@XZ(ptr) _StructuredTaskCollection_dtor
@ stub -arch=arm ??1_TaskCollection@details@Concurrency@@QAA@XZ @ stub -arch=arm ??1_TaskCollection@details@Concurrency@@QAA@XZ
@ stub -arch=i386 ??1_TaskCollection@details@Concurrency@@QAE@XZ @ stub -arch=i386 ??1_TaskCollection@details@Concurrency@@QAE@XZ
@ stub -arch=win64 ??1_TaskCollection@details@Concurrency@@QEAA@XZ @ stub -arch=win64 ??1_TaskCollection@details@Concurrency@@QEAA@XZ
...@@ -434,9 +434,9 @@ ...@@ -434,9 +434,9 @@
@ stub -arch=i386 ?_Assign@_Concurrent_queue_iterator_base_v4@details@Concurrency@@IAEXABV123@@Z @ stub -arch=i386 ?_Assign@_Concurrent_queue_iterator_base_v4@details@Concurrency@@IAEXABV123@@Z
@ stub -arch=win64 ?_Assign@_Concurrent_queue_iterator_base_v4@details@Concurrency@@IEAAXAEBV123@@Z @ stub -arch=win64 ?_Assign@_Concurrent_queue_iterator_base_v4@details@Concurrency@@IEAAXAEBV123@@Z
@ extern ?_Byte_reverse_table@details@Concurrency@@3QBEB byte_reverse_table @ extern ?_Byte_reverse_table@details@Concurrency@@3QBEB byte_reverse_table
@ stub -arch=arm ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QAAXXZ @ cdecl -arch=arm ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QAAXXZ(ptr) _StructuredTaskCollection__Cancel
@ stub -arch=i386 ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QAEXXZ @ thiscall -arch=i386 ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QAEXXZ(ptr) _StructuredTaskCollection__Cancel
@ stub -arch=win64 ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QEAAXXZ @ cdecl -arch=win64 ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QEAAXXZ(ptr) _StructuredTaskCollection__Cancel
@ stub -arch=arm ?_Cancel@_TaskCollection@details@Concurrency@@QAAXXZ @ stub -arch=arm ?_Cancel@_TaskCollection@details@Concurrency@@QAAXXZ
@ stub -arch=i386 ?_Cancel@_TaskCollection@details@Concurrency@@QAEXXZ @ stub -arch=i386 ?_Cancel@_TaskCollection@details@Concurrency@@QAEXXZ
@ stub -arch=win64 ?_Cancel@_TaskCollection@details@Concurrency@@QEAAXXZ @ stub -arch=win64 ?_Cancel@_TaskCollection@details@Concurrency@@QEAAXXZ
...@@ -537,9 +537,9 @@ ...@@ -537,9 +537,9 @@
@ stub -arch=arm ?_Internal_throw_exception@_Concurrent_vector_base_v4@details@Concurrency@@IBAXI@Z @ stub -arch=arm ?_Internal_throw_exception@_Concurrent_vector_base_v4@details@Concurrency@@IBAXI@Z
@ thiscall -arch=i386 ?_Internal_throw_exception@_Concurrent_vector_base_v4@details@Concurrency@@IBEXI@Z(ptr long) _vector_base_v4__Internal_throw_exception @ thiscall -arch=i386 ?_Internal_throw_exception@_Concurrent_vector_base_v4@details@Concurrency@@IBEXI@Z(ptr long) _vector_base_v4__Internal_throw_exception
@ cdecl -arch=win64 ?_Internal_throw_exception@_Concurrent_vector_base_v4@details@Concurrency@@IEBAX_K@Z(ptr long) _vector_base_v4__Internal_throw_exception @ cdecl -arch=win64 ?_Internal_throw_exception@_Concurrent_vector_base_v4@details@Concurrency@@IEBAX_K@Z(ptr long) _vector_base_v4__Internal_throw_exception
@ stub -arch=arm ?_IsCanceling@_StructuredTaskCollection@details@Concurrency@@QAA_NXZ @ cdecl -arch=arm ?_IsCanceling@_StructuredTaskCollection@details@Concurrency@@QAA_NXZ(ptr) _StructuredTaskCollection__IsCanceling
@ stub -arch=i386 ?_IsCanceling@_StructuredTaskCollection@details@Concurrency@@QAE_NXZ @ thiscall -arch=i386 ?_IsCanceling@_StructuredTaskCollection@details@Concurrency@@QAE_NXZ(ptr) _StructuredTaskCollection__IsCanceling
@ stub -arch=win64 ?_IsCanceling@_StructuredTaskCollection@details@Concurrency@@QEAA_NXZ @ cdecl -arch=win64 ?_IsCanceling@_StructuredTaskCollection@details@Concurrency@@QEAA_NXZ(ptr) _StructuredTaskCollection__IsCanceling
@ stub -arch=arm ?_IsCanceling@_TaskCollection@details@Concurrency@@QAA_NXZ @ stub -arch=arm ?_IsCanceling@_TaskCollection@details@Concurrency@@QAA_NXZ
@ stub -arch=i386 ?_IsCanceling@_TaskCollection@details@Concurrency@@QAE_NXZ @ stub -arch=i386 ?_IsCanceling@_TaskCollection@details@Concurrency@@QAE_NXZ
@ stub -arch=win64 ?_IsCanceling@_TaskCollection@details@Concurrency@@QEAA_NXZ @ stub -arch=win64 ?_IsCanceling@_TaskCollection@details@Concurrency@@QEAA_NXZ
...@@ -588,18 +588,18 @@ ...@@ -588,18 +588,18 @@
@ cdecl -arch=arm ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAAXXZ(ptr) SpinWait__Reset @ cdecl -arch=arm ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAAXXZ(ptr) SpinWait__Reset
@ thiscall -arch=i386 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAEXXZ(ptr) SpinWait__Reset @ thiscall -arch=i386 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAEXXZ(ptr) SpinWait__Reset
@ cdecl -arch=win64 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IEAAXXZ(ptr) SpinWait__Reset @ cdecl -arch=win64 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IEAAXXZ(ptr) SpinWait__Reset
@ stub -arch=arm ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stdcall -arch=arm ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) _StructuredTaskCollection__RunAndWait
@ stub -arch=i386 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stdcall -arch=i386 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) _StructuredTaskCollection__RunAndWait
@ stub -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z @ stdcall -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z(ptr ptr) _StructuredTaskCollection__RunAndWait
@ stub -arch=arm ?_RunAndWait@_TaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=arm ?_RunAndWait@_TaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z
@ stub -arch=i386 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=i386 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z
@ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z
@ stub -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z @ cdecl -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z(ptr ptr) _StructuredTaskCollection__Schedule
@ stub -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z @ thiscall -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z(ptr ptr) _StructuredTaskCollection__Schedule
@ stub -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z @ cdecl -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z(ptr ptr) _StructuredTaskCollection__Schedule
@ stub -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@PAVlocation@3@@Z @ cdecl -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@PAVlocation@3@@Z(ptr ptr ptr) _StructuredTaskCollection__Schedule_loc
@ stub -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@PAVlocation@3@@Z @ thiscall -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@PAVlocation@3@@Z(ptr ptr ptr) _StructuredTaskCollection__Schedule_loc
@ stub -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@PEAVlocation@3@@Z @ cdecl -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@PEAVlocation@3@@Z(ptr ptr ptr) _StructuredTaskCollection__Schedule_loc
@ stub -arch=arm ?_Schedule@_TaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z @ stub -arch=arm ?_Schedule@_TaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z
@ stub -arch=i386 ?_Schedule@_TaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z @ stub -arch=i386 ?_Schedule@_TaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z
@ stub -arch=win64 ?_Schedule@_TaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_Schedule@_TaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z
......
...@@ -643,14 +643,20 @@ struct d2d_effect_registration ...@@ -643,14 +643,20 @@ struct d2d_effect_registration
struct list entry; struct list entry;
PD2D1_EFFECT_FACTORY factory; PD2D1_EFFECT_FACTORY factory;
UINT32 registration_count; UINT32 registration_count;
BOOL builtin;
CLSID id; CLSID id;
UINT32 input_count; UINT32 input_count;
UINT32 default_input_count;
struct d2d_effect_properties properties; struct d2d_effect_properties properties;
}; };
struct d2d_factory;
void d2d_effects_init_builtins(struct d2d_factory *factory) DECLSPEC_HIDDEN;
struct d2d_effect_registration * d2d_factory_get_registered_effect(ID2D1Factory *factory, struct d2d_effect_registration * d2d_factory_get_registered_effect(ID2D1Factory *factory,
const GUID *effect_id) DECLSPEC_HIDDEN; const GUID *effect_id) DECLSPEC_HIDDEN;
void d2d_factory_register_effect(struct d2d_factory *factory,
struct d2d_effect_registration *effect) DECLSPEC_HIDDEN;
struct d2d_transform_graph struct d2d_transform_graph
{ {
......
...@@ -229,6 +229,76 @@ static const struct d2d_effect_info builtin_effects[] = ...@@ -229,6 +229,76 @@ static const struct d2d_effect_info builtin_effects[] =
{&CLSID_D2D1Grayscale, 1, 1, 1}, {&CLSID_D2D1Grayscale, 1, 1, 1},
}; };
void d2d_effects_init_builtins(struct d2d_factory *factory)
{
struct d2d_effect_registration *effect;
unsigned int i;
for (i = 0; i < ARRAY_SIZE(builtin_effects); ++i)
{
const struct d2d_effect_info *info = &builtin_effects[i];
WCHAR max_inputs[32];
if (!(effect = calloc(1, sizeof(*effect))))
return;
swprintf(max_inputs, ARRAY_SIZE(max_inputs), L"%lu", info->max_inputs);
d2d_effect_properties_add(&effect->properties, L"MinInputs", D2D1_PROPERTY_MIN_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, L"1");
d2d_effect_properties_add(&effect->properties, L"MaxInputs", D2D1_PROPERTY_MAX_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, max_inputs);
memcpy(&effect->id, info->clsid, sizeof(*info->clsid));
effect->default_input_count = info->default_input_count;
effect->factory = builtin_factory_stub;
effect->builtin = TRUE;
d2d_factory_register_effect(factory, effect);
}
}
/* Same syntax is used for value and default values. */
static HRESULT d2d_effect_parse_float_array(D2D1_PROPERTY_TYPE type, const WCHAR *value,
float *vec)
{
unsigned int i, num_components;
WCHAR *end_ptr;
/* Type values are sequential. */
switch (type)
{
case D2D1_PROPERTY_TYPE_VECTOR2:
case D2D1_PROPERTY_TYPE_VECTOR3:
case D2D1_PROPERTY_TYPE_VECTOR4:
num_components = (type - D2D1_PROPERTY_TYPE_VECTOR2) + 2;
break;
case D2D1_PROPERTY_TYPE_MATRIX_3X2:
num_components = 6;
break;
case D2D1_PROPERTY_TYPE_MATRIX_4X3:
case D2D1_PROPERTY_TYPE_MATRIX_4X4:
case D2D1_PROPERTY_TYPE_MATRIX_5X4:
num_components = (type - D2D1_PROPERTY_TYPE_MATRIX_4X3) * 4 + 12;
break;
default:
return E_UNEXPECTED;
}
if (*(value++) != '(') return E_INVALIDARG;
for (i = 0; i < num_components; ++i)
{
vec[i] = wcstof(value, &end_ptr);
if (value == end_ptr) return E_INVALIDARG;
value = end_ptr;
/* Trailing characters after last component are ignored. */
if (i == num_components - 1) continue;
if (*(value++) != ',') return E_INVALIDARG;
}
return S_OK;
}
static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *props, static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *props,
const WCHAR *name, UINT32 index, BOOL subprop, D2D1_PROPERTY_TYPE type, const WCHAR *value) const WCHAR *name, UINT32 index, BOOL subprop, D2D1_PROPERTY_TYPE type, const WCHAR *value)
{ {
...@@ -238,7 +308,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * ...@@ -238,7 +308,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *
0, /* D2D1_PROPERTY_TYPE_STRING */ 0, /* D2D1_PROPERTY_TYPE_STRING */
sizeof(BOOL), /* D2D1_PROPERTY_TYPE_BOOL */ sizeof(BOOL), /* D2D1_PROPERTY_TYPE_BOOL */
sizeof(UINT32), /* D2D1_PROPERTY_TYPE_UINT32 */ sizeof(UINT32), /* D2D1_PROPERTY_TYPE_UINT32 */
sizeof(INT32), /* D2D1_PROPERTY_TYPE_IN32 */ sizeof(INT32), /* D2D1_PROPERTY_TYPE_INT32 */
sizeof(float), /* D2D1_PROPERTY_TYPE_FLOAT */ sizeof(float), /* D2D1_PROPERTY_TYPE_FLOAT */
2 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR2 */ 2 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR2 */
3 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR3 */ 3 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR3 */
...@@ -255,6 +325,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * ...@@ -255,6 +325,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *
sizeof(void *), /* D2D1_PROPERTY_TYPE_COLOR_CONTEXT */ sizeof(void *), /* D2D1_PROPERTY_TYPE_COLOR_CONTEXT */
}; };
struct d2d_effect_property *p; struct d2d_effect_property *p;
HRESULT hr;
assert(type >= D2D1_PROPERTY_TYPE_STRING && type <= D2D1_PROPERTY_TYPE_COLOR_CONTEXT); assert(type >= D2D1_PROPERTY_TYPE_STRING && type <= D2D1_PROPERTY_TYPE_COLOR_CONTEXT);
...@@ -302,6 +373,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * ...@@ -302,6 +373,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *
{ {
void *src = NULL; void *src = NULL;
UINT32 _uint32; UINT32 _uint32;
float _vec[20];
CLSID _clsid; CLSID _clsid;
BOOL _bool; BOOL _bool;
...@@ -314,6 +386,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * ...@@ -314,6 +386,7 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *
switch (p->type) switch (p->type)
{ {
case D2D1_PROPERTY_TYPE_UINT32: case D2D1_PROPERTY_TYPE_UINT32:
case D2D1_PROPERTY_TYPE_INT32:
case D2D1_PROPERTY_TYPE_ENUM: case D2D1_PROPERTY_TYPE_ENUM:
_uint32 = wcstoul(value, NULL, 10); _uint32 = wcstoul(value, NULL, 10);
src = &_uint32; src = &_uint32;
...@@ -328,6 +401,21 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * ...@@ -328,6 +401,21 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *
CLSIDFromString(value, &_clsid); CLSIDFromString(value, &_clsid);
src = &_clsid; src = &_clsid;
break; break;
case D2D1_PROPERTY_TYPE_VECTOR2:
case D2D1_PROPERTY_TYPE_VECTOR3:
case D2D1_PROPERTY_TYPE_VECTOR4:
case D2D1_PROPERTY_TYPE_MATRIX_3X2:
case D2D1_PROPERTY_TYPE_MATRIX_4X3:
case D2D1_PROPERTY_TYPE_MATRIX_4X4:
case D2D1_PROPERTY_TYPE_MATRIX_5X4:
if (FAILED(hr = d2d_effect_parse_float_array(p->type, value, _vec)))
{
WARN("Failed to parse float array %s for type %u.\n",
wine_dbgstr_w(value), p->type);
return hr;
}
src = _vec;
break;
case D2D1_PROPERTY_TYPE_IUNKNOWN: case D2D1_PROPERTY_TYPE_IUNKNOWN:
case D2D1_PROPERTY_TYPE_COLOR_CONTEXT: case D2D1_PROPERTY_TYPE_COLOR_CONTEXT:
break; break;
...@@ -1478,31 +1566,14 @@ static void d2d_effect_init_properties_vtbls(struct d2d_effect *effect) ...@@ -1478,31 +1566,14 @@ static void d2d_effect_init_properties_vtbls(struct d2d_effect *effect)
HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effect_id, HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effect_id,
ID2D1Effect **effect) ID2D1Effect **effect)
{ {
const struct d2d_effect_info *builtin = NULL;
struct d2d_effect_context *effect_context; struct d2d_effect_context *effect_context;
const struct d2d_effect_registration *reg; const struct d2d_effect_registration *reg;
unsigned int i, default_input_count;
struct d2d_transform_graph *graph; struct d2d_transform_graph *graph;
PD2D1_EFFECT_FACTORY factory;
struct d2d_effect *object; struct d2d_effect *object;
WCHAR clsidW[39]; WCHAR clsidW[39];
HRESULT hr; HRESULT hr;
if (!(reg = d2d_factory_get_registered_effect(context->factory, effect_id))) if (!(reg = d2d_factory_get_registered_effect(context->factory, effect_id)))
{
for (i = 0; i < ARRAY_SIZE(builtin_effects); ++i)
{
const struct d2d_effect_info *info = &builtin_effects[i];
if (IsEqualGUID(effect_id, info->clsid))
{
builtin = info;
break;
}
}
}
if (!reg && !builtin)
{ {
WARN("Effect id %s not found.\n", wine_dbgstr_guid(effect_id)); WARN("Effect id %s not found.\n", wine_dbgstr_guid(effect_id));
return D2DERR_EFFECT_IS_NOT_REGISTERED; return D2DERR_EFFECT_IS_NOT_REGISTERED;
...@@ -1533,41 +1604,17 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec ...@@ -1533,41 +1604,17 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec
object->graph = graph; object->graph = graph;
/* Create properties */ /* Create properties */
StringFromGUID2(effect_id, clsidW, ARRAY_SIZE(clsidW)); d2d_effect_duplicate_properties(&object->properties, &reg->properties);
if (builtin)
{
WCHAR max_inputs[32];
swprintf(max_inputs, ARRAY_SIZE(max_inputs), L"%lu", builtin->max_inputs);
d2d_effect_properties_add(&object->properties, L"MinInputs", D2D1_PROPERTY_MIN_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, L"1");
d2d_effect_properties_add(&object->properties, L"MaxInputs", D2D1_PROPERTY_MAX_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, max_inputs);
default_input_count = builtin->default_input_count;
factory = builtin_factory_stub;
}
else
{
d2d_effect_duplicate_properties(&object->properties, &reg->properties);
d2d_effect_properties_add(&object->properties, L"MinInputs", D2D1_PROPERTY_MIN_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, L"1");
d2d_effect_properties_add(&object->properties, L"MaxInputs", D2D1_PROPERTY_MAX_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, L"1" /* FIXME */);
default_input_count = 1;
factory = reg->factory;
}
StringFromGUID2(effect_id, clsidW, ARRAY_SIZE(clsidW));
d2d_effect_properties_add(&object->properties, L"CLSID", D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, clsidW); d2d_effect_properties_add(&object->properties, L"CLSID", D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, clsidW);
d2d_effect_properties_add(&object->properties, L"Cached", D2D1_PROPERTY_CACHED, D2D1_PROPERTY_TYPE_BOOL, L"false"); d2d_effect_properties_add(&object->properties, L"Cached", D2D1_PROPERTY_CACHED, D2D1_PROPERTY_TYPE_BOOL, L"false");
d2d_effect_properties_add(&object->properties, L"Precision", D2D1_PROPERTY_PRECISION, D2D1_PROPERTY_TYPE_ENUM, L"0"); d2d_effect_properties_add(&object->properties, L"Precision", D2D1_PROPERTY_PRECISION, D2D1_PROPERTY_TYPE_ENUM, L"0");
d2d_effect_init_properties_vtbls(object); d2d_effect_init_properties_vtbls(object);
d2d_effect_SetInputCount(&object->ID2D1Effect_iface, default_input_count); d2d_effect_SetInputCount(&object->ID2D1Effect_iface, reg->default_input_count);
if (FAILED(hr = factory((IUnknown **)&object->impl))) if (FAILED(hr = reg->factory((IUnknown **)&object->impl)))
{ {
WARN("Failed to create implementation object, hr %#lx.\n", hr); WARN("Failed to create implementation object, hr %#lx.\n", hr);
ID2D1Effect_Release(&object->ID2D1Effect_iface); ID2D1Effect_Release(&object->ID2D1Effect_iface);
......
...@@ -48,6 +48,7 @@ struct d2d_factory ...@@ -48,6 +48,7 @@ struct d2d_factory
float dpi_y; float dpi_y;
struct list effects; struct list effects;
INIT_ONCE init_builtins;
CRITICAL_SECTION cs; CRITICAL_SECTION cs;
}; };
...@@ -67,12 +68,31 @@ static inline struct d2d_factory *impl_from_ID2D1Multithread(ID2D1Multithread *i ...@@ -67,12 +68,31 @@ static inline struct d2d_factory *impl_from_ID2D1Multithread(ID2D1Multithread *i
return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Multithread_iface); return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Multithread_iface);
} }
static BOOL WINAPI d2d_factory_builtins_initonce(INIT_ONCE *once, void *param, void **context)
{
d2d_effects_init_builtins(param);
return TRUE;
}
static void d2d_factory_init_builtin_effects(struct d2d_factory *factory)
{
InitOnceExecuteOnce(&factory->init_builtins, d2d_factory_builtins_initonce, factory, NULL);
}
void d2d_factory_register_effect(struct d2d_factory *factory, struct d2d_effect_registration *effect)
{
list_add_tail(&factory->effects, &effect->entry);
}
struct d2d_effect_registration * d2d_factory_get_registered_effect(ID2D1Factory *iface, struct d2d_effect_registration * d2d_factory_get_registered_effect(ID2D1Factory *iface,
const GUID *id) const GUID *id)
{ {
const struct d2d_factory *factory = unsafe_impl_from_ID2D1Factory(iface); struct d2d_factory *factory = unsafe_impl_from_ID2D1Factory(iface);
struct d2d_effect_registration *reg; struct d2d_effect_registration *reg;
d2d_effects_init_builtins(factory);
LIST_FOR_EACH_ENTRY(reg, &factory->effects, struct d2d_effect_registration, entry) LIST_FOR_EACH_ENTRY(reg, &factory->effects, struct d2d_effect_registration, entry)
{ {
if (IsEqualGUID(id, &reg->id)) return reg; if (IsEqualGUID(id, &reg->id)) return reg;
...@@ -884,10 +904,13 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Facto ...@@ -884,10 +904,13 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Facto
TRACE("iface %p, effect_id %s, property_xml %p, bindings %p, binding_count %u, effect_factory %p.\n", TRACE("iface %p, effect_id %s, property_xml %p, bindings %p, binding_count %u, effect_factory %p.\n",
iface, debugstr_guid(effect_id), property_xml, bindings, binding_count, effect_factory); iface, debugstr_guid(effect_id), property_xml, bindings, binding_count, effect_factory);
LIST_FOR_EACH_ENTRY(effect, &factory->effects, struct d2d_effect_registration, entry) d2d_factory_init_builtin_effects(factory);
LIST_FOR_EACH_ENTRY_REV(effect, &factory->effects, struct d2d_effect_registration, entry)
{ {
if (IsEqualGUID(effect_id, &effect->id)) if (IsEqualGUID(effect_id, &effect->id))
{ {
if (effect->builtin) return E_INVALIDARG;
++effect->registration_count; ++effect->registration_count;
return S_OK; return S_OK;
} }
...@@ -921,7 +944,8 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Facto ...@@ -921,7 +944,8 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Facto
if (!parse_effect_get_property(effect, L"DisplayName") if (!parse_effect_get_property(effect, L"DisplayName")
|| !parse_effect_get_property(effect, L"Author") || !parse_effect_get_property(effect, L"Author")
|| !parse_effect_get_property(effect, L"Category") || !parse_effect_get_property(effect, L"Category")
|| !parse_effect_get_property(effect, L"Description")) || !parse_effect_get_property(effect, L"Description")
|| !parse_effect_get_property(effect, L"Inputs"))
{ {
WARN("Missing required properties.\n"); WARN("Missing required properties.\n");
d2d_effect_registration_cleanup(effect); d2d_effect_registration_cleanup(effect);
...@@ -947,7 +971,12 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Facto ...@@ -947,7 +971,12 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Facto
effect->registration_count = 1; effect->registration_count = 1;
effect->id = *effect_id; effect->id = *effect_id;
effect->factory = effect_factory; effect->factory = effect_factory;
list_add_tail(&factory->effects, &effect->entry); d2d_effect_properties_add(&effect->properties, L"MinInputs", D2D1_PROPERTY_MIN_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, L"1");
d2d_effect_properties_add(&effect->properties, L"MaxInputs", D2D1_PROPERTY_MAX_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, L"1" /* FIXME */);
effect->default_input_count = 1;
d2d_factory_register_effect(factory, effect);
return S_OK; return S_OK;
} }
...@@ -986,10 +1015,13 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_UnregisterEffect(ID2D1Factory3 *ifa ...@@ -986,10 +1015,13 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_UnregisterEffect(ID2D1Factory3 *ifa
TRACE("iface %p, effect_id %s.\n", iface, debugstr_guid(effect_id)); TRACE("iface %p, effect_id %s.\n", iface, debugstr_guid(effect_id));
LIST_FOR_EACH_ENTRY(effect, &factory->effects, struct d2d_effect_registration, entry) d2d_factory_init_builtin_effects(factory);
LIST_FOR_EACH_ENTRY_REV(effect, &factory->effects, struct d2d_effect_registration, entry)
{ {
if (IsEqualGUID(effect_id, &effect->id)) if (IsEqualGUID(effect_id, &effect->id))
{ {
if (effect->builtin) break;
if (!--effect->registration_count) if (!--effect->registration_count)
{ {
list_remove(&effect->entry); list_remove(&effect->entry);
...@@ -1005,10 +1037,36 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_UnregisterEffect(ID2D1Factory3 *ifa ...@@ -1005,10 +1037,36 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_UnregisterEffect(ID2D1Factory3 *ifa
static HRESULT STDMETHODCALLTYPE d2d_factory_GetRegisteredEffects(ID2D1Factory3 *iface, static HRESULT STDMETHODCALLTYPE d2d_factory_GetRegisteredEffects(ID2D1Factory3 *iface,
CLSID *effects, UINT32 effect_count, UINT32 *returned, UINT32 *registered) CLSID *effects, UINT32 effect_count, UINT32 *returned, UINT32 *registered)
{ {
FIXME("iface %p, effects %p, effect_count %u, returned %p, registered %p stub!\n", struct d2d_factory *factory = impl_from_ID2D1Factory3(iface);
struct d2d_effect_registration *effect;
UINT32 ret, reg;
TRACE("iface %p, effects %p, effect_count %u, returned %p, registered %p.\n",
iface, effects, effect_count, returned, registered); iface, effects, effect_count, returned, registered);
return E_NOTIMPL; if (!returned) returned = &ret;
if (!registered) registered = &reg;
*registered = 0;
*returned = 0;
d2d_factory_init_builtin_effects(factory);
LIST_FOR_EACH_ENTRY(effect, &factory->effects, struct d2d_effect_registration, entry)
{
if (effects && effect_count)
{
*effects = effect->id;
effects++;
effect_count--;
*returned += 1;
}
*registered += 1;
}
if (!effects) return S_OK;
return *returned == *registered ? S_OK : D2DERR_INSUFFICIENT_BUFFER;
} }
static HRESULT STDMETHODCALLTYPE d2d_factory_GetEffectProperties(ID2D1Factory3 *iface, static HRESULT STDMETHODCALLTYPE d2d_factory_GetEffectProperties(ID2D1Factory3 *iface,
...@@ -1155,6 +1213,7 @@ static void d2d_factory_init(struct d2d_factory *factory, D2D1_FACTORY_TYPE fact ...@@ -1155,6 +1213,7 @@ static void d2d_factory_init(struct d2d_factory *factory, D2D1_FACTORY_TYPE fact
d2d_factory_reload_sysmetrics(factory); d2d_factory_reload_sysmetrics(factory);
list_init(&factory->effects); list_init(&factory->effects);
InitializeCriticalSection(&factory->cs); InitializeCriticalSection(&factory->cs);
InitOnceInitialize(&factory->init_builtins);
} }
HRESULT WINAPI D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid, HRESULT WINAPI D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid,
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "initguid.h" #include "initguid.h"
#include "dwrite.h" #include "dwrite.h"
#include "wincodec.h" #include "wincodec.h"
#include "wine/heap.h"
   
DEFINE_GUID(CLSID_TestEffect, 0xb9ee12e9,0x32d9,0xe659,0xac,0x61,0x2d,0x7c,0xea,0x69,0x28,0x78); DEFINE_GUID(CLSID_TestEffect, 0xb9ee12e9,0x32d9,0xe659,0xac,0x61,0x2d,0x7c,0xea,0x69,0x28,0x78);
DEFINE_GUID(GUID_TestVertexShader, 0x5bcdcfae,0x1e92,0x4dc1,0x94,0xfa,0x3b,0x01,0xca,0x54,0x59,0x20); DEFINE_GUID(GUID_TestVertexShader, 0x5bcdcfae,0x1e92,0x4dc1,0x94,0xfa,0x3b,0x01,0xca,0x54,0x59,0x20);
...@@ -50,10 +49,54 @@ L"<?xml version='1.0'?> \ ...@@ -50,10 +49,54 @@ L"<?xml version='1.0'?> \
<Property name='Max' type='uint32' value='100'/> \ <Property name='Max' type='uint32' value='100'/> \
<Property name='Default' type='uint32' value='10'/> \ <Property name='Default' type='uint32' value='10'/> \
</Property> \ </Property> \
<Property name='Int32Prop' type='int32' value='-2'> \
<Property name='DisplayName' type='string' value='Int32 prop'/> \
<Property name='Default' type='int32' value='10'/> \
</Property> \
<Property name='UInt32Prop' type='uint32' value='-3'> \
<Property name='DisplayName' type='string' value='UInt32 prop'/> \
<Property name='Default' type='uint32' value='10'/> \
</Property> \
<Property name='Bool' type='bool'> \ <Property name='Bool' type='bool'> \
<Property name='DisplayName' type='string' value='Bool property'/> \ <Property name='DisplayName' type='string' value='Bool property'/> \
<Property name='Default' type='bool' value='false'/> \ <Property name='Default' type='bool' value='false'/> \
</Property> \ </Property> \
<Property name='Vec2Prop' type='vector2' value='( 3.0, 4.0)'> \
<Property name='DisplayName' type='string' value='Vec2 prop'/> \
<Property name='Default' type='vector2' value='(1.0, 2.0)'/> \
</Property> \
<Property name='Vec3Prop' type='vector3' value='(5.0, 6.0, 7.0)'> \
<Property name='DisplayName' type='string' value='Vec3 prop'/> \
<Property name='Default' type='vector3' value='(0.1, 0.2, 0.3)'/> \
</Property> \
<Property name='Vec4Prop' type='vector4' value='(8.0,9.0,10.0,11.0)'> \
<Property name='DisplayName' type='string' value='Vec4 prop'/> \
<Property name='Default' type='vector4' value='(0.8,0.9,1.0,1.1)'/> \
</Property> \
<Property name='Mat3x2Prop' type='matrix3x2' \
value='(1.0,2.0,3.0,4.0,5.0,6.0)'> \
<Property name='DisplayName' type='string' value='Mat3x2 prop'/> \
<Property name='Default' type='matrix3x2' \
value='(0.1,0.2,0.3,0.4,0.5,0.6)'/> \
</Property> \
<Property name='Mat4x3Prop' type='matrix4x3' \
value='(1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12)'> \
<Property name='DisplayName' type='string' value='Mat4x3 prop'/> \
<Property name='Default' type='matrix4x3' \
value='(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2)'/> \
</Property> \
<Property name='Mat4x4Prop' type='matrix4x4' \
value='(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)'> \
<Property name='DisplayName' type='string' value='Mat4x4 prop'/> \
<Property name='Default' type='matrix4x4' \
value='(16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1)'/> \
</Property> \
<Property name='Mat5x4Prop' type='matrix5x4' \
value='(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)'> \
<Property name='DisplayName' type='string' value='Mat5x4 prop'/> \
<Property name='Default' type='matrix5x4' \
value='(20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1)'/>\
</Property> \
</Effect> \ </Effect> \
"; ";
   
...@@ -314,7 +357,7 @@ static void queue_d3d1x_test(void (*test)(BOOL d3d11), BOOL d3d11) ...@@ -314,7 +357,7 @@ static void queue_d3d1x_test(void (*test)(BOOL d3d11), BOOL d3d11)
if (mt_test_count >= mt_tests_size) if (mt_test_count >= mt_tests_size)
{ {
mt_tests_size = max(16, mt_tests_size * 2); mt_tests_size = max(16, mt_tests_size * 2);
mt_tests = heap_realloc(mt_tests, mt_tests_size * sizeof(*mt_tests)); mt_tests = realloc(mt_tests, mt_tests_size * sizeof(*mt_tests));
} }
mt_tests[mt_test_count].test = test; mt_tests[mt_test_count].test = test;
mt_tests[mt_test_count++].d3d11 = d3d11; mt_tests[mt_test_count++].d3d11 = d3d11;
...@@ -364,7 +407,7 @@ static void run_queued_tests(void) ...@@ -364,7 +407,7 @@ static void run_queued_tests(void)
   
GetSystemInfo(&si); GetSystemInfo(&si);
thread_count = si.dwNumberOfProcessors; thread_count = si.dwNumberOfProcessors;
threads = heap_calloc(thread_count, sizeof(*threads)); threads = calloc(thread_count, sizeof(*threads));
for (i = 0, test_idx = 0; i < thread_count; ++i) for (i = 0, test_idx = 0; i < thread_count; ++i)
{ {
threads[i] = CreateThread(NULL, 0, thread_func, &test_idx, 0, NULL); threads[i] = CreateThread(NULL, 0, thread_func, &test_idx, 0, NULL);
...@@ -375,7 +418,7 @@ static void run_queued_tests(void) ...@@ -375,7 +418,7 @@ static void run_queued_tests(void)
{ {
CloseHandle(threads[i]); CloseHandle(threads[i]);
} }
heap_free(threads); free(threads);
} }
   
static void set_point(D2D1_POINT_2F *point, float x, float y) static void set_point(D2D1_POINT_2F *point, float x, float y)
...@@ -10636,7 +10679,7 @@ static ULONG STDMETHODCALLTYPE effect_impl_Release(ID2D1EffectImpl *iface) ...@@ -10636,7 +10679,7 @@ static ULONG STDMETHODCALLTYPE effect_impl_Release(ID2D1EffectImpl *iface)
{ {
if (effect_impl->effect_context) if (effect_impl->effect_context)
ID2D1EffectContext_Release(effect_impl->effect_context); ID2D1EffectContext_Release(effect_impl->effect_context);
heap_free(effect_impl); free(effect_impl);
} }
   
return refcount; return refcount;
...@@ -10674,7 +10717,7 @@ static HRESULT STDMETHODCALLTYPE effect_impl_create(IUnknown **effect_impl) ...@@ -10674,7 +10717,7 @@ static HRESULT STDMETHODCALLTYPE effect_impl_create(IUnknown **effect_impl)
{ {
struct effect_impl *object; struct effect_impl *object;
   
if (!(object = heap_alloc(sizeof(*object)))) if (!(object = calloc(1, sizeof(*object))))
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
   
object->ID2D1EffectImpl_iface.lpVtbl = &effect_impl_vtbl; object->ID2D1EffectImpl_iface.lpVtbl = &effect_impl_vtbl;
...@@ -10804,6 +10847,11 @@ static void test_effect_register(BOOL d3d11) ...@@ -10804,6 +10847,11 @@ static void test_effect_register(BOOL d3d11)
return; return;
} }
   
/* Using builtin effect CLSID. */
hr = ID2D1Factory1_RegisterEffectFromString(factory, &CLSID_D2D1Crop, effect_xml_a, NULL,
0, effect_impl_create);
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* Register effect once */ /* Register effect once */
for (i = 0; i < ARRAY_SIZE(xml_tests); ++i) for (i = 0; i < ARRAY_SIZE(xml_tests); ++i)
{ {
...@@ -10811,7 +10859,6 @@ static void test_effect_register(BOOL d3d11) ...@@ -10811,7 +10859,6 @@ static void test_effect_register(BOOL d3d11)
winetest_push_context("Test %u", i); winetest_push_context("Test %u", i);
   
hr = ID2D1Factory1_RegisterEffectFromString(factory, &CLSID_TestEffect, test->xml, NULL, 0, effect_impl_create); hr = ID2D1Factory1_RegisterEffectFromString(factory, &CLSID_TestEffect, test->xml, NULL, 0, effect_impl_create);
todo_wine_if(i == 5)
ok(hr == test->hr, "Got unexpected hr %#lx, expected %#lx.\n", hr, test->hr); ok(hr == test->hr, "Got unexpected hr %#lx, expected %#lx.\n", hr, test->hr);
if (hr == S_OK) if (hr == S_OK)
{ {
...@@ -10890,7 +10937,11 @@ static void test_effect_register(BOOL d3d11) ...@@ -10890,7 +10937,11 @@ static void test_effect_register(BOOL d3d11)
hr = ID2D1Factory1_RegisterEffectFromString(factory, &CLSID_TestEffect, hr = ID2D1Factory1_RegisterEffectFromString(factory, &CLSID_TestEffect,
test->effect_xml, test->binding, test->binding_count, effect_impl_create); test->effect_xml, test->binding, test->binding_count, effect_impl_create);
ok(hr == test->hr, "Got unexpected hr %#lx, expected %#lx.\n", hr, test->hr); ok(hr == test->hr, "Got unexpected hr %#lx, expected %#lx.\n", hr, test->hr);
ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect); if (SUCCEEDED(hr))
{
hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
}
   
winetest_pop_context(); winetest_pop_context();
} }
...@@ -11022,6 +11073,7 @@ static void test_effect_properties(BOOL d3d11) ...@@ -11022,6 +11073,7 @@ static void test_effect_properties(BOOL d3d11)
UINT32 i, min_inputs, max_inputs, integer, index, size; UINT32 i, min_inputs, max_inputs, integer, index, size;
ID2D1EffectContext *effect_context; ID2D1EffectContext *effect_context;
D2D1_BUFFER_PRECISION precision; D2D1_BUFFER_PRECISION precision;
float vec2[2], vec3[3], vec4[4];
ID2D1Properties *subproperties; ID2D1Properties *subproperties;
D2D1_PROPERTY_TYPE prop_type; D2D1_PROPERTY_TYPE prop_type;
struct d2d1_test_context ctx; struct d2d1_test_context ctx;
...@@ -11029,6 +11081,8 @@ static void test_effect_properties(BOOL d3d11) ...@@ -11029,6 +11081,8 @@ static void test_effect_properties(BOOL d3d11)
ID2D1Effect *effect; ID2D1Effect *effect;
UINT32 count, data; UINT32 count, data;
WCHAR buffer[128]; WCHAR buffer[128];
float mat[20];
INT32 _int32;
CLSID clsid; CLSID clsid;
BOOL cached; BOOL cached;
HRESULT hr; HRESULT hr;
...@@ -11119,6 +11173,113 @@ static void test_effect_properties(BOOL d3d11) ...@@ -11119,6 +11173,113 @@ static void test_effect_properties(BOOL d3d11)
ok(!wcscmp(buffer, L"IsReadOnly"), "Unexpected name %s.\n", wine_dbgstr_w(buffer)); ok(!wcscmp(buffer, L"IsReadOnly"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
   
ID2D1Properties_Release(subproperties); ID2D1Properties_Release(subproperties);
/* Int32 property. */
index = ID2D1Effect_GetPropertyIndex(effect, L"Int32Prop");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"Int32Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_INT32, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_INT32, (BYTE *)&_int32, sizeof(_int32));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(_int32 == -2, "Unexpected value %d.\n", _int32);
/* UInt32 property. */
index = ID2D1Effect_GetPropertyIndex(effect, L"UInt32Prop");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"UInt32Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_UINT32, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&integer, sizeof(integer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(integer == -3, "Unexpected value %u.\n", integer);
/* Vector2 property. */
index = ID2D1Effect_GetPropertyIndex(effect, L"Vec2Prop");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"Vec2Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_VECTOR2, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_VECTOR2, (BYTE *)vec2, sizeof(vec2));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(vec2[0] == 3.0f && vec2[1] == 4.0f, "Unexpected vector (%.8e,%.8e).\n", vec2[0], vec2[1]);
/* Vector3 property. */
index = ID2D1Effect_GetPropertyIndex(effect, L"Vec3Prop");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"Vec3Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_VECTOR3, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_VECTOR3, (BYTE *)vec3, sizeof(vec3));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(vec3[0] == 5.0f && vec3[1] == 6.0f && vec3[2] == 7.0f, "Unexpected vector (%.8e,%.8e,%.8e).\n",
vec3[0], vec3[1], vec3[2]);
/* Vector4 property. */
index = ID2D1Effect_GetPropertyIndex(effect, L"Vec4Prop");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"Vec4Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_VECTOR4, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_VECTOR4, (BYTE *)vec4, sizeof(vec4));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(vec4[0] == 8.0f && vec4[1] == 9.0f && vec4[2] == 10.0f && vec4[3] == 11.0f,
"Unexpected vector (%.8e,%.8e,%.8e,%.8e).\n", vec4[0], vec4[1], vec4[2], vec4[3]);
/* Matrix3x2 property. */
index = ID2D1Effect_GetPropertyIndex(effect, L"Mat3x2Prop");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"Mat3x2Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_MATRIX_3X2, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_MATRIX_3X2, (BYTE *)mat, 6 * sizeof(float));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(mat[0] == 1.0f && mat[1] == 2.0f && mat[2] == 3.0f && mat[3] == 4.0f && mat[4] == 5.0f && mat[5] == 6.0f,
"Unexpected matrix (%.8e,%.8e,%.8e,%.8e,%.8e,%.8e).\n",
mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
/* Matrix4x3 property. */
index = ID2D1Effect_GetPropertyIndex(effect, L"Mat4x3Prop");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"Mat4x3Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_MATRIX_4X3, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_MATRIX_4X3, (BYTE *)mat, 12 * sizeof(float));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < 12; ++i)
ok(mat[i] == 1.0f + i, "Unexpected matrix element %u.\n", i);
/* Matrix4x4 property. */
index = ID2D1Effect_GetPropertyIndex(effect, L"Mat4x4Prop");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"Mat4x4Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_MATRIX_4X4, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_MATRIX_4X4, (BYTE *)mat, 16 * sizeof(float));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < 16; ++i)
ok(mat[i] == 1.0f + i, "Unexpected matrix element %u.\n", i);
/* Matrix5x4 property. */
index = ID2D1Effect_GetPropertyIndex(effect, L"Mat5x4Prop");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"Mat5x4Prop"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_MATRIX_5X4, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_MATRIX_5X4, (BYTE *)mat, 20 * sizeof(float));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < 20; ++i)
ok(mat[i] == 1.0f + i, "Unexpected matrix element %u.\n", i);
ID2D1Effect_Release(effect); ID2D1Effect_Release(effect);
   
hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect); hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect);
...@@ -11773,6 +11934,69 @@ static void test_effect_grayscale(BOOL d3d11) ...@@ -11773,6 +11934,69 @@ static void test_effect_grayscale(BOOL d3d11)
release_test_context(&ctx); release_test_context(&ctx);
} }
   
static void test_registered_effects(BOOL d3d11)
{
UINT32 ret, count, count2, count3;
struct d2d1_test_context ctx;
ID2D1Factory1 *factory;
CLSID *effects;
HRESULT hr;
if (!init_test_context(&ctx, d3d11))
return;
factory = ctx.factory1;
count = 0;
hr = ID2D1Factory1_GetRegisteredEffects(factory, NULL, 0, NULL, &count);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count > 0, "Unexpected effect count %u.\n", count);
hr = ID2D1Factory1_RegisterEffectFromString(factory, &CLSID_TestEffect, effect_xml_a,
NULL, 0, effect_impl_create);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count2 = 0;
hr = ID2D1Factory1_GetRegisteredEffects(factory, NULL, 0, NULL, &count2);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count2 == count + 1, "Unexpected effect count %u.\n", count2);
effects = calloc(count2, sizeof(*effects));
count3 = 0;
hr = ID2D1Factory1_GetRegisteredEffects(factory, effects, 0, NULL, &count3);
ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr);
ok(count2 == count3, "Unexpected effect count %u.\n", count3);
ret = 999;
hr = ID2D1Factory1_GetRegisteredEffects(factory, effects, 0, &ret, NULL);
ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr);
ok(!ret, "Unexpected count %u.\n", ret);
ret = 0;
hr = ID2D1Factory1_GetRegisteredEffects(factory, effects, 1, &ret, NULL);
ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr);
ok(ret == 1, "Unexpected count %u.\n", ret);
ok(!IsEqualGUID(effects, &CLSID_TestEffect), "Unexpected clsid.\n");
ret = 0;
hr = ID2D1Factory1_GetRegisteredEffects(factory, effects, count2, &ret, NULL);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ret == count2, "Unexpected count %u.\n", ret);
ok(IsEqualGUID(&effects[ret - 1], &CLSID_TestEffect), "Unexpected clsid.\n");
free(effects);
ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect);
count2 = 0;
hr = ID2D1Factory1_GetRegisteredEffects(factory, NULL, 0, NULL, &count2);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count2 == count, "Unexpected effect count %u.\n", count2);
release_test_context(&ctx);
}
static void test_stroke_contains_point(BOOL d3d11) static void test_stroke_contains_point(BOOL d3d11)
{ {
ID2D1TransformedGeometry *transformed_geometry; ID2D1TransformedGeometry *transformed_geometry;
...@@ -12587,6 +12811,7 @@ START_TEST(d2d1) ...@@ -12587,6 +12811,7 @@ START_TEST(d2d1)
queue_test(test_effect_2d_affine); queue_test(test_effect_2d_affine);
queue_test(test_effect_crop); queue_test(test_effect_crop);
queue_test(test_effect_grayscale); queue_test(test_effect_grayscale);
queue_test(test_registered_effects);
queue_d3d10_test(test_stroke_contains_point); queue_d3d10_test(test_stroke_contains_point);
queue_test(test_image_bounds); queue_test(test_image_bounds);
queue_test(test_bitmap_map); queue_test(test_bitmap_map);
......
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d3d10core.dll TESTDLL = d3d10core.dll
IMPORTS = d3d10 dxgi user32 IMPORTS = d3d10 dxgi user32
......
This diff is collapsed.
EXTRADEFS = -DD3DX10_SDK_VERSION=34 -DWINE_NO_LONG_TYPES EXTRADEFS = -DD3DX10_SDK_VERSION=34
TESTDLL = d3dx10_34.dll TESTDLL = d3dx10_34.dll
IMPORTS = d3dx10_34 ole32 gdi32 IMPORTS = d3dx10_34 ole32 gdi32
PARENTSRC = ../../d3dx10_43/tests PARENTSRC = ../../d3dx10_43/tests
......
EXTRADEFS = -DD3DX10_SDK_VERSION=35 -DWINE_NO_LONG_TYPES EXTRADEFS = -DD3DX10_SDK_VERSION=35
TESTDLL = d3dx10_35.dll TESTDLL = d3dx10_35.dll
IMPORTS = d3dx10_35 ole32 gdi32 IMPORTS = d3dx10_35 ole32 gdi32
PARENTSRC = ../../d3dx10_43/tests PARENTSRC = ../../d3dx10_43/tests
......
EXTRADEFS = -DD3DX10_SDK_VERSION=36 -DWINE_NO_LONG_TYPES EXTRADEFS = -DD3DX10_SDK_VERSION=36
TESTDLL = d3dx10_36.dll TESTDLL = d3dx10_36.dll
IMPORTS = d3dx10_36 ole32 gdi32 IMPORTS = d3dx10_36 ole32 gdi32
PARENTSRC = ../../d3dx10_43/tests PARENTSRC = ../../d3dx10_43/tests
......
EXTRADEFS = -DD3DX10_SDK_VERSION=37 -DWINE_NO_LONG_TYPES EXTRADEFS = -DD3DX10_SDK_VERSION=37
TESTDLL = d3dx10_37.dll TESTDLL = d3dx10_37.dll
IMPORTS = d3dx10_37 ole32 gdi32 IMPORTS = d3dx10_37 ole32 gdi32
PARENTSRC = ../../d3dx10_43/tests PARENTSRC = ../../d3dx10_43/tests
......
EXTRADEFS = -DD3DX10_SDK_VERSION=38 -DWINE_NO_LONG_TYPES EXTRADEFS = -DD3DX10_SDK_VERSION=38
TESTDLL = d3dx10_38.dll TESTDLL = d3dx10_38.dll
IMPORTS = d3dx10_38 ole32 gdi32 IMPORTS = d3dx10_38 ole32 gdi32
PARENTSRC = ../../d3dx10_43/tests PARENTSRC = ../../d3dx10_43/tests
......
EXTRADEFS = -DD3DX10_SDK_VERSION=39 -DWINE_NO_LONG_TYPES EXTRADEFS = -DD3DX10_SDK_VERSION=39
TESTDLL = d3dx10_39.dll TESTDLL = d3dx10_39.dll
IMPORTS = d3dx10_39 ole32 gdi32 IMPORTS = d3dx10_39 ole32 gdi32
PARENTSRC = ../../d3dx10_43/tests PARENTSRC = ../../d3dx10_43/tests
......
EXTRADEFS = -DD3DX10_SDK_VERSION=40 -DWINE_NO_LONG_TYPES EXTRADEFS = -DD3DX10_SDK_VERSION=40
TESTDLL = d3dx10_40.dll TESTDLL = d3dx10_40.dll
IMPORTS = d3dx10_40 ole32 gdi32 IMPORTS = d3dx10_40 ole32 gdi32
PARENTSRC = ../../d3dx10_43/tests PARENTSRC = ../../d3dx10_43/tests
......
EXTRADEFS = -DD3DX10_SDK_VERSION=41 -DWINE_NO_LONG_TYPES EXTRADEFS = -DD3DX10_SDK_VERSION=41
TESTDLL = d3dx10_41.dll TESTDLL = d3dx10_41.dll
IMPORTS = d3dx10_41 ole32 gdi32 IMPORTS = d3dx10_41 ole32 gdi32
PARENTSRC = ../../d3dx10_43/tests PARENTSRC = ../../d3dx10_43/tests
......
EXTRADEFS = -DD3DX10_SDK_VERSION=42 -DWINE_NO_LONG_TYPES EXTRADEFS = -DD3DX10_SDK_VERSION=42
TESTDLL = d3dx10_42.dll TESTDLL = d3dx10_42.dll
IMPORTS = d3dx10_42 ole32 gdi32 IMPORTS = d3dx10_42 ole32 gdi32
PARENTSRC = ../../d3dx10_43/tests PARENTSRC = ../../d3dx10_43/tests
......