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
739ccae7
Commit
739ccae7
authored
Jun 17, 2003
by
Mike Hearn
Committed by
Alexandre Julliard
Jun 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement a class factory for the Global Interface Table.
parent
0c63c39c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
2 deletions
+61
-2
compobj.c
dlls/ole32/compobj.c
+1
-1
compobj_private.h
dlls/ole32/compobj_private.h
+3
-0
git.c
dlls/ole32/git.c
+54
-1
oleproxy.c
dlls/ole32/oleproxy.c
+3
-0
No files found.
dlls/ole32/compobj.c
View file @
739ccae7
...
@@ -62,7 +62,7 @@ static void COM_ExternalLockFreeList();
...
@@ -62,7 +62,7 @@ static void COM_ExternalLockFreeList();
const
CLSID
CLSID_StdGlobalInterfaceTable
=
{
0x00000323
,
0
,
0
,
{
0xc0
,
0
,
0
,
0
,
0
,
0
,
0
,
0x46
}
};
const
CLSID
CLSID_StdGlobalInterfaceTable
=
{
0x00000323
,
0
,
0
,
{
0xc0
,
0
,
0
,
0
,
0
,
0
,
0
,
0x46
}
};
static
void
*
StdGlobalInterfaceTableInstance
;
APARTMENT
MTA
,
*
apts
;
APARTMENT
MTA
,
*
apts
;
static
CRITICAL_SECTION
csApartment
=
CRITICAL_SECTION_INIT
(
"csApartment"
);
static
CRITICAL_SECTION
csApartment
=
CRITICAL_SECTION_INIT
(
"csApartment"
);
...
...
dlls/ole32/compobj_private.h
View file @
739ccae7
...
@@ -98,10 +98,13 @@ extern APARTMENT MTA, *apts;
...
@@ -98,10 +98,13 @@ extern APARTMENT MTA, *apts;
extern
void
*
StdGlobalInterfaceTable_Construct
();
extern
void
*
StdGlobalInterfaceTable_Construct
();
extern
void
StdGlobalInterfaceTable_Destroy
(
void
*
self
);
extern
void
StdGlobalInterfaceTable_Destroy
(
void
*
self
);
extern
HRESULT
StdGlobalInterfaceTable_GetFactory
(
LPVOID
*
ppv
);
extern
HRESULT
WINE_StringFromCLSID
(
const
CLSID
*
id
,
LPSTR
idstr
);
extern
HRESULT
WINE_StringFromCLSID
(
const
CLSID
*
id
,
LPSTR
idstr
);
extern
HRESULT
create_marshalled_proxy
(
REFCLSID
rclsid
,
REFIID
iid
,
LPVOID
*
ppv
);
extern
HRESULT
create_marshalled_proxy
(
REFCLSID
rclsid
,
REFIID
iid
,
LPVOID
*
ppv
);
extern
void
*
StdGlobalInterfaceTableInstance
;
inline
static
HRESULT
inline
static
HRESULT
get_facbuf_for_iid
(
REFIID
riid
,
IPSFactoryBuffer
**
facbuf
)
{
get_facbuf_for_iid
(
REFIID
riid
,
IPSFactoryBuffer
**
facbuf
)
{
HRESULT
hres
;
HRESULT
hres
;
...
...
dlls/ole32/git.c
View file @
739ccae7
...
@@ -74,6 +74,8 @@ typedef struct StdGlobalInterfaceTableImpl
...
@@ -74,6 +74,8 @@ typedef struct StdGlobalInterfaceTableImpl
}
StdGlobalInterfaceTableImpl
;
}
StdGlobalInterfaceTableImpl
;
void
*
StdGlobalInterfaceTableInstance
;
/* IUnknown */
/* IUnknown */
static
HRESULT
WINAPI
StdGlobalInterfaceTable_QueryInterface
(
IGlobalInterfaceTable
*
iface
,
REFIID
riid
,
void
**
ppvObject
);
static
HRESULT
WINAPI
StdGlobalInterfaceTable_QueryInterface
(
IGlobalInterfaceTable
*
iface
,
REFIID
riid
,
void
**
ppvObject
);
...
@@ -105,6 +107,8 @@ static ICOM_VTABLE(IGlobalInterfaceTable) StdGlobalInterfaceTableImpl_Vtbl =
...
@@ -105,6 +107,8 @@ static ICOM_VTABLE(IGlobalInterfaceTable) StdGlobalInterfaceTableImpl_Vtbl =
void
*
StdGlobalInterfaceTable_Construct
()
{
void
*
StdGlobalInterfaceTable_Construct
()
{
StdGlobalInterfaceTableImpl
*
newGIT
;
StdGlobalInterfaceTableImpl
*
newGIT
;
TRACE
(
"constructing
\n
"
);
newGIT
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
StdGlobalInterfaceTableImpl
));
newGIT
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
StdGlobalInterfaceTableImpl
));
if
(
newGIT
==
0
)
return
newGIT
;
if
(
newGIT
==
0
)
return
newGIT
;
...
@@ -141,6 +145,7 @@ StdGITEntry* StdGlobalInterfaceTable_FindEntry(IGlobalInterfaceTable* iface, DWO
...
@@ -141,6 +145,7 @@ StdGITEntry* StdGlobalInterfaceTable_FindEntry(IGlobalInterfaceTable* iface, DWO
if
(
e
->
cookie
==
cookie
)
return
e
;
if
(
e
->
cookie
==
cookie
)
return
e
;
e
=
e
->
next
;
e
=
e
->
next
;
}
}
TRACE
(
"Entry not found
\n
"
);
return
NULL
;
return
NULL
;
}
}
...
@@ -198,7 +203,7 @@ HRESULT WINAPI StdGlobalInterfaceTable_RegisterInterfaceInGlobal(IGlobalInterfac
...
@@ -198,7 +203,7 @@ HRESULT WINAPI StdGlobalInterfaceTable_RegisterInterfaceInGlobal(IGlobalInterfac
HRESULT
hres
;
HRESULT
hres
;
StdGITEntry
*
entry
;
StdGITEntry
*
entry
;
TRACE
(
"iface=%p, pUnk=%p, riid=%s, pdwCookie=%p
\n
"
,
iface
,
pUnk
,
debugstr_guid
(
riid
),
pdwCookie
);
TRACE
(
"iface=%p, pUnk=%p, riid=%s, pdwCookie=
0x
%p
\n
"
,
iface
,
pUnk
,
debugstr_guid
(
riid
),
pdwCookie
);
if
(
pUnk
==
NULL
)
return
E_INVALIDARG
;
if
(
pUnk
==
NULL
)
return
E_INVALIDARG
;
...
@@ -222,6 +227,7 @@ HRESULT WINAPI StdGlobalInterfaceTable_RegisterInterfaceInGlobal(IGlobalInterfac
...
@@ -222,6 +227,7 @@ HRESULT WINAPI StdGlobalInterfaceTable_RegisterInterfaceInGlobal(IGlobalInterfac
/* and return the cookie */
/* and return the cookie */
*
pdwCookie
=
entry
->
cookie
;
*
pdwCookie
=
entry
->
cookie
;
TRACE
(
"Cookie is 0x%ld
\n
"
,
entry
->
cookie
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -249,6 +255,8 @@ HRESULT WINAPI StdGlobalInterfaceTable_RevokeInterfaceFromGlobal(IGlobalInterfac
...
@@ -249,6 +255,8 @@ HRESULT WINAPI StdGlobalInterfaceTable_RevokeInterfaceFromGlobal(IGlobalInterfac
HRESULT
WINAPI
StdGlobalInterfaceTable_GetInterfaceFromGlobal
(
IGlobalInterfaceTable
*
iface
,
DWORD
dwCookie
,
REFIID
riid
,
void
**
ppv
)
{
HRESULT
WINAPI
StdGlobalInterfaceTable_GetInterfaceFromGlobal
(
IGlobalInterfaceTable
*
iface
,
DWORD
dwCookie
,
REFIID
riid
,
void
**
ppv
)
{
StdGITEntry
*
entry
;
StdGITEntry
*
entry
;
HRESULT
hres
;
HRESULT
hres
;
TRACE
(
"dwCookie=0x%lx, riid=%s
\n
"
,
dwCookie
,
debugstr_guid
(
riid
));
entry
=
StdGlobalInterfaceTable_FindEntry
(
iface
,
dwCookie
);
entry
=
StdGlobalInterfaceTable_FindEntry
(
iface
,
dwCookie
);
if
(
entry
==
NULL
)
return
E_INVALIDARG
;
if
(
entry
==
NULL
)
return
E_INVALIDARG
;
...
@@ -260,3 +268,48 @@ HRESULT WINAPI StdGlobalInterfaceTable_GetInterfaceFromGlobal(IGlobalInterfaceTa
...
@@ -260,3 +268,48 @@ HRESULT WINAPI StdGlobalInterfaceTable_GetInterfaceFromGlobal(IGlobalInterfaceTa
return
S_OK
;
return
S_OK
;
}
}
/* Classfactory definition - despite what MSDN says, some programs need this */
static
HRESULT
WINAPI
GITCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IGlobalInterfaceTable
))
{
*
ppv
=
(
LPVOID
)
iface
;
return
S_OK
;
}
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
GITCF_AddRef
(
LPCLASSFACTORY
iface
)
{
return
2
;
}
static
ULONG
WINAPI
GITCF_Release
(
LPCLASSFACTORY
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
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
);
}
FIXME
(
"(%s), not supported.
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
static
HRESULT
WINAPI
GITCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
fLock
)
{
FIXME
(
"(%d), stub!
\n
"
,
fLock
);
return
S_OK
;
}
static
ICOM_VTABLE
(
IClassFactory
)
GITClassFactoryVtbl
=
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
GITCF_QueryInterface
,
GITCF_AddRef
,
GITCF_Release
,
GITCF_CreateInstance
,
GITCF_LockServer
};
static
ICOM_VTABLE
(
IClassFactory
)
*
PGITClassFactoryVtbl
=
&
GITClassFactoryVtbl
;
HRESULT
StdGlobalInterfaceTable_GetFactory
(
LPVOID
*
ppv
)
{
*
ppv
=
&
PGITClassFactoryVtbl
;
TRACE
(
"Returning GIT classfactory
\n
"
);
return
S_OK
;
}
dlls/ole32/oleproxy.c
View file @
739ccae7
...
@@ -515,6 +515,9 @@ HRESULT WINAPI OLE32_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv)
...
@@ -515,6 +515,9 @@ HRESULT WINAPI OLE32_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv)
)
)
)
)
return
MARSHAL_GetStandardMarshalCF
(
ppv
);
return
MARSHAL_GetStandardMarshalCF
(
ppv
);
if
(
IsEqualIID
(
rclsid
,
&
CLSID_StdGlobalInterfaceTable
)
&&
(
IsEqualIID
(
iid
,
&
IID_IClassFactory
)
||
IsEqualIID
(
iid
,
&
IID_IUnknown
)))
return
StdGlobalInterfaceTable_GetFactory
(
ppv
);
FIXME
(
"
\n\t
CLSID:
\t
%s,
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
iid
));
FIXME
(
"
\n\t
CLSID:
\t
%s,
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
iid
));
return
CLASS_E_CLASSNOTAVAILABLE
;
return
CLASS_E_CLASSNOTAVAILABLE
;
}
}
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