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
633e038b
Commit
633e038b
authored
Feb 25, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
Feb 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleview: Properly support enumerations.
parent
a5d7c2fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
typelib.c
programs/oleview/typelib.c
+61
-0
No files found.
programs/oleview/typelib.c
View file @
633e038b
...
...
@@ -32,6 +32,7 @@ static const WCHAR wszFailed[] = { '<','f','a','i','l','e','d','>','\0' };
static
const
WCHAR
wszSpace
[]
=
{
' '
,
'\0'
};
static
const
WCHAR
wszAsterix
[]
=
{
'*'
,
'\0'
};
static
const
WCHAR
wszComa
[]
=
{
','
,
'\0'
};
static
const
WCHAR
wszEquals
[]
=
{
'='
,
'\0'
};
static
const
WCHAR
wszSemicolon
[]
=
{
';'
,
'\0'
};
static
const
WCHAR
wszNewLine
[]
=
{
'\n'
,
'\0'
};
static
const
WCHAR
wszOpenBrackets1
[]
=
{
'['
,
'\0'
};
...
...
@@ -428,6 +429,60 @@ int EnumVars(ITypeInfo *pTypeInfo, int cVars, HTREEITEM hParent)
return
0
;
}
int
EnumEnums
(
ITypeInfo
*
pTypeInfo
,
int
cVars
,
HTREEITEM
hParent
)
{
int
i
;
TVINSERTSTRUCT
tvis
;
VARDESC
*
pVarDesc
;
BSTR
bstrName
;
WCHAR
wszText
[
MAX_LOAD_STRING
];
U
(
tvis
).
item
.
mask
=
TVIF_TEXT
|
TVIF_PARAM
;
U
(
tvis
).
item
.
cchTextMax
=
MAX_LOAD_STRING
;
U
(
tvis
).
item
.
pszText
=
wszText
;
tvis
.
hInsertAfter
=
(
HTREEITEM
)
TVI_LAST
;
tvis
.
hParent
=
hParent
;
for
(
i
=
0
;
i
<
cVars
;
i
++
)
{
TYPELIB_DATA
*
tld
;
if
(
FAILED
(
ITypeInfo_GetVarDesc
(
pTypeInfo
,
i
,
&
pVarDesc
)))
continue
;
if
(
FAILED
(
ITypeInfo_GetDocumentation
(
pTypeInfo
,
pVarDesc
->
memid
,
&
bstrName
,
NULL
,
NULL
,
NULL
)))
continue
;
tld
=
InitializeTLData
();
U
(
tvis
).
item
.
lParam
=
(
LPARAM
)
tld
;
memset
(
wszText
,
0
,
sizeof
(
wszText
));
AddToStrW
(
wszText
,
bstrName
);
if
(
pVarDesc
->
varkind
==
VAR_CONST
)
{
VARIANT
var
;
VariantInit
(
&
var
);
if
(
VariantChangeType
(
&
var
,
pVarDesc
->
lpvarValue
,
0
,
VT_BSTR
)
==
S_OK
)
{
AddToStrW
(
wszText
,
wszSpace
);
AddToStrW
(
wszText
,
wszEquals
);
AddToStrW
(
wszText
,
wszSpace
);
AddToStrW
(
wszText
,
V_BSTR
(
&
var
));
}
}
AddToTLDataStrW
(
tld
,
wszText
);
if
(
i
<
cVars
-
1
)
AddToTLDataStrW
(
tld
,
wszComa
);
AddToTLDataStrW
(
tld
,
wszNewLine
);
SendMessage
(
typelib
.
hTree
,
TVM_INSERTITEM
,
0
,
(
LPARAM
)
&
tvis
);
SysFreeString
(
bstrName
);
ITypeInfo_ReleaseVarDesc
(
pTypeInfo
,
pVarDesc
);
}
return
0
;
}
int
EnumFuncs
(
ITypeInfo
*
pTypeInfo
,
int
cFuncs
,
HTREEITEM
hParent
)
{
int
i
,
j
,
tabSize
;
...
...
@@ -1032,6 +1087,12 @@ int PopulateTree(void)
AddToStrW
(
tld
->
wszInsertAfter
,
bstrName
);
AddToStrW
(
tld
->
wszInsertAfter
,
wszSemicolon
);
AddToStrW
(
tld
->
wszInsertAfter
,
wszNewLine
);
bInsert
=
FALSE
;
hParent
=
TreeView_InsertItem
(
typelib
.
hTree
,
&
tvis
);
EnumEnums
(
pTypeInfo
,
pTypeAttr
->
cVars
,
hParent
);
AddChildrenData
(
hParent
,
tld
);
AddToTLDataStrW
(
tld
,
tld
->
wszInsertAfter
);
break
;
case
TKIND_RECORD
:
AddToTLDataStrW
(
tld
,
wszTKIND_RECORD
);
...
...
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