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
65639ab7
Commit
65639ab7
authored
Jul 03, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jul 05, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut: Implement processing of modules for SLTG typelibs.
Set funckind when processing SLTG functions.
parent
3f97460c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
10 deletions
+42
-10
typelib.c
dlls/oleaut32/typelib.c
+38
-7
typelib.h
dlls/oleaut32/typelib.h
+4
-3
No files found.
dlls/oleaut32/typelib.c
View file @
65639ab7
...
...
@@ -2906,14 +2906,25 @@ static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsig
int
param
;
WORD
*
pType
,
*
pArg
;
if
(
pFunc
->
magic
!=
SLTG_FUNCTION_MAGIC
&&
pFunc
->
magic
!=
SLTG_FUNCTION_WITH_FLAGS_MAGIC
&&
pFunc
->
magic
!=
SLTG_DISPATCH_FUNCTION_MAGIC
)
{
FIXME
(
"func magic = %02x
\n
"
,
pFunc
->
magic
);
return
;
}
*
ppFuncDesc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
**
ppFuncDesc
));
switch
(
pFunc
->
magic
&
~
SLTG_FUNCTION_FLAGS_PRESENT
)
{
case
SLTG_FUNCTION_MAGIC
:
(
*
ppFuncDesc
)
->
funcdesc
.
funckind
=
FUNC_PUREVIRTUAL
;
break
;
case
SLTG_DISPATCH_FUNCTION_MAGIC
:
(
*
ppFuncDesc
)
->
funcdesc
.
funckind
=
FUNC_DISPATCH
;
break
;
case
SLTG_STATIC_FUNCTION_MAGIC
:
(
*
ppFuncDesc
)
->
funcdesc
.
funckind
=
FUNC_STATIC
;
break
;
default:
FIXME
(
"unimplemented func magic = %02x
\n
"
,
pFunc
->
magic
&
~
SLTG_FUNCTION_FLAGS_PRESENT
);
HeapFree
(
GetProcessHeap
(),
0
,
*
ppFuncDesc
);
*
ppFuncDesc
=
NULL
;
return
;
}
(
*
ppFuncDesc
)
->
Name
=
TLB_MultiByteToBSTR
(
pFunc
->
name
+
pNameTable
);
(
*
ppFuncDesc
)
->
funcdesc
.
memid
=
pFunc
->
dispid
;
...
...
@@ -2923,7 +2934,7 @@ static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsig
(
*
ppFuncDesc
)
->
funcdesc
.
cParamsOpt
=
(
pFunc
->
retnextopt
&
0x7e
)
>>
1
;
(
*
ppFuncDesc
)
->
funcdesc
.
oVft
=
pFunc
->
vtblpos
;
if
(
pFunc
->
magic
==
SLTG_FUNCTION_WITH_FLAGS_MAGIC
)
if
(
pFunc
->
magic
&
SLTG_FUNCTION_FLAGS_PRESENT
)
(
*
ppFuncDesc
)
->
funcdesc
.
wFuncFlags
=
pFunc
->
funcflags
;
if
(
pFunc
->
retnextopt
&
0x80
)
...
...
@@ -3098,6 +3109,21 @@ static void SLTG_ProcessEnum(char *pBlk, ITypeInfoImpl *pTI,
SLTG_DoVars
(
pBlk
,
pBlk
+
pTITail
->
vars_off
,
pTI
,
pTITail
->
cVars
,
pNameTable
);
}
static
void
SLTG_ProcessModule
(
char
*
pBlk
,
ITypeInfoImpl
*
pTI
,
char
*
pNameTable
,
SLTG_TypeInfoHeader
*
pTIHeader
,
SLTG_TypeInfoTail
*
pTITail
)
{
if
(
pTIHeader
->
href_table
!=
0xffffffff
)
SLTG_DoRefs
((
SLTG_RefInfo
*
)((
char
*
)
pTIHeader
+
pTIHeader
->
href_table
),
pTI
,
pNameTable
);
if
(
pTITail
->
vars_off
!=
0xffff
)
SLTG_DoVars
(
pBlk
,
pBlk
+
pTITail
->
vars_off
,
pTI
,
pTITail
->
cVars
,
pNameTable
);
if
(
pTITail
->
funcs_off
!=
0xffff
)
SLTG_DoFuncs
(
pBlk
,
pBlk
+
pTITail
->
funcs_off
,
pTI
,
pTITail
->
cFuncs
,
pNameTable
);
}
/* Because SLTG_OtherTypeInfo is such a painful struct, we make a more
managable copy of it into this */
typedef
struct
{
...
...
@@ -3371,6 +3397,11 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
pTIHeader
,
pTITail
);
break
;
case
TKIND_MODULE
:
SLTG_ProcessModule
((
char
*
)(
pMemHeader
+
1
),
*
ppTypeInfoImpl
,
pNameTable
,
pTIHeader
,
pTITail
);
break
;
default:
FIXME
(
"Not processing typekind %d
\n
"
,
pTIHeader
->
typekind
);
break
;
...
...
dlls/oleaut32/typelib.h
View file @
65639ab7
...
...
@@ -477,7 +477,7 @@ typedef struct {
#define SLTG_ENUMITEM_MAGIC 0x120a
typedef
struct
{
BYTE
magic
;
/* 0x4c
or 0x6c
*/
BYTE
magic
;
/* 0x4c
, 0xcb or 0x8b with optional SLTG_FUNCTION_FLAGS_PRESENT flag
*/
BYTE
inv
;
/* high nibble is INVOKE_KIND, low nibble = 2 */
WORD
next
;
/* byte offset from beginning of group to next fn */
WORD
name
;
/* Offset within name table to name */
...
...
@@ -491,7 +491,7 @@ typedef struct {
middle 6 bits */
WORD
rettype
;
/* return type VT_?? or offset to ret type */
WORD
vtblpos
;
/* position in vtbl? */
WORD
funcflags
;
/* present if magic
== 0x6c
*/
WORD
funcflags
;
/* present if magic
& 0x20
*/
/* Param list starts, repeat next two as required */
#if 0
WORD name; /* offset to 2nd letter of name */
...
...
@@ -499,9 +499,10 @@ typedef struct {
#endif
}
SLTG_Function
;
#define SLTG_FUNCTION_FLAGS_PRESENT 0x20
#define SLTG_FUNCTION_MAGIC 0x4c
#define SLTG_FUNCTION_WITH_FLAGS_MAGIC 0x6c
#define SLTG_DISPATCH_FUNCTION_MAGIC 0xcb
#define SLTG_STATIC_FUNCTION_MAGIC 0x8b
typedef
struct
{
/*00*/
BYTE
magic
;
/* 0xdf */
...
...
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