ChangeDisplaySettings

Lionel Ulmer lionel.ulmer at free.fr
Thu Jul 26 12:19:40 CDT 2001


> Hmm, I was going to try something like that, however, I had problems with that
> method simply b/c of the load order between the dlls.  ChangeDisplaySettings is
> implemented in user32.dll which loads BEFORE x11drv.

Yes, but if you look at file user32.spec, you have :

init    USER_Init

This is a function called at DLL loading (AFAIK). It is in file user_main.c

At DLL loading, this function calls 'process_attach' that calls
'load_driver' (all functions are in the same file).

'load_driver' does the following :

    strcpy( buffer, "x11drv" );  /* default value */
(...)
    if (!(graphics_driver = LoadLibraryA( buffer )))
    {
        MESSAGE( "Could not load graphics driver '%s'\n", buffer );
	return FALSE;
    }
			    
This means that even if USER32.dll is loaded BEFORE x11drv.dll, the init
function of USER32 will load the current graphics driver, i.e. x11drv.

Later in the same function, all function pointers are initialized using the
GET_USER_FUNC macro.

BTW, you did NOT read the thread about my OpenGL fixes recently where
Alexandre plainly told that putting x11drv.dll in a spec file is bad :-) ?

> Already using so of that code, although it could probably be cleaned up a bit. 
> I will get to that soon.

Ah, did not look in details at your patch :-) Stopped at the 'Oh my god, X11
calls in USER' :-)

Anyway, let's hope I will not discourage you :-)

               Lionel

-- 
		 Lionel Ulmer - http://www.bbrox.org/




More information about the wine-devel mailing list