mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 12:03:45 +00:00
Now attaching imported DLLs of a winelib executable.
This commit is contained in:
parent
72ed07e467
commit
cba7be7954
1 changed files with 8 additions and 2 deletions
|
@ -178,6 +178,7 @@ HINSTANCE MAIN_WinelibInit( int *argc, char *argv[] )
|
||||||
{
|
{
|
||||||
NE_MODULE *pModule;
|
NE_MODULE *pModule;
|
||||||
HMODULE16 hModule;
|
HMODULE16 hModule;
|
||||||
|
PDB *curr;
|
||||||
|
|
||||||
/* Main initialization */
|
/* Main initialization */
|
||||||
if (!MAIN_MainInit( *argc, argv, TRUE )) return 0;
|
if (!MAIN_MainInit( *argc, argv, TRUE )) return 0;
|
||||||
|
@ -195,14 +196,19 @@ HINSTANCE MAIN_WinelibInit( int *argc, char *argv[] )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Increment EXE refcount */
|
/* Increment EXE refcount */
|
||||||
assert( PROCESS_Current()->exe_modref );
|
curr = PROCESS_Current();
|
||||||
PROCESS_Current()->exe_modref->refCount++;
|
assert( curr->exe_modref );
|
||||||
|
curr->exe_modref->refCount++;
|
||||||
|
|
||||||
/* Load system DLLs into the initial process (and initialize them) */
|
/* Load system DLLs into the initial process (and initialize them) */
|
||||||
if ( !LoadLibrary16("GDI.EXE" ) || !LoadLibraryA("GDI32.DLL" )
|
if ( !LoadLibrary16("GDI.EXE" ) || !LoadLibraryA("GDI32.DLL" )
|
||||||
|| !LoadLibrary16("USER.EXE") || !LoadLibraryA("USER32.DLL"))
|
|| !LoadLibrary16("USER.EXE") || !LoadLibraryA("USER32.DLL"))
|
||||||
ExitProcess( 1 );
|
ExitProcess( 1 );
|
||||||
|
|
||||||
|
/* attach the imported DLLs */
|
||||||
|
if ( !MODULE_DllProcessAttach( curr->exe_modref, NULL ) )
|
||||||
|
ExitProcess( 1 );
|
||||||
|
|
||||||
/* Get pointers to USER routines called by KERNEL */
|
/* Get pointers to USER routines called by KERNEL */
|
||||||
THUNK_InitCallout();
|
THUNK_InitCallout();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue