Commit e6cc6fdc authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Call Callout routines directly when using builtin USER.

parent b613a105
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "user.h" #include "user.h"
#include "heap.h" #include "heap.h"
#include "module.h" #include "module.h"
#include "neexe.h"
#include "process.h" #include "process.h"
#include "stackframe.h" #include "stackframe.h"
#include "selectors.h" #include "selectors.h"
...@@ -861,8 +862,13 @@ WORD WINAPI WIN16_CreateSystemTimer( WORD rate, FARPROC16 proc ) ...@@ -861,8 +862,13 @@ WORD WINAPI WIN16_CreateSystemTimer( WORD rate, FARPROC16 proc )
*/ */
void THUNK_InitCallout(void) void THUNK_InitCallout(void)
{ {
HMODULE hModule = GetModuleHandleA( "USER32" ); HMODULE hModule;
if ( hModule ) WINE_MODREF *wm;
NE_MODULE *pModule;
hModule = GetModuleHandleA( "USER32" );
wm = MODULE32_LookupHMODULE( hModule );
if ( wm && !(wm->flags & WINE_MODREF_INTERNAL) )
{ {
#define GETADDR( var, name ) \ #define GETADDR( var, name ) \
*(FARPROC *)&Callout.##var = GetProcAddress( hModule, name ) *(FARPROC *)&Callout.##var = GetProcAddress( hModule, name )
...@@ -887,7 +893,8 @@ void THUNK_InitCallout(void) ...@@ -887,7 +893,8 @@ void THUNK_InitCallout(void)
} }
hModule = GetModuleHandle16( "USER" ); hModule = GetModuleHandle16( "USER" );
if ( hModule ) pModule = NE_GetPtr( hModule );
if ( pModule && !(pModule->flags & NE_FFLAGS_BUILTIN) )
{ {
#define GETADDR( var, name, thk ) \ #define GETADDR( var, name, thk ) \
*(FARPROC *)&Callout.##var = (FARPROC) \ *(FARPROC *)&Callout.##var = (FARPROC) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment