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
fa96beb5
Commit
fa96beb5
authored
Dec 18, 2012
by
Andrew Talbot
Committed by
Alexandre Julliard
Dec 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Indentation fix.
parent
8cf55497
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
129 additions
and
129 deletions
+129
-129
compobj.c
dlls/ole32/compobj.c
+64
-65
ole2.c
dlls/ole32/ole2.c
+64
-63
pointermoniker.c
dlls/ole32/pointermoniker.c
+1
-1
No files found.
dlls/ole32/compobj.c
View file @
fa96beb5
...
...
@@ -2727,83 +2727,82 @@ HRESULT WINAPI CoResumeClassObjects(void)
* CoGetClassObject()
*/
HRESULT
WINAPI
CoCreateInstance
(
REFCLSID
rclsid
,
LPUNKNOWN
pUnkOuter
,
DWORD
dwClsContext
,
REFIID
iid
,
LPVOID
*
ppv
)
{
HRESULT
hres
;
LPCLASSFACTORY
lpclf
=
0
;
APARTMENT
*
apt
;
REFCLSID
rclsid
,
LPUNKNOWN
pUnkOuter
,
DWORD
dwClsContext
,
REFIID
iid
,
LPVOID
*
ppv
)
{
HRESULT
hres
;
LPCLASSFACTORY
lpclf
=
0
;
APARTMENT
*
apt
;
TRACE
(
"(rclsid=%s, pUnkOuter=%p, dwClsContext=%08x, riid=%s, ppv=%p)
\n
"
,
debugstr_guid
(
rclsid
),
pUnkOuter
,
dwClsContext
,
debugstr_guid
(
iid
),
ppv
);
TRACE
(
"(rclsid=%s, pUnkOuter=%p, dwClsContext=%08x, riid=%s, ppv=%p)
\n
"
,
debugstr_guid
(
rclsid
),
pUnkOuter
,
dwClsContext
,
debugstr_guid
(
iid
),
ppv
);
/*
* Sanity check
*/
if
(
ppv
==
0
)
return
E_POINTER
;
if
(
ppv
==
0
)
return
E_POINTER
;
/*
* Initialize the "out" parameter
*/
*
ppv
=
0
;
*
ppv
=
0
;
if
(
!
(
apt
=
COM_CurrentApt
()))
{
if
(
!
(
apt
=
apartment_find_multi_threaded
()))
if
(
!
(
apt
=
COM_CurrentApt
()))
{
ERR
(
"apartment not initialised
\n
"
);
return
CO_E_NOTINITIALIZED
;
if
(
!
(
apt
=
apartment_find_multi_threaded
()))
{
ERR
(
"apartment not initialised
\n
"
);
return
CO_E_NOTINITIALIZED
;
}
apartment_release
(
apt
);
}
apartment_release
(
apt
);
}
/*
* 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
);
if
(
hres
)
return
hres
;
TRACE
(
"Retrieved GIT (%p)
\n
"
,
*
ppv
);
return
S_OK
;
}
/*
* 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
);
if
(
hres
)
return
hres
;
TRACE
(
"Retrieved GIT (%p)
\n
"
,
*
ppv
);
return
S_OK
;
}
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_ManualResetEvent
))
return
ManualResetEvent_Construct
(
pUnkOuter
,
iid
,
ppv
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_ManualResetEvent
))
return
ManualResetEvent_Construct
(
pUnkOuter
,
iid
,
ppv
);
/*
* Get a class factory to construct the object we want.
*/
hres
=
CoGetClassObject
(
rclsid
,
dwClsContext
,
NULL
,
&
IID_IClassFactory
,
(
LPVOID
)
&
lpclf
);
/*
* Get a class factory to construct the object we want.
*/
hres
=
CoGetClassObject
(
rclsid
,
dwClsContext
,
NULL
,
&
IID_IClassFactory
,
(
LPVOID
)
&
lpclf
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
FAILED
(
hres
))
return
hres
;
/*
* Create the object and don't forget to release the factory
*/
hres
=
IClassFactory_CreateInstance
(
lpclf
,
pUnkOuter
,
iid
,
ppv
);
IClassFactory_Release
(
lpclf
);
if
(
FAILED
(
hres
))
{
if
(
hres
==
CLASS_E_NOAGGREGATION
&&
pUnkOuter
)
FIXME
(
"Class %s does not support aggregation
\n
"
,
debugstr_guid
(
rclsid
));
else
FIXME
(
"no instance created for interface %s of class %s, hres is 0x%08x
\n
"
,
debugstr_guid
(
iid
),
debugstr_guid
(
rclsid
),
hres
);
}
/*
* Create the object and don't forget to release the factory
*/
hres
=
IClassFactory_CreateInstance
(
lpclf
,
pUnkOuter
,
iid
,
ppv
);
IClassFactory_Release
(
lpclf
);
if
(
FAILED
(
hres
))
{
if
(
hres
==
CLASS_E_NOAGGREGATION
&&
pUnkOuter
)
FIXME
(
"Class %s does not support aggregation
\n
"
,
debugstr_guid
(
rclsid
));
else
FIXME
(
"no instance created for interface %s of class %s, hres is 0x%08x
\n
"
,
debugstr_guid
(
iid
),
debugstr_guid
(
rclsid
),
hres
);
}
return
hres
;
return
hres
;
}
/***********************************************************************
...
...
dlls/ole32/ole2.c
View file @
fa96beb5
...
...
@@ -1877,11 +1877,11 @@ HOLEMENU WINAPI OleCreateMenuDescriptor(
* Destroy the shared menu descriptor
*/
HRESULT
WINAPI
OleDestroyMenuDescriptor
(
HOLEMENU
hmenuDescriptor
)
HOLEMENU
hmenuDescriptor
)
{
if
(
hmenuDescriptor
)
GlobalFree
(
hmenuDescriptor
);
return
S_OK
;
if
(
hmenuDescriptor
)
GlobalFree
(
hmenuDescriptor
);
return
S_OK
;
}
/***********************************************************************
...
...
@@ -1905,72 +1905,73 @@ HRESULT WINAPI OleDestroyMenuDescriptor(
* these are non null.
*/
HRESULT
WINAPI
OleSetMenuDescriptor
(
HOLEMENU
hOleMenu
,
HWND
hwndFrame
,
HWND
hwndActiveObject
,
LPOLEINPLACEFRAME
lpFrame
,
LPOLEINPLACEACTIVEOBJECT
lpActiveObject
)
HOLEMENU
hOleMenu
,
HWND
hwndFrame
,
HWND
hwndActiveObject
,
LPOLEINPLACEFRAME
lpFrame
,
LPOLEINPLACEACTIVEOBJECT
lpActiveObject
)
{
OleMenuDescriptor
*
pOleMenuDescriptor
=
NULL
;
/* Check args */
if
(
!
hwndFrame
||
(
hOleMenu
&&
!
hwndActiveObject
)
)
return
E_INVALIDARG
;
if
(
lpFrame
||
lpActiveObject
)
{
FIXME
(
"(%p, %p, %p, %p, %p), Context sensitive help filtering not implemented!
\n
"
,
hOleMenu
,
hwndFrame
,
hwndActiveObject
,
lpFrame
,
lpActiveObject
);
}
OleMenuDescriptor
*
pOleMenuDescriptor
=
NULL
;
/* Set up a message hook to intercept the containers frame window messages.
* The message filter is responsible for dispatching menu messages from the
* shared menu which are intended for the object.
*/
if
(
hOleMenu
)
/* Want to install dispatching code */
{
/* If OLEMenu hooks are already installed for this thread, fail
* Note: This effectively means that OleSetMenuDescriptor cannot
* be called twice in succession on the same frame window
* without first calling it with a null hOleMenu to uninstall */
if
(
OLEMenu_IsHookInstalled
(
GetCurrentThreadId
()
)
)
return
E_FAIL
;
/* Get the menu descriptor */
pOleMenuDescriptor
=
GlobalLock
(
hOleMenu
);
if
(
!
pOleMenuDescriptor
)
return
E_UNEXPECTED
;
/* Update the menu descriptor */
pOleMenuDescriptor
->
hwndFrame
=
hwndFrame
;
pOleMenuDescriptor
->
hwndActiveObject
=
hwndActiveObject
;
/* Check args */
if
(
!
hwndFrame
||
(
hOleMenu
&&
!
hwndActiveObject
)
)
return
E_INVALIDARG
;
GlobalUnlock
(
hOleMenu
);
pOleMenuDescriptor
=
NULL
;
if
(
lpFrame
||
lpActiveObject
)
{
FIXME
(
"(%p, %p, %p, %p, %p), Context sensitive help filtering not implemented!
\n
"
,
hOleMenu
,
hwndFrame
,
hwndActiveObject
,
lpFrame
,
lpActiveObject
);
}
/* Add a menu descriptor windows property to the frame window */
SetPropW
(
hwndFrame
,
prop_olemenuW
,
hOleMenu
);
/* Set up a message hook to intercept the containers frame window messages.
* The message filter is responsible for dispatching menu messages from the
* shared menu which are intended for the object.
*/
/* Install thread scope message hooks for WH_GETMESSAGE and WH_CALLWNDPROC */
if
(
!
OLEMenu_InstallHooks
(
GetCurrentThreadId
()
)
)
return
E_FAIL
;
}
else
/* Want to uninstall dispatching code */
{
/* Uninstall the hooks */
if
(
!
OLEMenu_UnInstallHooks
(
GetCurrentThreadId
()
)
)
return
E_FAIL
;
if
(
hOleMenu
)
/* Want to install dispatching code */
{
/* If OLEMenu hooks are already installed for this thread, fail
* Note: This effectively means that OleSetMenuDescriptor cannot
* be called twice in succession on the same frame window
* without first calling it with a null hOleMenu to uninstall
*/
if
(
OLEMenu_IsHookInstalled
(
GetCurrentThreadId
()
)
)
return
E_FAIL
;
/* Get the menu descriptor */
pOleMenuDescriptor
=
GlobalLock
(
hOleMenu
);
if
(
!
pOleMenuDescriptor
)
return
E_UNEXPECTED
;
/* Update the menu descriptor */
pOleMenuDescriptor
->
hwndFrame
=
hwndFrame
;
pOleMenuDescriptor
->
hwndActiveObject
=
hwndActiveObject
;
GlobalUnlock
(
hOleMenu
);
pOleMenuDescriptor
=
NULL
;
/* Add a menu descriptor windows property to the frame window */
SetPropW
(
hwndFrame
,
prop_olemenuW
,
hOleMenu
);
/* Install thread scope message hooks for WH_GETMESSAGE and WH_CALLWNDPROC */
if
(
!
OLEMenu_InstallHooks
(
GetCurrentThreadId
()
)
)
return
E_FAIL
;
}
else
/* Want to uninstall dispatching code */
{
/* Uninstall the hooks */
if
(
!
OLEMenu_UnInstallHooks
(
GetCurrentThreadId
()
)
)
return
E_FAIL
;
/* Remove the menu descriptor property from the frame window */
RemovePropW
(
hwndFrame
,
prop_olemenuW
);
}
/* Remove the menu descriptor property from the frame window */
RemovePropW
(
hwndFrame
,
prop_olemenuW
);
}
return
S_OK
;
return
S_OK
;
}
/******************************************************************************
...
...
dlls/ole32/pointermoniker.c
View file @
fa96beb5
...
...
@@ -629,7 +629,7 @@ static HRESULT WINAPI PointerMonikerCF_CreateInstance(LPCLASSFACTORY iface,
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IMoniker_QueryInterface
(
pMoniker
,
riid
,
ppv
);
hr
=
IMoniker_QueryInterface
(
pMoniker
,
riid
,
ppv
);
if
(
FAILED
(
hr
))
IMoniker_Release
(
pMoniker
);
...
...
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