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
4413e8c6
Commit
4413e8c6
authored
Jul 29, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 30, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Use correct bytes in write_value.
parent
6119f499
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
write_msft.c
tools/widl/write_msft.c
+17
-3
No files found.
tools/widl/write_msft.c
View file @
4413e8c6
...
...
@@ -1160,6 +1160,20 @@ static int encode_var(
return
0
;
}
static
unsigned
long
get_ulong_val
(
unsigned
long
val
,
int
vt
)
{
switch
(
vt
)
{
case
VT_I2
:
case
VT_BOOL
:
case
VT_UI2
:
return
val
&
0xffff
;
case
VT_I1
:
case
VT_UI1
:
return
val
&
0xff
;
}
return
val
;
}
static
void
write_value
(
msft_typelib_t
*
typelib
,
int
*
out
,
int
vt
,
void
*
value
)
{
...
...
@@ -1177,11 +1191,11 @@ static void write_value(msft_typelib_t* typelib, int *out, int vt, void *value)
case
VT_HRESULT
:
case
VT_PTR
:
{
unsigned
long
*
lv
=
value
;
if
((
*
lv
&
0x3ffffff
)
==
*
lv
)
{
const
unsigned
long
lv
=
get_ulong_val
(
*
(
unsigned
long
*
)
value
,
vt
)
;
if
((
lv
&
0x3ffffff
)
==
lv
)
{
*
out
=
0x80000000
;
*
out
|=
vt
<<
26
;
*
out
|=
*
lv
;
*
out
|=
lv
;
}
else
{
int
offset
=
ctl2_alloc_segment
(
typelib
,
MSFT_SEG_CUSTDATA
,
8
,
0
);
*
((
unsigned
short
*
)
&
typelib
->
typelib_segment_data
[
MSFT_SEG_CUSTDATA
][
offset
])
=
vt
;
...
...
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