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
40753023
Commit
40753023
authored
Jan 20, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole2.dll16: COM cleanup for the ILockBytes16 iface.
parent
d2bad488
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
memlockbytes.c
dlls/ole2.dll16/memlockbytes.c
+16
-16
No files found.
dlls/ole2.dll16/memlockbytes.c
View file @
40753023
...
...
@@ -48,11 +48,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
*/
struct
HGLOBALLockBytesImpl16
{
/*
* Needs to be the first item in the struct
* since we want to cast this in an ILockBytes pointer
*/
const
ILockBytes16Vtbl
*
lpVtbl
;
ILockBytes16
ILockBytes16_iface
;
LONG
ref
;
/*
...
...
@@ -79,6 +75,11 @@ typedef struct HGLOBALLockBytesImpl16 HGLOBALLockBytesImpl16;
*
*/
static
inline
HGLOBALLockBytesImpl16
*
impl_from_ILockBytes16
(
ILockBytes16
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HGLOBALLockBytesImpl16
,
ILockBytes16_iface
);
}
/******************************************************************************
* This is the constructor for the HGLOBALLockBytesImpl16 class.
*
...
...
@@ -122,7 +123,7 @@ HGLOBALLockBytesImpl16_Construct(HGLOBAL16 hGlobal,
#undef VTENT
msegvt16
=
MapLS
(
&
vt16
);
}
newLockBytes
->
lpVtbl
=
(
const
ILockBytes16Vtbl
*
)
msegvt16
;
newLockBytes
->
ILockBytes16_iface
.
lpVtbl
=
(
const
ILockBytes16Vtbl
*
)
msegvt16
;
newLockBytes
->
ref
=
0
;
/*
* Initialize the support.
...
...
@@ -177,7 +178,7 @@ static void HGLOBALLockBytesImpl16_Destroy(HGLOBALLockBytesImpl16* This)
*/
ULONG
CDECL
HGLOBALLockBytesImpl16_AddRef
(
ILockBytes16
*
iface
)
{
HGLOBALLockBytesImpl16
*
const
This
=
(
HGLOBALLockBytesImpl16
*
)
iface
;
HGLOBALLockBytesImpl16
*
const
This
=
impl_from_ILockBytes16
(
iface
)
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -227,7 +228,7 @@ HRESULT CDECL HGLOBALLockBytesImpl16_QueryInterface(
* Query Interface always increases the reference count by one when it is
* successful
*/
HGLOBALLockBytesImpl16_AddRef
(
(
ILockBytes16
*
)
This
);
HGLOBALLockBytesImpl16_AddRef
(
&
This
->
ILockBytes16_iface
);
return
S_OK
;
}
...
...
@@ -238,7 +239,7 @@ HRESULT CDECL HGLOBALLockBytesImpl16_QueryInterface(
*/
ULONG
CDECL
HGLOBALLockBytesImpl16_Release
(
ILockBytes16
*
iface
)
{
HGLOBALLockBytesImpl16
*
const
This
=
(
HGLOBALLockBytesImpl16
*
)
iface
;
HGLOBALLockBytesImpl16
*
const
This
=
impl_from_ILockBytes16
(
iface
)
;
ULONG
ref
;
TRACE
(
"(%p)
\n
"
,
This
);
...
...
@@ -268,7 +269,7 @@ HRESULT CDECL HGLOBALLockBytesImpl16_ReadAt(
ULONG
cb
,
/* [in] */
ULONG
*
pcbRead
)
/* [out] */
{
HGLOBALLockBytesImpl16
*
const
This
=
(
HGLOBALLockBytesImpl16
*
)
iface
;
HGLOBALLockBytesImpl16
*
const
This
=
impl_from_ILockBytes16
(
iface
)
;
void
*
supportBuffer
;
ULONG
bytesReadBuffer
=
0
;
...
...
@@ -337,7 +338,7 @@ HRESULT CDECL HGLOBALLockBytesImpl16_SetSize(
ILockBytes16
*
iface
,
ULARGE_INTEGER
libNewSize
)
/* [in] */
{
HGLOBALLockBytesImpl16
*
const
This
=
(
HGLOBALLockBytesImpl16
*
)
iface
;
HGLOBALLockBytesImpl16
*
const
This
=
impl_from_ILockBytes16
(
iface
)
;
HGLOBAL16
supportHandle
;
TRACE
(
"(%p,%d)
\n
"
,
This
,
libNewSize
.
u
.
LowPart
);
...
...
@@ -379,7 +380,7 @@ HRESULT CDECL HGLOBALLockBytesImpl16_WriteAt(
ULONG
cb
,
/* [in] */
ULONG
*
pcbWritten
)
/* [out] */
{
HGLOBALLockBytesImpl16
*
const
This
=
(
HGLOBALLockBytesImpl16
*
)
iface
;
HGLOBALLockBytesImpl16
*
const
This
=
impl_from_ILockBytes16
(
iface
)
;
void
*
supportBuffer
;
ULARGE_INTEGER
newSize
;
...
...
@@ -485,7 +486,7 @@ HRESULT CDECL HGLOBALLockBytesImpl16_Stat(
STATSTG16
*
pstatstg
,
/* [out] */
DWORD
grfStatFlag
)
/* [in] */
{
HGLOBALLockBytesImpl16
*
const
This
=
(
HGLOBALLockBytesImpl16
*
)
iface
;
HGLOBALLockBytesImpl16
*
const
This
=
impl_from_ILockBytes16
(
iface
)
;
memset
(
pstatstg
,
0
,
sizeof
(
STATSTG16
));
...
...
@@ -520,8 +521,7 @@ HRESULT WINAPI CreateILockBytesOnHGlobal16(
newLockBytes
=
HGLOBALLockBytesImpl16_Construct
(
hGlobal
,
fDeleteOnRelease
);
if
(
newLockBytes
!=
NULL
)
return
HGLOBALLockBytesImpl16_QueryInterface
((
ILockBytes16
*
)
newLockBytes
,
&
IID_ILockBytes
,
(
void
**
)
ppLkbyt
);
return
HGLOBALLockBytesImpl16_QueryInterface
(
&
newLockBytes
->
ILockBytes16_iface
,
&
IID_ILockBytes
,
(
void
**
)
ppLkbyt
);
return
E_OUTOFMEMORY
;
}
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