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
27ac89ac
Commit
27ac89ac
authored
Sep 16, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propsys: Added InitVariantFromGUIDAsString implementation.
parent
b6da3052
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
2 deletions
+49
-2
Makefile.in
dlls/propsys/Makefile.in
+1
-0
propsys.spec
dlls/propsys/propsys.spec
+2
-2
propvar.c
dlls/propsys/propvar.c
+46
-0
No files found.
dlls/propsys/Makefile.in
View file @
27ac89ac
MODULE
=
propsys.dll
IMPORTLIB
=
propsys
IMPORTS
=
ole32 oleaut32
C_SRCS
=
\
propsys_main.c
\
...
...
dlls/propsys/propsys.spec
View file @
27ac89ac
...
...
@@ -33,7 +33,7 @@
@ stub InitPropVariantFromDoubleVector
@ stub InitPropVariantFromFileTime
@ stub InitPropVariantFromFileTimeVector
@ st
ub InitPropVariantFromGUIDAsString
@ st
dcall InitPropVariantFromGUIDAsString(ptr ptr)
@ stub InitPropVariantFromInt16Vector
@ stub InitPropVariantFromInt32Vector
@ stub InitPropVariantFromInt64Vector
...
...
@@ -51,7 +51,7 @@
@ stub InitVariantFromDoubleArray
@ stub InitVariantFromFileTime
@ stub InitVariantFromFileTimeArray
@ st
ub InitVariantFromGUIDAsString
@ st
dcall InitVariantFromGUIDAsString(ptr ptr)
@ stub InitVariantFromInt16Array
@ stub InitVariantFromInt32Array
@ stub InitVariantFromInt64Array
...
...
dlls/propsys/propvar.c
View file @
27ac89ac
...
...
@@ -32,6 +32,7 @@
#include "propvarutil.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
propsys
);
...
...
@@ -86,3 +87,48 @@ HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT p
return
E_FAIL
;
}
static
void
PROPVAR_GUIDToWSTR
(
REFGUID
guid
,
WCHAR
*
str
)
{
static
const
WCHAR
format
[]
=
{
'{'
,
'%'
,
'0'
,
'8'
,
'X'
,
'-'
,
'%'
,
'0'
,
'4'
,
'X'
,
'-'
,
'%'
,
'0'
,
'4'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'}'
,
0
};
sprintfW
(
str
,
format
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
}
HRESULT
WINAPI
InitPropVariantFromGUIDAsString
(
REFGUID
guid
,
PROPVARIANT
*
ppropvar
)
{
TRACE
(
"(%p %p)
\n
"
,
guid
,
ppropvar
);
if
(
!
guid
)
return
E_FAIL
;
ppropvar
->
vt
=
VT_LPWSTR
;
ppropvar
->
u
.
pwszVal
=
CoTaskMemAlloc
(
39
*
sizeof
(
WCHAR
));
if
(
!
ppropvar
->
u
.
pwszVal
)
return
E_OUTOFMEMORY
;
PROPVAR_GUIDToWSTR
(
guid
,
ppropvar
->
u
.
pwszVal
);
return
S_OK
;
}
HRESULT
WINAPI
InitVariantFromGUIDAsString
(
REFGUID
guid
,
VARIANT
*
pvar
)
{
TRACE
(
"(%p %p)
\n
"
,
guid
,
pvar
);
if
(
!
guid
)
{
FIXME
(
"guid == NULL
\n
"
);
return
E_FAIL
;
}
V_VT
(
pvar
)
=
VT_BSTR
;
V_BSTR
(
pvar
)
=
SysAllocStringLen
(
NULL
,
38
);
if
(
!
V_BSTR
(
pvar
))
return
E_OUTOFMEMORY
;
PROPVAR_GUIDToWSTR
(
guid
,
V_BSTR
(
pvar
));
return
S_OK
;
}
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