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
53ef9950
Commit
53ef9950
authored
Sep 23, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Sep 23, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement some IRunningObject functions that actually start the server
and initialize it.
parent
3daf39fb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
22 deletions
+57
-22
defaulthandler.c
dlls/ole32/defaulthandler.c
+57
-22
No files found.
dlls/ole32/defaulthandler.c
View file @
53ef9950
...
...
@@ -103,6 +103,10 @@ struct DefaultHandler
LPWSTR
containerApp
;
LPWSTR
containerObj
;
/* IOleObject delegate */
IOleObject
*
pOleDelegate
;
/* IPersistStorage delegate */
IPersistStorage
*
pPSDelegate
;
};
typedef
struct
DefaultHandler
DefaultHandler
;
...
...
@@ -1117,17 +1121,13 @@ static ULONG WINAPI DefaultHandler_IRunnableObject_Release(
/************************************************************************
* DefaultHandler_GetRunningClass (IRunnableObject)
*
* According to Brockscmidt, Chapter 19, the default handler's
* implementation of IRunnableobject does nothing until the object
* is actually running.
*
* See Windows documentation for more details on IRunnableObject methods.
*/
static
HRESULT
WINAPI
DefaultHandler_GetRunningClass
(
IRunnableObject
*
iface
,
LPCLSID
lpClsid
)
{
TRAC
E
(
"()
\n
"
);
FIXM
E
(
"()
\n
"
);
return
S_OK
;
}
...
...
@@ -1135,33 +1135,65 @@ static HRESULT WINAPI DefaultHandler_Run(
IRunnableObject
*
iface
,
IBindCtx
*
pbc
)
{
FIXME
(
": Stub
\n
"
);
return
E_NOTIMPL
;
DefaultHandler
*
This
=
impl_from_IRunnableObject
(
iface
);
HRESULT
hr
;
FIXME
(
"(%p): semi-stub
\n
"
,
pbc
);
/* already running? if so nothing to do */
if
(
This
->
pOleDelegate
)
return
S_OK
;
hr
=
CoCreateInstance
(
&
This
->
clsid
,
NULL
,
CLSCTX_LOCAL_SERVER
,
&
IID_IOleObject
,
(
void
**
)
&
This
->
pOleDelegate
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
This
->
clientSite
)
hr
=
IOleObject_SetClientSite
(
This
->
pOleDelegate
,
This
->
clientSite
);
if
(
SUCCEEDED
(
hr
))
{
IOleObject_QueryInterface
(
This
->
pOleDelegate
,
&
IID_IPersistStorage
,
(
void
**
)
&
This
->
pPSDelegate
);
if
(
This
->
pPSDelegate
)
hr
=
IPersistStorage_InitNew
(
This
->
pPSDelegate
,
NULL
);
}
if
(
SUCCEEDED
(
hr
)
&&
This
->
containerApp
)
hr
=
IOleObject_SetHostNames
(
This
->
pOleDelegate
,
This
->
containerApp
,
This
->
containerObj
);
/* FIXME: do more stuff here:
* - IOleObject_GetMiscStatus
* - IOleObject_Advise
* - IOleObject_GetMoniker
* - advise data cache that we've connected some how?
*/
/* FIXME: if we failed, Close the object */
return
hr
;
}
/************************************************************************
* DefaultHandler_IsRunning (IRunnableObject)
*
* According to Brockscmidt, Chapter 19, the default handler's
* implementation of IRunnableobject does nothing until the object
* is actually running.
*
* See Windows documentation for more details on IRunnableObject methods.
*/
static
BOOL
WINAPI
DefaultHandler_IsRunning
(
IRunnableObject
*
iface
)
{
DefaultHandler
*
This
=
impl_from_IRunnableObject
(
iface
);
TRACE
(
"()
\n
"
);
return
S_FALSE
;
if
(
This
->
pOleDelegate
)
return
TRUE
;
else
return
FALSE
;
}
/************************************************************************
* DefaultHandler_LockRunning (IRunnableObject)
*
* According to Brockscmidt, Chapter 19, the default handler's
* implementation of IRunnableobject does nothing until the object
* is actually running.
*
* See Windows documentation for more details on IRunnableObject methods.
*/
static
HRESULT
WINAPI
DefaultHandler_LockRunning
(
...
...
@@ -1169,24 +1201,20 @@ static HRESULT WINAPI DefaultHandler_LockRunning(
BOOL
fLock
,
BOOL
fLastUnlockCloses
)
{
TRAC
E
(
"()
\n
"
);
FIXM
E
(
"()
\n
"
);
return
S_OK
;
}
/************************************************************************
* DefaultHandler_SetContainedObject (IRunnableObject)
*
* According to Brockscmidt, Chapter 19, the default handler's
* implementation of IRunnableobject does nothing until the object
* is actually running.
*
* See Windows documentation for more details on IRunnableObject methods.
*/
static
HRESULT
WINAPI
DefaultHandler_SetContainedObject
(
IRunnableObject
*
iface
,
BOOL
fContained
)
{
TRAC
E
(
"()
\n
"
);
FIXM
E
(
"()
\n
"
);
return
S_OK
;
}
...
...
@@ -1314,6 +1342,8 @@ static DefaultHandler* DefaultHandler_Construct(
This
->
dataAdviseHolder
=
NULL
;
This
->
containerApp
=
NULL
;
This
->
containerObj
=
NULL
;
This
->
pOleDelegate
=
NULL
;
This
->
pPSDelegate
=
NULL
;
return
This
;
}
...
...
@@ -1321,6 +1351,11 @@ static DefaultHandler* DefaultHandler_Construct(
static
void
DefaultHandler_Destroy
(
DefaultHandler
*
This
)
{
if
(
This
->
pOleDelegate
)
IOleObject_Release
(
This
->
pOleDelegate
);
if
(
This
->
pPSDelegate
)
IPersistStorage_Release
(
This
->
pPSDelegate
);
/* Free the strings idenfitying the object */
HeapFree
(
GetProcessHeap
(),
0
,
This
->
containerApp
);
This
->
containerApp
=
NULL
;
...
...
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