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
a45a2e37
Commit
a45a2e37
authored
Jan 07, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Jan 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add a field to the TLS data to determine whether OLE has been initialised…
ole32: Add a field to the TLS data to determine whether OLE has been initialised for the current thread.
parent
2568c466
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
compobj_private.h
dlls/ole32/compobj_private.h
+1
-0
ole2.c
dlls/ole32/ole2.c
+4
-13
No files found.
dlls/ole32/compobj_private.h
View file @
a45a2e37
...
...
@@ -168,6 +168,7 @@ struct oletls
IErrorInfo
*
errorinfo
;
/* see errorinfo.c */
IUnknown
*
state
;
/* see CoSetState */
DWORD
inits
;
/* number of times CoInitializeEx called */
DWORD
ole_inits
;
/* number of times OleInitialize called */
GUID
causality_id
;
/* unique identifier for each COM call */
LONG
pending_call_count_client
;
/* number of client calls pending */
LONG
pending_call_count_server
;
/* number of server calls pending */
...
...
dlls/ole32/ole2.c
View file @
a45a2e37
...
...
@@ -107,7 +107,7 @@ static OleMenuHookItem *hook_list;
* This is the lock count on the OLE library. It is controlled by the
* OLEInitialize/OLEUninitialize methods.
*/
static
U
LONG
OLE_moduleLockCount
=
0
;
static
LONG
OLE_moduleLockCount
=
0
;
/*
* Name of our registered window class.
...
...
@@ -203,7 +203,8 @@ HRESULT WINAPI OleInitialize(LPVOID reserved)
* Object linking and Embedding
* In-place activation
*/
if
(
OLE_moduleLockCount
==
0
)
if
(
!
COM_CurrentInfo
()
->
ole_inits
++
&&
InterlockedIncrement
(
&
OLE_moduleLockCount
)
==
1
)
{
/*
* Initialize the libraries.
...
...
@@ -226,11 +227,6 @@ HRESULT WINAPI OleInitialize(LPVOID reserved)
OLEMenu_Initialize
();
}
/*
* Then, we increase the lock count on the OLE module.
*/
OLE_moduleLockCount
++
;
return
hr
;
}
...
...
@@ -243,14 +239,9 @@ void WINAPI OleUninitialize(void)
TRACE
(
"()
\n
"
);
/*
* Decrease the lock count on the OLE module.
*/
OLE_moduleLockCount
--
;
/*
* If we hit the bottom of the lock stack, free the libraries.
*/
if
(
OLE_moduleLockCount
==
0
)
if
(
!--
COM_CurrentInfo
()
->
ole_inits
&&
!
InterlockedDecrement
(
&
OLE_moduleLockCount
)
)
{
/*
* Actually free the libraries.
...
...
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