Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c3eda248
Commit
c3eda248
authored
Jan 13, 2008
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Use a switch in the generated DllMain().
parent
8c6dbc7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
21 deletions
+16
-21
output.c
tools/winedump/output.c
+16
-21
No files found.
tools/winedump/output.c
View file @
c3eda248
...
...
@@ -238,35 +238,30 @@ void output_c_preamble (void)
fprintf
(
cfile
,
"BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID "
"lpvReserved)
\n
{
\n\t
TRACE(
\"
(0x%%p, %%d, %%p)
\\
n
\"
,hinstDLL,"
"fdwReason,lpvReserved);
\n\n\t
"
"if (fdwReason == DLL_WINE_PREATTACH) return FALSE;
\t
"
"/* prefer native version */
\n\n\t
"
"if (fdwReason == DLL_PROCESS_ATTACH)
\n\t
{
\n\t\t
"
);
"lpvReserved)
\n
{
\n
"
"
\t
TRACE(
\"
(0x%%p, %%d, %%p)
\\
n
\"
, hinstDLL, fdwReason, lpvReserved);
\n
"
"
\n\t
switch (fdwReason)
\n\t
{
\n
"
"
\t\t
case DLL_WINE_PREATTACH:
\n
"
"
\t\t\t
return FALSE; /* prefer native version */
\n
"
"
\t\t
case DLL_PROCESS_ATTACH:
\n
"
);
if
(
globals
.
forward_dll
)
{
fprintf
(
cfile
,
"hDLL = LoadLibraryA(
\"
%s
\"
);
\n\t\t
"
"TRACE(
\"
:Forwarding DLL (%s) loaded (%%ld)
\\
n
\"
,(LONG)hDLL);"
,
fprintf
(
cfile
,
"
\t\t\t
hDLL = LoadLibraryA(
\"
%s
\"
);
\n
"
"
\t\t\t
TRACE(
\"
Forwarding DLL (%s) loaded (%%p)
\\
n
\"
, hDLL);
\n
"
,
globals
.
forward_dll
,
globals
.
forward_dll
);
}
else
fputs
(
"/* FIXME: Initialisation */"
,
cfile
);
fprintf
(
cfile
,
"
\t\t\t
/* FIXME: Initialisation */
\n
"
"
\t\t\t
DisableThreadLibraryCalls(hinstDLL);
\n\t\t\t
break;
\n
"
);
fputs
(
"
\n\t
}
\n\t
else if (fdwReason == DLL_PROCESS_DETACH)
\n\t
{
\n\t\t
"
,
cfile
);
fprintf
(
cfile
,
"
\t\t\t
break;
\n\t\t
case DLL_PROCESS_DETACH:
\n
"
);
if
(
globals
.
forward_dll
)
{
fprintf
(
cfile
,
"FreeLibrary( hDLL );
\n\t\t
TRACE(
\"
:Forwarding DLL (%s)"
" freed
\\
n
\"
);"
,
globals
.
forward_dll
);
}
else
fputs
(
"/* FIXME: Cleanup */"
,
cfile
);
fprintf
(
cfile
,
"
\t\t\t
FreeLibrary(hDLL);
\n
"
"
\t\t\t
TRACE(
\"
Forwarding DLL (%s) freed
\\
n
\"
);
\n
"
,
globals
.
forward_dll
);
fputs
(
"
\n\t
}
\n\n\t
return TRUE;
\n
}
\n\n\n
"
,
cfile
);
fprintf
(
cfile
,
"
\t\t\t
break;
\n\t\t
default:
\n\t\t\t
break;
\n\t
}
\n\n
"
"
\t
return TRUE;
\n
}
\n\n\n
"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment