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
c43bf145
Commit
c43bf145
authored
Jul 31, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 31, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix ICreateTypeInfo2_fnAddVarDesc implementation.
parent
a1e4af2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
typelib.c
dlls/oleaut32/typelib.c
+19
-11
No files found.
dlls/oleaut32/typelib.c
View file @
c43bf145
...
@@ -101,6 +101,7 @@ typedef struct
...
@@ -101,6 +101,7 @@ typedef struct
static
HRESULT
typedescvt_to_variantvt
(
ITypeInfo
*
tinfo
,
const
TYPEDESC
*
tdesc
,
VARTYPE
*
vt
);
static
HRESULT
typedescvt_to_variantvt
(
ITypeInfo
*
tinfo
,
const
TYPEDESC
*
tdesc
,
VARTYPE
*
vt
);
static
HRESULT
TLB_AllocAndInitVarDesc
(
const
VARDESC
*
src
,
VARDESC
**
dest_ptr
);
static
HRESULT
TLB_AllocAndInitVarDesc
(
const
VARDESC
*
src
,
VARDESC
**
dest_ptr
);
static
void
TLB_FreeVarDesc
(
VARDESC
*
);
/****************************************************************************
/****************************************************************************
* FromLExxx
* FromLExxx
...
@@ -1118,8 +1119,9 @@ typedef struct tagTLBFuncDesc
...
@@ -1118,8 +1119,9 @@ typedef struct tagTLBFuncDesc
/* internal Variable data */
/* internal Variable data */
typedef
struct
tagTLBVarDesc
typedef
struct
tagTLBVarDesc
{
{
VARDESC
vardesc
;
/* lots of info on the variable and its attributes. */
VARDESC
vardesc
;
/* lots of info on the variable and its attributes. */
const
TLBString
*
Name
;
/* the name of this variable */
VARDESC
*
vardesc_create
;
/* additional data needed for storing VARDESC */
const
TLBString
*
Name
;
/* the name of this variable */
int
HelpContext
;
int
HelpContext
;
int
HelpStringContext
;
int
HelpStringContext
;
const
TLBString
*
HelpString
;
const
TLBString
*
HelpString
;
...
@@ -5453,8 +5455,9 @@ static void ITypeInfoImpl_Destroy(ITypeInfoImpl *This)
...
@@ -5453,8 +5455,9 @@ static void ITypeInfoImpl_Destroy(ITypeInfoImpl *This)
for
(
i
=
0
;
i
<
This
->
cVars
;
++
i
)
for
(
i
=
0
;
i
<
This
->
cVars
;
++
i
)
{
{
TLBVarDesc
*
pVInfo
=
&
This
->
vardescs
[
i
];
TLBVarDesc
*
pVInfo
=
&
This
->
vardescs
[
i
];
if
(
pVInfo
->
vardesc
.
varkind
==
VAR_CONST
)
if
(
pVInfo
->
vardesc_create
)
{
{
TLB_FreeVarDesc
(
pVInfo
->
vardesc_create
);
}
else
if
(
pVInfo
->
vardesc
.
varkind
==
VAR_CONST
)
{
VariantClear
(
pVInfo
->
vardesc
.
u
.
lpvarValue
);
VariantClear
(
pVInfo
->
vardesc
.
u
.
lpvarValue
);
heap_free
(
pVInfo
->
vardesc
.
u
.
lpvarValue
);
heap_free
(
pVInfo
->
vardesc
.
u
.
lpvarValue
);
}
}
...
@@ -5720,6 +5723,14 @@ static HRESULT TLB_AllocAndInitFuncDesc( const FUNCDESC *src, FUNCDESC **dest_pt
...
@@ -5720,6 +5723,14 @@ static HRESULT TLB_AllocAndInitFuncDesc( const FUNCDESC *src, FUNCDESC **dest_pt
return
S_OK
;
return
S_OK
;
}
}
static
void
TLB_FreeVarDesc
(
VARDESC
*
var_desc
)
{
TLB_FreeElemDesc
(
&
var_desc
->
elemdescVar
);
if
(
var_desc
->
varkind
==
VAR_CONST
)
VariantClear
(
var_desc
->
u
.
lpvarValue
);
SysFreeString
((
BSTR
)
var_desc
);
}
HRESULT
ITypeInfoImpl_GetInternalFuncDesc
(
ITypeInfo
*
iface
,
UINT
index
,
const
FUNCDESC
**
ppFuncDesc
)
HRESULT
ITypeInfoImpl_GetInternalFuncDesc
(
ITypeInfo
*
iface
,
UINT
index
,
const
FUNCDESC
**
ppFuncDesc
)
{
{
ITypeInfoImpl
*
This
=
impl_from_ITypeInfo
(
iface
);
ITypeInfoImpl
*
This
=
impl_from_ITypeInfo
(
iface
);
...
@@ -7690,10 +7701,7 @@ static void WINAPI ITypeInfo_fnReleaseVarDesc( ITypeInfo2 *iface,
...
@@ -7690,10 +7701,7 @@ static void WINAPI ITypeInfo_fnReleaseVarDesc( ITypeInfo2 *iface,
ITypeInfoImpl
*
This
=
impl_from_ITypeInfo2
(
iface
);
ITypeInfoImpl
*
This
=
impl_from_ITypeInfo2
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pVarDesc
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pVarDesc
);
TLB_FreeElemDesc
(
&
pVarDesc
->
elemdescVar
);
TLB_FreeVarDesc
(
pVarDesc
);
if
(
pVarDesc
->
varkind
==
VAR_CONST
)
VariantClear
(
pVarDesc
->
u
.
lpvarValue
);
SysFreeString
((
BSTR
)
pVarDesc
);
}
}
/* ITypeInfo2::GetTypeKind
/* ITypeInfo2::GetTypeKind
...
@@ -10430,11 +10438,11 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc(ICreateTypeInfo2 *iface,
...
@@ -10430,11 +10438,11 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc(ICreateTypeInfo2 *iface,
}
}
}
}
}
else
}
else
var_desc
=
This
->
vardescs
=
heap_alloc
(
sizeof
(
TLBVarDesc
));
var_desc
=
This
->
vardescs
=
heap_alloc
_zero
(
sizeof
(
TLBVarDesc
));
memset
(
var_desc
,
0
,
sizeof
(
TLBVarDesc
));
TLBVarDesc_Constructor
(
var_desc
);
TLBVarDesc_Constructor
(
var_desc
);
var_desc
->
vardesc
=
*
varDesc
;
TLB_AllocAndInitVarDesc
(
varDesc
,
&
var_desc
->
vardesc_create
);
var_desc
->
vardesc
=
*
var_desc
->
vardesc_create
;
++
This
->
cVars
;
++
This
->
cVars
;
...
...
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