https://bugs.winehq.org/show_bug.cgi?id=41926
--- Comment #11 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Dmitry Timoshkov from comment #10)
Looks like it uses a SEH to protect from invalid input.
Passing an HDC by reference makes it return DDERR_NOTFOUND instead of E_INVALIDARG for me, that seems like a progress :)
Exchanging first 2 params and passing HDC by value make it work.