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
2f21130f
Commit
2f21130f
authored
Aug 18, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Fix standard GIT initialization.
parent
e1c34221
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
27 deletions
+28
-27
compobj.c
dlls/ole32/compobj.c
+2
-6
compobj_private.h
dlls/ole32/compobj_private.h
+1
-3
git.c
dlls/ole32/git.c
+25
-18
No files found.
dlls/ole32/compobj.c
View file @
2f21130f
...
...
@@ -2905,15 +2905,11 @@ HRESULT WINAPI CoCreateInstance(
/*
* The Standard Global Interface Table (GIT) object is a process-wide singleton.
* Rather than create a class factory, we can just check for it here
*/
if
(
IsEqualIID
(
rclsid
,
&
CLSID_StdGlobalInterfaceTable
))
{
if
(
StdGlobalInterfaceTableInstance
==
NULL
)
StdGlobalInterfaceTableInstance
=
StdGlobalInterfaceTable_Construct
();
hres
=
IGlobalInterfaceTable_QueryInterface
((
IGlobalInterfaceTable
*
)
StdGlobalInterfaceTableInstance
,
iid
,
ppv
);
IGlobalInterfaceTable
*
git
=
get_std_git
();
hres
=
IGlobalInterfaceTable_QueryInterface
(
git
,
iid
,
ppv
);
if
(
hres
)
return
hres
;
TRACE
(
"Retrieved GIT (%p)
\n
"
,
*
ppv
);
...
...
dlls/ole32/compobj_private.h
View file @
2f21130f
...
...
@@ -173,10 +173,8 @@ struct oletls
/* Global Interface Table Functions */
extern
void
*
StdGlobalInterfaceTable_Construct
(
void
)
DECLSPEC_HIDDEN
;
extern
IGlobalInterfaceTable
*
get_std_git
(
void
)
DECLSPEC_HIDDEN
;
extern
HRESULT
StdGlobalInterfaceTable_GetFactory
(
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
extern
void
*
StdGlobalInterfaceTableInstance
DECLSPEC_HIDDEN
;
HRESULT
COM_OpenKeyForCLSID
(
REFCLSID
clsid
,
LPCWSTR
keyname
,
REGSAM
access
,
HKEY
*
key
)
DECLSPEC_HIDDEN
;
HRESULT
COM_OpenKeyForAppIdFromCLSID
(
REFCLSID
clsid
,
REGSAM
access
,
HKEY
*
subkey
)
DECLSPEC_HIDDEN
;
...
...
dlls/ole32/git.c
View file @
2f21130f
...
...
@@ -72,7 +72,7 @@ typedef struct StdGlobalInterfaceTableImpl
}
StdGlobalInterfaceTableImpl
;
void
*
StdGlobalInterfaceTableInstance
;
static
IGlobalInterfaceTable
*
std_git
;
static
CRITICAL_SECTION
git_section
;
static
CRITICAL_SECTION_DEBUG
critsect_debug
=
...
...
@@ -96,7 +96,7 @@ static void StdGlobalInterfaceTable_Destroy(void* This)
FIXME
(
"Revoke held interfaces here
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
StdGlobalInterfaceTableInstance
=
NULL
;
std_git
=
NULL
;
}
/***
...
...
@@ -335,9 +335,8 @@ GITCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnk,
REFIID
riid
,
LPVOID
*
ppv
)
{
if
(
IsEqualIID
(
riid
,
&
IID_IGlobalInterfaceTable
))
{
if
(
StdGlobalInterfaceTableInstance
==
NULL
)
StdGlobalInterfaceTableInstance
=
StdGlobalInterfaceTable_Construct
();
return
IGlobalInterfaceTable_QueryInterface
(
(
IGlobalInterfaceTable
*
)
StdGlobalInterfaceTableInstance
,
riid
,
ppv
);
IGlobalInterfaceTable
*
git
=
get_std_git
();
return
IGlobalInterfaceTable_QueryInterface
(
git
,
riid
,
ppv
);
}
FIXME
(
"(%s), not supported.
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -378,19 +377,27 @@ static const IGlobalInterfaceTableVtbl StdGlobalInterfaceTableImpl_Vtbl =
StdGlobalInterfaceTable_GetInterfaceFromGlobal
};
/** This function constructs the GIT. It should only be called once **/
void
*
StdGlobalInterfaceTable_Construct
(
void
)
IGlobalInterfaceTable
*
get_std_git
(
void
)
{
StdGlobalInterfaceTableImpl
*
newGIT
;
newGIT
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
StdGlobalInterfaceTableImpl
));
if
(
newGIT
==
0
)
return
newGIT
;
newGIT
->
IGlobalInterfaceTable_iface
.
lpVtbl
=
&
StdGlobalInterfaceTableImpl_Vtbl
;
newGIT
->
ref
=
1
;
/* Initialise the reference count */
list_init
(
&
newGIT
->
list
);
newGIT
->
nextCookie
=
0xf100
;
/* that's where windows starts, so that's where we start */
TRACE
(
"Created the GIT at %p
\n
"
,
newGIT
);
if
(
!
std_git
)
{
StdGlobalInterfaceTableImpl
*
newGIT
;
newGIT
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
StdGlobalInterfaceTableImpl
));
if
(
!
newGIT
)
return
NULL
;
newGIT
->
IGlobalInterfaceTable_iface
.
lpVtbl
=
&
StdGlobalInterfaceTableImpl_Vtbl
;
newGIT
->
ref
=
1
;
list_init
(
&
newGIT
->
list
);
newGIT
->
nextCookie
=
0xf100
;
/* that's where windows starts, so that's where we start */
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
std_git
,
&
newGIT
->
IGlobalInterfaceTable_iface
,
NULL
))
{
StdGlobalInterfaceTable_Destroy
(
newGIT
);
}
else
TRACE
(
"Created the GIT at %p
\n
"
,
newGIT
);
}
return
(
void
*
)
newGIT
;
return
std_git
;
}
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