Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5e65e2dd
Commit
5e65e2dd
authored
May 01, 2000
by
Uwe Bonnes
Committed by
Alexandre Julliard
May 01, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
COMDLG32_DllEntryPoint,COMDLG32_SetCommDlgExtendedError: delay
allocation of Tls for CommDlgExtendedError until it is needed.
parent
26342c98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
cdlg32.c
dlls/commdlg/cdlg32.c
+17
-8
No files found.
dlls/commdlg/cdlg32.c
View file @
5e65e2dd
...
...
@@ -92,11 +92,7 @@ BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Res
}
}
if
((
COMDLG32_TlsIndex
=
TlsAlloc
())
==
0xffffffff
)
{
ERR
(
"No space for COMDLG32 TLS
\n
"
);
return
FALSE
;
}
COMDLG32_TlsIndex
=
0xffffffff
;
COMCTL32_hInstance
=
LoadLibraryA
(
"COMCTL32.DLL"
);
SHELL32_hInstance
=
LoadLibraryA
(
"SHELL32.DLL"
);
...
...
@@ -146,7 +142,9 @@ BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Res
case
DLL_PROCESS_DETACH
:
if
(
!--
COMDLG32_Attach
)
{
TlsFree
(
COMDLG32_TlsIndex
);
if
(
COMDLG32_TlsIndex
!=
0xffffffff
)
TlsFree
(
COMDLG32_TlsIndex
);
COMDLG32_TlsIndex
=
0xffffffff
;
COMDLG32_hInstance
=
0
;
if
(
COMDLG32_hInstance16
)
FreeLibrary16
(
COMDLG32_hInstance16
);
...
...
@@ -189,7 +187,12 @@ LPVOID COMDLG32_AllocMem(
void
COMDLG32_SetCommDlgExtendedError
(
DWORD
err
)
{
TRACE
(
"(%08lx)
\n
"
,
err
);
TlsSetValue
(
COMDLG32_TlsIndex
,
(
void
*
)
err
);
if
(
COMDLG32_TlsIndex
==
0xffffffff
)
COMDLG32_TlsIndex
=
TlsAlloc
();
if
(
COMDLG32_TlsIndex
!=
0xffffffff
)
TlsSetValue
(
COMDLG32_TlsIndex
,
(
void
*
)
err
);
else
FIXME
(
"No Tls Space
\n
"
);
}
...
...
@@ -203,5 +206,11 @@ void COMDLG32_SetCommDlgExtendedError(DWORD err)
*/
DWORD
WINAPI
CommDlgExtendedError
(
void
)
{
return
(
DWORD
)
TlsGetValue
(
COMDLG32_TlsIndex
);
if
(
COMDLG32_TlsIndex
!=
0xffffffff
)
return
(
DWORD
)
TlsGetValue
(
COMDLG32_TlsIndex
);
else
{
FIXME
(
"No Tls Space
\n
"
);
return
0
;
}
}
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