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
195ae60e
Commit
195ae60e
authored
Apr 19, 2006
by
Huw Davies
Committed by
Alexandre Julliard
Apr 19, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Implement CLEANLOCALSTORAGE marshalling and fix GetLibAttr to use it.
Based on some documentation by Rob Shearman.
parent
5f6ac9c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
6 deletions
+58
-6
usrmarshal.c
dlls/oleaut32/usrmarshal.c
+58
-6
No files found.
dlls/oleaut32/usrmarshal.c
View file @
195ae60e
...
...
@@ -39,6 +39,11 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
#define ALIGNED_LENGTH(_Len, _Align) (((_Len)+(_Align))&~(_Align))
#define ALIGNED_POINTER(_Ptr, _Align) ((LPVOID)ALIGNED_LENGTH((ULONG_PTR)(_Ptr), _Align))
#define ALIGN_LENGTH(_Len, _Align) _Len = ALIGNED_LENGTH(_Len, _Align)
#define ALIGN_POINTER(_Ptr, _Align) _Ptr = ALIGNED_POINTER(_Ptr, _Align)
/* FIXME: not supposed to be here */
const
CLSID
CLSID_PSDispatch
=
{
...
...
@@ -79,26 +84,58 @@ static void dump_user_flags(unsigned long *pFlags)
}
/* CLEANLOCALSTORAGE */
/* I'm not sure how this is supposed to work yet */
#define CLS_FUNCDESC 0x66
#define CLS_LIBATTR 0x6c
#define CLS_TYPEATTR 0x74
#define CLS_VARDESC 0x76
unsigned
long
WINAPI
CLEANLOCALSTORAGE_UserSize
(
unsigned
long
*
pFlags
,
unsigned
long
Start
,
CLEANLOCALSTORAGE
*
pstg
)
{
return
Start
+
sizeof
(
DWORD
);
ALIGN_LENGTH
(
Start
,
3
);
return
Start
+
sizeof
(
DWORD
);
}
unsigned
char
*
WINAPI
CLEANLOCALSTORAGE_UserMarshal
(
unsigned
long
*
pFlags
,
unsigned
char
*
Buffer
,
CLEANLOCALSTORAGE
*
pstg
)
{
*
(
DWORD
*
)
Buffer
=
0
;
return
Buffer
+
sizeof
(
DWORD
);
ALIGN_POINTER
(
Buffer
,
3
);
*
(
DWORD
*
)
Buffer
=
pstg
->
flags
;
switch
(
pstg
->
flags
)
{
case
CLS_LIBATTR
:
ITypeLib_ReleaseTLibAttr
((
ITypeLib
*
)
pstg
->
pInterface
,
*
(
TLIBATTR
**
)
pstg
->
pStorage
);
break
;
case
CLS_TYPEATTR
:
ITypeInfo_ReleaseTypeAttr
((
ITypeInfo
*
)
pstg
->
pInterface
,
*
(
TYPEATTR
**
)
pstg
->
pStorage
);
break
;
case
CLS_FUNCDESC
:
ITypeInfo_ReleaseFuncDesc
((
ITypeInfo
*
)
pstg
->
pInterface
,
*
(
FUNCDESC
**
)
pstg
->
pStorage
);
break
;
case
CLS_VARDESC
:
ITypeInfo_ReleaseVarDesc
((
ITypeInfo
*
)
pstg
->
pInterface
,
*
(
VARDESC
**
)
pstg
->
pStorage
);
break
;
default:
ERR
(
"Unknown type %lx
\n
"
,
pstg
->
flags
);
}
*
(
VOID
**
)
pstg
->
pStorage
=
NULL
;
IUnknown_Release
(
pstg
->
pInterface
);
pstg
->
pInterface
=
NULL
;
return
Buffer
+
sizeof
(
DWORD
);
}
unsigned
char
*
WINAPI
CLEANLOCALSTORAGE_UserUnmarshal
(
unsigned
long
*
pFlags
,
unsigned
char
*
Buffer
,
CLEANLOCALSTORAGE
*
pstr
)
{
return
Buffer
+
sizeof
(
DWORD
);
ALIGN_POINTER
(
Buffer
,
3
);
pstr
->
flags
=
*
(
DWORD
*
)
Buffer
;
return
Buffer
+
sizeof
(
DWORD
);
}
void
WINAPI
CLEANLOCALSTORAGE_UserFree
(
unsigned
long
*
pFlags
,
CLEANLOCALSTORAGE
*
pstr
)
{
/* Nothing to do */
}
/* BSTR */
...
...
@@ -1516,6 +1553,11 @@ HRESULT CALLBACK ITypeLib_GetLibAttr_Proxy(
{
CLEANLOCALSTORAGE
stg
;
TRACE
(
"(%p, %p)
\n
"
,
This
,
ppTLibAttr
);
stg
.
flags
=
0
;
stg
.
pStorage
=
NULL
;
stg
.
pInterface
=
NULL
;
return
ITypeLib_RemoteGetLibAttr_Proxy
(
This
,
ppTLibAttr
,
&
stg
);
}
...
...
@@ -1524,8 +1566,18 @@ HRESULT __RPC_STUB ITypeLib_GetLibAttr_Stub(
LPTLIBATTR
*
ppTLibAttr
,
CLEANLOCALSTORAGE
*
pDummy
)
{
HRESULT
hr
;
TRACE
(
"(%p, %p)
\n
"
,
This
,
ppTLibAttr
);
return
ITypeLib_GetLibAttr
(
This
,
ppTLibAttr
);
hr
=
ITypeLib_GetLibAttr
(
This
,
ppTLibAttr
);
if
(
hr
!=
S_OK
)
return
hr
;
pDummy
->
flags
=
CLS_LIBATTR
;
ITypeLib_AddRef
(
This
);
pDummy
->
pInterface
=
(
IUnknown
*
)
This
;
pDummy
->
pStorage
=
ppTLibAttr
;
return
hr
;
}
HRESULT
CALLBACK
ITypeLib_GetDocumentation_Proxy
(
...
...
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