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
4646ed19
Commit
4646ed19
authored
Sep 19, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propsys: Added partial PropVariantToGUID implementation.
parent
860df26c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
2 deletions
+110
-2
propsys.spec
dlls/propsys/propsys.spec
+2
-2
propvar.c
dlls/propsys/propvar.c
+106
-0
urlmon.spec
dlls/urlmon/urlmon.spec
+2
-0
No files found.
dlls/propsys/propsys.spec
View file @
4646ed19
...
...
@@ -119,7 +119,7 @@
@ stub PropVariantToFileTime
@ stub PropVariantToFileTimeVector
@ stub PropVariantToFileTimeVectorAlloc
@ st
ub PropVariantToGUID
@ st
dcall PropVariantToGUID(ptr ptr)
@ stub PropVariantToInt16
@ stub PropVariantToInt16Vector
@ stub PropVariantToInt16VectorAlloc
...
...
@@ -175,7 +175,7 @@
@ stub VariantToDoubleArrayAlloc
@ stub VariantToDoubleWithDefault
@ stub VariantToFileTime
@ st
ub VariantToGUID
@ st
dcall VariantToGUID(ptr ptr)
@ stub VariantToInt16
@ stub VariantToInt16Array
@ stub VariantToInt16ArrayAlloc
...
...
dlls/propsys/propvar.c
View file @
4646ed19
...
...
@@ -177,3 +177,109 @@ HRESULT WINAPI InitVariantFromBuffer(const VOID *pv, UINT cb, VARIANT *pvar)
V_ARRAY
(
pvar
)
=
arr
;
return
S_OK
;
}
static
inline
DWORD
PROPVAR_HexToNum
(
const
WCHAR
*
hex
)
{
DWORD
ret
;
if
(
hex
[
0
]
>=
'0'
&&
hex
[
0
]
<=
'9'
)
ret
=
hex
[
0
]
-
'0'
;
else
if
(
hex
[
0
]
>=
'a'
&&
hex
[
0
]
<=
'f'
)
ret
=
hex
[
0
]
-
'a'
+
10
;
else
if
(
hex
[
0
]
>=
'A'
&&
hex
[
0
]
<=
'F'
)
ret
=
hex
[
0
]
-
'A'
+
10
;
else
return
-
1
;
ret
<<=
4
;
if
(
hex
[
1
]
>=
'0'
&&
hex
[
1
]
<=
'9'
)
return
ret
+
hex
[
1
]
-
'0'
;
else
if
(
hex
[
1
]
>=
'a'
&&
hex
[
1
]
<=
'f'
)
return
ret
+
hex
[
1
]
-
'a'
+
10
;
else
if
(
hex
[
1
]
>=
'A'
&&
hex
[
1
]
<=
'F'
)
return
ret
+
hex
[
1
]
-
'A'
+
10
;
else
return
-
1
;
}
static
inline
HRESULT
PROPVAR_WCHARToGUID
(
const
WCHAR
*
str
,
int
len
,
GUID
*
guid
)
{
DWORD
i
,
val
=
0
;
const
WCHAR
*
p
;
memset
(
guid
,
0
,
sizeof
(
GUID
));
if
(
len
!=
38
||
str
[
0
]
!=
'{'
||
str
[
9
]
!=
'-'
||
str
[
14
]
!=
'-'
||
str
[
19
]
!=
'-'
||
str
[
24
]
!=
'-'
||
str
[
37
]
!=
'}'
)
{
WARN
(
"Error parsing %s
\n
"
,
debugstr_w
(
str
));
return
E_INVALIDARG
;
}
p
=
str
+
1
;
for
(
i
=
0
;
i
<
4
&&
val
!=-
1
;
i
++
)
{
val
=
PROPVAR_HexToNum
(
p
);
guid
->
Data1
=
(
guid
->
Data1
<<
8
)
+
val
;
p
+=
2
;
}
p
++
;
for
(
i
=
0
;
i
<
2
&&
val
!=-
1
;
i
++
)
{
val
=
PROPVAR_HexToNum
(
p
);
guid
->
Data2
=
(
guid
->
Data2
<<
8
)
+
val
;
p
+=
2
;
}
p
++
;
for
(
i
=
0
;
i
<
2
&&
val
!=-
1
;
i
++
)
{
val
=
PROPVAR_HexToNum
(
p
);
guid
->
Data3
=
(
guid
->
Data3
<<
8
)
+
val
;
p
+=
2
;
}
p
++
;
for
(
i
=
0
;
i
<
8
&&
val
!=-
1
;
i
++
)
{
if
(
i
==
2
)
p
++
;
val
=
guid
->
Data4
[
i
]
=
PROPVAR_HexToNum
(
p
);
p
+=
2
;
}
if
(
val
==
-
1
)
{
WARN
(
"Error parsing %s
\n
"
,
debugstr_w
(
str
));
memset
(
guid
,
0
,
sizeof
(
GUID
));
return
E_INVALIDARG
;
}
return
S_OK
;
}
HRESULT
WINAPI
PropVariantToGUID
(
const
PROPVARIANT
*
ppropvar
,
GUID
*
guid
)
{
TRACE
(
"%p %p)
\n
"
,
ppropvar
,
guid
);
switch
(
ppropvar
->
vt
)
{
case
VT_BSTR
:
return
PROPVAR_WCHARToGUID
(
ppropvar
->
u
.
bstrVal
,
SysStringLen
(
ppropvar
->
u
.
bstrVal
),
guid
);
case
VT_LPWSTR
:
return
PROPVAR_WCHARToGUID
(
ppropvar
->
u
.
pwszVal
,
strlenW
(
ppropvar
->
u
.
pwszVal
),
guid
);
default:
FIXME
(
"unsupported vt: %d
\n
"
,
ppropvar
->
vt
);
return
E_NOTIMPL
;
}
}
HRESULT
WINAPI
VariantToGUID
(
const
VARIANT
*
pvar
,
GUID
*
guid
)
{
TRACE
(
"(%p %p)
\n
"
,
pvar
,
guid
);
switch
(
V_VT
(
pvar
))
{
case
VT_BSTR
:
{
HRESULT
hres
=
PROPVAR_WCHARToGUID
(
V_BSTR
(
pvar
),
SysStringLen
(
V_BSTR
(
pvar
)),
guid
);
if
(
hres
==
E_INVALIDARG
)
return
E_FAIL
;
return
hres
;
}
default:
FIXME
(
"unsupported vt: %d
\n
"
,
V_VT
(
pvar
));
return
E_NOTIMPL
;
}
}
dlls/urlmon/urlmon.spec
View file @
4646ed19
...
...
@@ -96,8 +96,10 @@
@ stub ZonesReInit
111 stdcall @(wstr) IsProtectedModeURL
329 stdcall @(ptr ptr) propsys.VariantToGUID
331 stdcall @(ptr long ptr) propsys.InitPropVariantFromBuffer
335 stdcall @(ptr long ptr) propsys.InitVariantFromBuffer
350 stdcall @(ptr ptr) propsys.PropVariantToGUID
362 stdcall @(ptr ptr) propsys.InitVariantFromGUIDAsString
410 stdcall @(long long) URLMON_410
423 stdcall @(long long long long) URLMON_423
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