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
4f52e322
Commit
4f52e322
authored
Jul 09, 2021
by
Biswapriyo Nath
Committed by
Alexandre Julliard
Jul 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Add some function declarations in propvarutil.h.
Signed-off-by:
Biswapriyo Nath
<
nathbappai@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e33bdb87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
5 deletions
+72
-5
propvarutil.h
include/propvarutil.h
+72
-5
No files found.
include/propvarutil.h
View file @
4f52e322
...
...
@@ -74,6 +74,7 @@ HRESULT WINAPI PropVariantToGUID(const PROPVARIANT *ppropvar, GUID *guid);
HRESULT
WINAPI
VariantToGUID
(
const
VARIANT
*
pvar
,
GUID
*
guid
);
INT
WINAPI
PropVariantCompareEx
(
REFPROPVARIANT
propvar1
,
REFPROPVARIANT
propvar2
,
PROPVAR_COMPARE_UNIT
uint
,
PROPVAR_COMPARE_FLAGS
flags
);
HRESULT
WINAPI
InitPropVariantFromFileTime
(
const
FILETIME
*
pftIn
,
PROPVARIANT
*
ppropvar
);
HRESULT
WINAPI
PropVariantToDouble
(
REFPROPVARIANT
propvarIn
,
double
*
ret
);
HRESULT
WINAPI
PropVariantToInt16
(
REFPROPVARIANT
propvarIn
,
SHORT
*
ret
);
...
...
@@ -92,8 +93,17 @@ HRESULT WINAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn, WCHAR **ret);
#ifdef __cplusplus
HRESULT
InitPropVariantFromBoolean
(
BOOL
fVal
,
PROPVARIANT
*
ppropvar
);
HRESULT
InitPropVariantFromString
(
PCWSTR
psz
,
PROPVARIANT
*
ppropvar
);
HRESULT
InitPropVariantFromInt16
(
SHORT
nVal
,
PROPVARIANT
*
ppropvar
);
HRESULT
InitPropVariantFromUInt16
(
USHORT
uiVal
,
PROPVARIANT
*
ppropvar
);
HRESULT
InitPropVariantFromInt32
(
LONG
lVal
,
PROPVARIANT
*
ppropvar
);
HRESULT
InitPropVariantFromUInt32
(
ULONG
ulVal
,
PROPVARIANT
*
ppropvar
);
HRESULT
InitPropVariantFromInt64
(
LONGLONG
llVal
,
PROPVARIANT
*
ppropvar
);
HRESULT
InitPropVariantFromUInt64
(
ULONGLONG
ullVal
,
PROPVARIANT
*
ppropvar
);
HRESULT
InitPropVariantFromDouble
(
DOUBLE
dblVal
,
PROPVARIANT
*
ppropvar
);
HRESULT
InitPropVariantFromString
(
PCWSTR
psz
,
PROPVARIANT
*
ppropvar
);
HRESULT
InitPropVariantFromGUIDAsBuffer
(
REFGUID
guid
,
PROPVARIANT
*
ppropvar
);
BOOL
IsPropVariantVector
(
REFPROPVARIANT
propvar
);
BOOL
IsPropVariantString
(
REFPROPVARIANT
propvar
);
#ifndef NO_PROPVAR_INLINES
...
...
@@ -104,6 +114,55 @@ inline HRESULT InitPropVariantFromBoolean(BOOL fVal, PROPVARIANT *ppropvar)
return
S_OK
;
}
inline
HRESULT
InitPropVariantFromInt16
(
SHORT
nVal
,
PROPVARIANT
*
ppropvar
)
{
ppropvar
->
vt
=
VT_I2
;
ppropvar
->
iVal
=
nVal
;
return
S_OK
;
}
inline
HRESULT
InitPropVariantFromUInt16
(
USHORT
uiVal
,
PROPVARIANT
*
ppropvar
)
{
ppropvar
->
vt
=
VT_UI2
;
ppropvar
->
uiVal
=
uiVal
;
return
S_OK
;
}
inline
HRESULT
InitPropVariantFromInt32
(
LONG
lVal
,
PROPVARIANT
*
ppropvar
)
{
ppropvar
->
vt
=
VT_I4
;
ppropvar
->
lVal
=
lVal
;
return
S_OK
;
}
inline
HRESULT
InitPropVariantFromUInt32
(
ULONG
ulVal
,
PROPVARIANT
*
ppropvar
)
{
ppropvar
->
vt
=
VT_UI4
;
ppropvar
->
ulVal
=
ulVal
;
return
S_OK
;
}
inline
HRESULT
InitPropVariantFromInt64
(
LONGLONG
llVal
,
PROPVARIANT
*
ppropvar
)
{
ppropvar
->
vt
=
VT_I8
;
ppropvar
->
hVal
.
QuadPart
=
llVal
;
return
S_OK
;
}
inline
HRESULT
InitPropVariantFromUInt64
(
ULONGLONG
ullVal
,
PROPVARIANT
*
ppropvar
)
{
ppropvar
->
vt
=
VT_UI8
;
ppropvar
->
uhVal
.
QuadPart
=
ullVal
;
return
S_OK
;
}
inline
HRESULT
InitPropVariantFromDouble
(
DOUBLE
dblVal
,
PROPVARIANT
*
ppropvar
)
{
ppropvar
->
vt
=
VT_R8
;
ppropvar
->
dblVal
=
dblVal
;
return
S_OK
;
}
inline
HRESULT
InitPropVariantFromString
(
PCWSTR
psz
,
PROPVARIANT
*
ppropvar
)
{
HRESULT
hres
;
...
...
@@ -117,11 +176,19 @@ inline HRESULT InitPropVariantFromString(PCWSTR psz, PROPVARIANT *ppropvar)
return
hres
;
}
inline
HRESULT
InitPropVariantFrom
Int64
(
LONGLONG
llVal
,
PROPVARIANT
*
ppropvar
)
inline
HRESULT
InitPropVariantFrom
GUIDAsBuffer
(
REFGUID
guid
,
PROPVARIANT
*
ppropvar
)
{
ppropvar
->
vt
=
VT_I8
;
ppropvar
->
hVal
.
QuadPart
=
llVal
;
return
S_OK
;
return
InitPropVariantFromBuffer
(
guid
,
sizeof
(
GUID
),
ppropvar
);
}
inline
BOOL
IsPropVariantVector
(
REFPROPVARIANT
propvar
)
{
return
(
propvar
.
vt
&
(
VT_ARRAY
|
VT_VECTOR
));
}
inline
BOOL
IsPropVariantString
(
REFPROPVARIANT
propvar
)
{
return
(
PropVariantToStringWithDefault
(
propvar
,
NULL
)
!=
NULL
);
}
#endif
/* NO_PROPVAR_INLINES */
...
...
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