Fixed reference count handling to support LoadLibrary during a process

attach.
This commit is contained in:
Alexandre Julliard 2002-10-15 02:25:19 +00:00
parent 3d8820ea22
commit c5c48eb677

View file

@ -1252,8 +1252,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HANDLE hfile, DWORD flags )
}
if (pwm)
{
if(!(pwm->flags & WINE_MODREF_MARKER))
pwm->refCount++;
pwm->refCount++;
if ((pwm->flags & WINE_MODREF_DONT_RESOLVE_REFS) &&
!(flags & DONT_RESOLVE_DLL_REFERENCES))
@ -1312,7 +1311,7 @@ WINE_MODREF *MODULE_LoadLibraryExA( LPCSTR libname, HANDLE hfile, DWORD flags )
TRACE_(loaddll)("Loaded module '%s' : %s\n", filename, filetype);
/* Set the refCount here so that an attach failure will */
/* decrement the dependencies through the MODULE_FreeLibrary call. */
pwm->refCount++;
pwm->refCount = 1;
if (allocated_libdir)
{