Hello,
initially i tested this stuff under XP and it raised exception if lpDatabaseName is invalid pointer. But after you noticed the bug i run the test under 2000 and it has been returned ERROR_NOACCESS.
Both versions return ERROR_INVALID_NAME if lpDatabaseName is empty string.
I think the patch should look like this:
In Age of Empires 2 lpDatabaseName is just an empty string, so I've sent a patch to wine-patches that allows the database name to be '\0'.
Ivan.