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
341bf7a4
Commit
341bf7a4
authored
Dec 28, 2006
by
Rob Shearman
Committed by
Alexandre Julliard
Dec 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Only call IROTData::GetComparisonData once, like native does.
parent
04498ba4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
moniker.c
dlls/ole32/moniker.c
+6
-3
No files found.
dlls/ole32/moniker.c
View file @
341bf7a4
...
@@ -45,6 +45,10 @@
...
@@ -45,6 +45,10 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
/* see MSDN docs for IROTData::GetComparisonData, which states what this
* constant is (http://msdn2.microsoft.com/en-us/library/ms693773.aspx) */
#define MAX_COMPARISON_DATA 2048
/* define the structure of the running object table elements */
/* define the structure of the running object table elements */
struct
rot_entry
struct
rot_entry
{
{
...
@@ -139,16 +143,14 @@ static HRESULT get_moniker_comparison_data(IMoniker *pMoniker, MInterfacePointer
...
@@ -139,16 +143,14 @@ static HRESULT get_moniker_comparison_data(IMoniker *pMoniker, MInterfacePointer
{
{
HRESULT
hr
;
HRESULT
hr
;
IROTData
*
pROTData
=
NULL
;
IROTData
*
pROTData
=
NULL
;
ULONG
size
=
0
;
ULONG
size
=
MAX_COMPARISON_DATA
;
hr
=
IMoniker_QueryInterface
(
pMoniker
,
&
IID_IROTData
,
(
void
*
)
&
pROTData
);
hr
=
IMoniker_QueryInterface
(
pMoniker
,
&
IID_IROTData
,
(
void
*
)
&
pROTData
);
if
(
hr
!=
S_OK
)
if
(
hr
!=
S_OK
)
{
{
ERR
(
"Failed to query moniker for IROTData interface, hr = 0x%08x
\n
"
,
hr
);
ERR
(
"Failed to query moniker for IROTData interface, hr = 0x%08x
\n
"
,
hr
);
return
hr
;
return
hr
;
}
}
IROTData_GetComparisonData
(
pROTData
,
NULL
,
0
,
&
size
);
*
moniker_data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
FIELD_OFFSET
(
MInterfacePointer
,
abData
[
size
]));
*
moniker_data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
FIELD_OFFSET
(
MInterfacePointer
,
abData
[
size
]));
(
*
moniker_data
)
->
ulCntData
=
size
;
hr
=
IROTData_GetComparisonData
(
pROTData
,
(
*
moniker_data
)
->
abData
,
size
,
&
size
);
hr
=
IROTData_GetComparisonData
(
pROTData
,
(
*
moniker_data
)
->
abData
,
size
,
&
size
);
if
(
hr
!=
S_OK
)
if
(
hr
!=
S_OK
)
{
{
...
@@ -156,6 +158,7 @@ static HRESULT get_moniker_comparison_data(IMoniker *pMoniker, MInterfacePointer
...
@@ -156,6 +158,7 @@ static HRESULT get_moniker_comparison_data(IMoniker *pMoniker, MInterfacePointer
HeapFree
(
GetProcessHeap
(),
0
,
*
moniker_data
);
HeapFree
(
GetProcessHeap
(),
0
,
*
moniker_data
);
return
hr
;
return
hr
;
}
}
(
*
moniker_data
)
->
ulCntData
=
size
;
return
S_OK
;
return
S_OK
;
}
}
...
...
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