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
5614770c
Commit
5614770c
authored
May 23, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
May 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Rewrite debugstr_vt.
parent
20daa8b6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
30 deletions
+36
-30
tmarshal.c
dlls/oleaut32/tmarshal.c
+1
-1
typelib.c
dlls/oleaut32/typelib.c
+3
-4
variant.c
dlls/oleaut32/variant.c
+31
-16
variant.h
dlls/oleaut32/variant.h
+1
-9
No files found.
dlls/oleaut32/tmarshal.c
View file @
5614770c
...
...
@@ -711,7 +711,7 @@ serialize_param(
hres
=
xbuf_add
(
buf
,(
LPBYTE
)
arg
,
sizeof
(
DWORD
));
return
hres
;
case
VT_VARIANT
:
{
if
(
debugout
)
TRACE_
(
olerelay
)(
"
Vt(%s%s)("
,
debugstr_vt
(
V_VT
((
VARIANT
*
)
arg
)),
debugstr_vf
(
V_VT
((
VARIANT
*
)
arg
)
));
if
(
debugout
)
TRACE_
(
olerelay
)(
"
%s"
,
debugstr_variant
((
VARIANT
*
)
arg
));
if
(
writeit
)
{
ULONG
flags
=
MAKELONG
(
MSHCTX_DIFFERENTMACHINE
,
NDR_LOCAL_DATA_REPRESENTATION
);
...
...
dlls/oleaut32/typelib.c
View file @
5614770c
...
...
@@ -1541,7 +1541,7 @@ static void dump_Variant(const VARIANT * pvar)
{
SYSTEMTIME
st
;
TRACE
(
"%p->{%s
%s"
,
pvar
,
debugstr_VT
(
pvar
),
debugstr_VF
(
pvar
));
TRACE
(
"%p->{%s
"
,
pvar
,
debugstr_vt
(
V_VT
(
pvar
)
));
if
(
pvar
)
{
...
...
@@ -7188,9 +7188,8 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
if
(
FAILED
(
hres
))
{
ERR
(
"failed to convert param %d to %s%s from %s%s
\n
"
,
i
,
debugstr_vt
(
rgvt
[
i
]),
debugstr_vf
(
rgvt
[
i
]),
debugstr_VT
(
src_arg
),
debugstr_VF
(
src_arg
));
ERR
(
"failed to convert param %d to %s from %s
\n
"
,
i
,
debugstr_vt
(
rgvt
[
i
]),
debugstr_variant
(
src_arg
));
break
;
}
prgpvarg
[
i
]
=
&
rgvarg
[
i
];
...
...
dlls/oleaut32/variant.c
View file @
5614770c
...
...
@@ -45,7 +45,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
variant
);
const
char
*
const
wine_vtypes
[
VT_CLSID
+
1
]
=
static
const
char
*
const
variant_types
[
]
=
{
"VT_EMPTY"
,
"VT_NULL"
,
"VT_I2"
,
"VT_I4"
,
"VT_R4"
,
"VT_R8"
,
"VT_CY"
,
"VT_DATE"
,
"VT_BSTR"
,
"VT_DISPATCH"
,
"VT_ERROR"
,
"VT_BOOL"
,
"VT_VARIANT"
,
"VT_UNKNOWN"
,
...
...
@@ -55,10 +55,11 @@ const char * const wine_vtypes[VT_CLSID+1] =
"VT_RECORD"
,
"VT_INT_PTR"
,
"VT_UINT_PTR"
,
"39"
,
"40"
,
"41"
,
"42"
,
"43"
,
"44"
,
"45"
,
"46"
,
"47"
,
"48"
,
"49"
,
"50"
,
"51"
,
"52"
,
"53"
,
"54"
,
"55"
,
"56"
,
"57"
,
"58"
,
"59"
,
"60"
,
"61"
,
"62"
,
"63"
,
"VT_FILETIME"
,
"VT_BLOB"
,
"VT_STREAM"
,
"VT_STORAGE"
,
"VT_STREAMED_OBJECT"
,
"VT_STORED_OBJECT"
,
"VT_BLOB_OBJECT"
,
"VT_CF"
,
"VT_CLSID"
"VT_STREAMED_OBJECT"
,
"VT_STORED_OBJECT"
,
"VT_BLOB_OBJECT"
,
"VT_CF"
,
"VT_CLSID"
,
"VT_VERSIONED_STREAM"
};
const
char
*
const
wine_v
flags
[
16
]
=
static
const
char
*
const
variant_
flags
[
16
]
=
{
""
,
"|VT_VECTOR"
,
...
...
@@ -68,16 +69,30 @@ const char * const wine_vflags[16] =
"|VT_VECTOR|VT_ARRAY"
,
"|VT_ARRAY|VT_BYREF"
,
"|VT_VECTOR|VT_ARRAY|VT_BYREF"
,
"|VT_
HARDTYPE
"
,
"|VT_VECTOR|VT_
HARDTYPE
"
,
"|VT_ARRAY|VT_
HARDTYPE
"
,
"|VT_VECTOR|VT_ARRAY|VT_
HARDTYPE
"
,
"|VT_BYREF|VT_
HARDTYPE
"
,
"|VT_VECTOR|VT_ARRAY|VT_
HARDTYPE
"
,
"|VT_ARRAY|VT_BYREF|VT_
HARDTYPE
"
,
"|VT_VECTOR|VT_ARRAY|VT_BYREF|VT_
HARDTYPE
"
,
"|VT_
RESERVED
"
,
"|VT_VECTOR|VT_
RESERVED
"
,
"|VT_ARRAY|VT_
RESERVED
"
,
"|VT_VECTOR|VT_ARRAY|VT_
RESERVED
"
,
"|VT_BYREF|VT_
RESERVED
"
,
"|VT_VECTOR|VT_ARRAY|VT_
RESERVED
"
,
"|VT_ARRAY|VT_BYREF|VT_
RESERVED
"
,
"|VT_VECTOR|VT_ARRAY|VT_BYREF|VT_
RESERVED
"
,
};
const
char
*
debugstr_vt
(
VARTYPE
vt
)
{
if
(
vt
&
~
VT_TYPEMASK
)
return
wine_dbg_sprintf
(
"%s%s"
,
debugstr_vt
(
vt
&
VT_TYPEMASK
),
variant_flags
[
vt
>>
12
]);
if
(
vt
<=
sizeof
(
variant_types
)
/
sizeof
(
*
variant_types
))
return
variant_types
[
vt
];
if
(
vt
==
VT_BSTR_BLOB
)
return
"VT_BSTR_BLOB"
;
return
wine_dbg_sprintf
(
"vt(invalid %x)"
,
vt
);
}
const
char
*
debugstr_variant
(
const
VARIANT
*
v
)
{
if
(
!
v
)
...
...
@@ -109,7 +124,7 @@ const char *debugstr_variant(const VARIANT *v)
case
VT_UINT
:
return
wine_dbg_sprintf
(
"%p {VT_UINT: %u}"
,
v
,
V_UINT
(
v
));
default:
return
wine_dbg_sprintf
(
"%p {vt %s
%s}"
,
v
,
debugstr_VT
(
v
),
debugstr_VF
(
v
));
return
wine_dbg_sprintf
(
"%p {vt %s
}"
,
v
,
debugstr_vt
(
V_VT
(
v
)
));
}
}
...
...
@@ -121,8 +136,8 @@ static inline HRESULT VARIANT_Coerce(VARIANTARG* pd, LCID lcid, USHORT wFlags,
VARTYPE
vtFrom
=
V_TYPE
(
ps
);
DWORD
dwFlags
=
0
;
TRACE
(
"(%s,0x%08x,0x%04x,%s,%s
%s
)
\n
"
,
debugstr_variant
(
pd
),
lcid
,
wFlags
,
debugstr_variant
(
ps
),
debugstr_vt
(
vt
)
,
debugstr_vf
(
vt
)
);
TRACE
(
"(%s,0x%08x,0x%04x,%s,%s)
\n
"
,
debugstr_variant
(
pd
),
lcid
,
wFlags
,
debugstr_variant
(
ps
),
debugstr_vt
(
vt
));
if
(
vt
==
VT_BSTR
||
vtFrom
==
VT_BSTR
)
{
...
...
@@ -1030,8 +1045,8 @@ HRESULT WINAPI VariantChangeTypeEx(VARIANTARG* pvargDest, VARIANTARG* pvargSrc,
{
HRESULT
res
=
S_OK
;
TRACE
(
"(%s,%s,0x%08x,0x%04x,%s
%s
)
\n
"
,
debugstr_variant
(
pvargDest
),
debugstr_variant
(
pvargSrc
),
lcid
,
wFlags
,
debugstr_vt
(
vt
)
,
debugstr_vf
(
vt
)
);
TRACE
(
"(%s,%s,0x%08x,0x%04x,%s)
\n
"
,
debugstr_variant
(
pvargDest
),
debugstr_variant
(
pvargSrc
),
lcid
,
wFlags
,
debugstr_vt
(
vt
));
if
(
vt
==
VT_CLSID
)
res
=
DISP_E_BADVARTYPE
;
...
...
dlls/oleaut32/variant.h
View file @
5614770c
...
...
@@ -48,16 +48,8 @@
#define VTBIT_VARIANT (1 << VT_VARIANT)
#define VTBIT_15 (1 << 15)
/* no variant type with this number */
extern
const
char
*
const
wine_vtypes
[]
DECLSPEC_HIDDEN
;
#define debugstr_vt(v) (((v)&VT_TYPEMASK) <= VT_CLSID ? wine_vtypes[((v)&VT_TYPEMASK)] : \
((v)&VT_TYPEMASK) == VT_BSTR_BLOB ? "VT_BSTR_BLOB": "Invalid")
#define debugstr_VT(v) (!(v) ? "(null)" : debugstr_vt(V_TYPE((v))))
extern
const
char
*
const
wine_vflags
[]
DECLSPEC_HIDDEN
;
#define debugstr_vf(v) (wine_vflags[((v)&VT_EXTRA_TYPE)>>12])
#define debugstr_VF(v) (!(v) ? "(null)" : debugstr_vf(V_EXTRA_TYPE(v)))
const
char
*
debugstr_variant
(
const
VARIANT
*
)
DECLSPEC_HIDDEN
;
const
char
*
debugstr_vt
(
VARTYPE
)
DECLSPEC_HIDDEN
;
/* Size constraints */
#define I1_MAX 0x7f
...
...
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