Hello, wine-devel
It seems, that Microsoft introduced new flags for kernel32.LoadLibraryEx function, which are not yet available in Wine.
Those flags are: LOAD_IGNORE_CODE_AUTHZ_LEVEL, LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE, LOAD_LIBRARY_AS_IMAGE_RESOURCE and LOAD_LIBRARY_REQUIRE_SIGNED_TARGET. Most of them were added with Vista introduction, and the last one is not documented in MSDN.
I don't want to implement them (at least, not now), but want to add some "stubby" support. So, I added flags into winuser.h and the following code on the beginning of kernel32.load_library routine:
if( flags & LOAD_IGNORE_CODE_AUTHZ_LEVEL ) FIXME("unsupported flag: LOAD_IGNORE_CODE_AUTHZ_LEVEL\n");
if( flags & LOAD_LIBRARY_AS_IMAGE_RESOURCE ) FIXME("unsupported flag: LOAD_LIBRARY_AS_IMAGE_RESOURCE\n");
if( flags & LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE ) { FIXME("unsupported flag: LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE\n"); /* temporary solution which should let some application working */ flags |= LOAD_LIBRARY_AS_DATAFILE; }
if( flags & LOAD_LIBRARY_REQUIRE_SIGNED_TARGET ) FIXME("unsupported flag: LOAD_LIBRARY_REQUIRE_SIGNED_TARGET\n");
Of course it works, but is it acceptable by Wine project?
Hi Mariusz,
if( flags & LOAD_IGNORE_CODE_AUTHZ_LEVEL ) FIXME("unsupported flag: LOAD_IGNORE_CODE_AUTHZ_LEVEL\n");
if( flags & LOAD_LIBRARY_AS_IMAGE_RESOURCE ) FIXME("unsupported flag: LOAD_LIBRARY_AS_IMAGE_RESOURCE\n");
if( flags & LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE ) { FIXME("unsupported flag: LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE\n"); /* temporary solution which should let some application working */ flags |= LOAD_LIBRARY_AS_DATAFILE; }
if( flags & LOAD_LIBRARY_REQUIRE_SIGNED_TARGET ) FIXME("unsupported flag: LOAD_LIBRARY_REQUIRE_SIGNED_TARGET\n");
This is a bit verbose. Better to create some constant with all the unsupported flags, e.g. static const DWORD unsupported = LOAD_IGNORE_CODE_AUTHZ_LEVEL | LOAD_LIBRARY_AS_IMAGE_RESOURCE... then check if any of them is set. --Juan