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
205671f3
Commit
205671f3
authored
May 31, 2013
by
Andrew Eikum
Committed by
Alexandre Julliard
Jun 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Implement ICreateTypeInfo::AddVarDesc.
parent
4b2201b1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
6 deletions
+50
-6
typelib.c
dlls/oleaut32/typelib.c
+50
-6
No files found.
dlls/oleaut32/typelib.c
View file @
205671f3
...
...
@@ -1734,7 +1734,12 @@ static inline ITypeInfoImpl *TLB_get_typeinfo_by_name(ITypeInfoImpl **typeinfos,
return
NULL
;
}
static
TLBVarDesc
*
TLBVarDesc_Constructor
(
UINT
n
)
static
void
TLBVarDesc_Constructor
(
TLBVarDesc
*
var_desc
)
{
list_init
(
&
var_desc
->
custdata_list
);
}
static
TLBVarDesc
*
TLBVarDesc_Alloc
(
UINT
n
)
{
TLBVarDesc
*
ret
;
...
...
@@ -1743,7 +1748,7 @@ static TLBVarDesc *TLBVarDesc_Constructor(UINT n)
return
NULL
;
while
(
n
){
list_init
(
&
ret
[
n
-
1
].
custdata_list
);
TLBVarDesc_Constructor
(
&
ret
[
n
-
1
]
);
--
n
;
}
...
...
@@ -2451,7 +2456,7 @@ static void MSFT_DoVars(TLBContext *pcx, ITypeInfoImpl *pTI, int cFuncs,
TRACE_
(
typelib
)(
"
\n
"
);
ptvd
=
*
pptvd
=
TLBVarDesc_
Constructor
(
cVars
);
ptvd
=
*
pptvd
=
TLBVarDesc_
Alloc
(
cVars
);
MSFT_ReadLEDWords
(
&
infolen
,
sizeof
(
INT
),
pcx
,
offset
);
MSFT_ReadLEDWords
(
&
recoffset
,
sizeof
(
INT
),
pcx
,
offset
+
infolen
+
((
cFuncs
+
cVars
)
*
2
+
cFuncs
+
1
)
*
sizeof
(
INT
));
...
...
@@ -3876,7 +3881,7 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
unsigned
short
i
;
WORD
*
pType
;
pVarDesc
=
pTI
->
vardescs
=
TLBVarDesc_
Constructor
(
cVars
);
pVarDesc
=
pTI
->
vardescs
=
TLBVarDesc_
Alloc
(
cVars
);
for
(
pItem
=
(
SLTG_Variable
*
)
pFirstItem
,
i
=
0
;
i
<
cVars
;
pItem
=
(
SLTG_Variable
*
)(
pBlk
+
pItem
->
next
),
i
++
,
++
pVarDesc
)
{
...
...
@@ -9113,8 +9118,47 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc(ICreateTypeInfo2 *iface,
UINT
index
,
VARDESC
*
varDesc
)
{
ITypeInfoImpl
*
This
=
info_impl_from_ICreateTypeInfo2
(
iface
);
FIXME
(
"%p %u %p - stub
\n
"
,
This
,
index
,
varDesc
);
return
E_NOTIMPL
;
TLBVarDesc
*
var_desc
;
TRACE
(
"%p %u %p
\n
"
,
This
,
index
,
varDesc
);
if
(
This
->
vardescs
){
UINT
i
;
This
->
vardescs
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
vardescs
,
sizeof
(
TLBVarDesc
)
*
(
This
->
cVars
+
1
));
if
(
index
<
This
->
cVars
)
{
memmove
(
This
->
vardescs
+
index
+
1
,
This
->
vardescs
+
index
,
(
This
->
cVars
-
index
)
*
sizeof
(
TLBVarDesc
));
var_desc
=
This
->
vardescs
+
index
;
}
else
var_desc
=
This
->
vardescs
+
This
->
cVars
;
/* move custdata lists to the new memory location */
for
(
i
=
0
;
i
<
This
->
cVars
+
1
;
++
i
){
if
(
index
!=
i
){
TLBVarDesc
*
var
=
&
This
->
vardescs
[
i
];
if
(
var
->
custdata_list
.
prev
==
var
->
custdata_list
.
next
)
list_init
(
&
var
->
custdata_list
);
else
{
var
->
custdata_list
.
prev
->
next
=
&
var
->
custdata_list
;
var
->
custdata_list
.
next
->
prev
=
&
var
->
custdata_list
;
}
}
}
}
else
var_desc
=
This
->
vardescs
=
heap_alloc
(
sizeof
(
TLBVarDesc
));
memset
(
var_desc
,
0
,
sizeof
(
TLBVarDesc
));
TLBVarDesc_Constructor
(
var_desc
);
var_desc
->
vardesc
=
*
varDesc
;
++
This
->
cVars
;
This
->
needs_layout
=
TRUE
;
return
S_OK
;
}
static
HRESULT
WINAPI
ICreateTypeInfo2_fnSetFuncAndParamNames
(
ICreateTypeInfo2
*
iface
,
...
...
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