Hi,
There is a small bug in the wine implementation of GetUserNameW (and the same
fix is needed in GetUserNameA).
From:
dlls/advapi32/advapi.c starting at line 92
if (len > *lpSize)
{
SetLastError(ERROR_MORE_DATA);
*lpSize = len;
return FALSE;
}
It seems the actual GetUserNameW returns 122 not 234 which maps to
ERROR_INSUFFICIENT_BUFFER and not ERROR_MORE_DATA
This bug prevents the username from being properly read in all version of of
Kindle for PC when run under wine. The code in question luckily ignores the
improper error return value and simply replaces the username with the string
"AlternateUserName" so Kindle For PC will actually work under wine but this
actually changes how the DRM is created on the ebook as the Kindle DRM is tied
to both the user name and the volume serial number, making it hard to
post-process any ebook under wine.
Please fix this in your next release.
Thanks,
Kevin