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
4736cc8c
Commit
4736cc8c
authored
Aug 15, 2001
by
Marcus Meissner
Committed by
Alexandre Julliard
Aug 15, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented VarParseNumFromStr, VarNumFromParseNum.
parent
25765130
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
2 deletions
+111
-2
oleaut32.spec
dlls/oleaut32/oleaut32.spec
+2
-2
variant.c
dlls/oleaut32/variant.c
+68
-0
oleauto.h
include/oleauto.h
+41
-0
No files found.
dlls/oleaut32/oleaut32.spec
View file @
4736cc8c
...
@@ -52,8 +52,8 @@ debug_channels (ole typelib)
...
@@ -52,8 +52,8 @@ debug_channels (ole typelib)
39 stdcall SafeArrayDestroyData(ptr) SafeArrayDestroyData
39 stdcall SafeArrayDestroyData(ptr) SafeArrayDestroyData
40 stdcall SafeArrayRedim(ptr ptr) SafeArrayRedim
40 stdcall SafeArrayRedim(ptr ptr) SafeArrayRedim
41 stub OACreateTypeLib2
41 stub OACreateTypeLib2
46 st
ub
VarParseNumFromStr
46 st
dcall VarParseNumFromStr(wstr long long ptr ptr)
VarParseNumFromStr
47 st
ub
VarNumFromParseNum
47 st
dcall VarNumFromParseNum(ptr ptr long ptr)
VarNumFromParseNum
48 stdcall VarI2FromUI1(long ptr) VarI2FromUI1
48 stdcall VarI2FromUI1(long ptr) VarI2FromUI1
49 stdcall VarI2FromI4(long ptr) VarI2FromI4
49 stdcall VarI2FromI4(long ptr) VarI2FromI4
50 stdcall VarI2FromR4(long ptr) VarI2FromR4
50 stdcall VarI2FromR4(long ptr) VarI2FromR4
...
...
dlls/oleaut32/variant.c
View file @
4736cc8c
...
@@ -4331,6 +4331,74 @@ INT WINAPI DosDateTimeToVariantTime(USHORT wDosDate, USHORT wDosTime,
...
@@ -4331,6 +4331,74 @@ INT WINAPI DosDateTimeToVariantTime(USHORT wDosDate, USHORT wDosTime,
return
TmToDATE
(
&
t
,
pvtime
);
return
TmToDATE
(
&
t
,
pvtime
);
}
}
/**********************************************************************
* VarParseNumFromStr [OLEAUT32.46]
*/
HRESULT
WINAPI
VarParseNumFromStr
(
OLECHAR
*
strIn
,
LCID
lcid
,
ULONG
dwFlags
,
NUMPARSE
*
pnumprs
,
BYTE
*
rgbDig
)
{
int
i
,
lastent
=
0
;
int
cDig
;
FIXME
(
"(%s,flags=%lx,....), partial stub!
\n
"
,
debugstr_w
(
strIn
),
dwFlags
);
FIXME
(
"numparse: cDig=%d, InFlags=%lx
\n
"
,
pnumprs
->
cDig
,
pnumprs
->
dwInFlags
);
/* The other struct components are to be set by us */
memset
(
rgbDig
,
0
,
pnumprs
->
cDig
);
cDig
=
0
;
for
(
i
=
0
;
strIn
[
i
]
;
i
++
)
{
if
((
strIn
[
i
]
>=
'0'
)
&&
(
strIn
[
i
]
<=
'9'
))
{
if
(
pnumprs
->
cDig
>
cDig
)
{
*
(
rgbDig
++
)
=
strIn
[
i
]
-
'0'
;
cDig
++
;
lastent
=
i
;
}
}
}
pnumprs
->
cDig
=
cDig
;
/* FIXME: Just patching some values in */
pnumprs
->
nPwr10
=
0
;
pnumprs
->
nBaseShift
=
0
;
pnumprs
->
cchUsed
=
lastent
;
pnumprs
->
dwOutFlags
=
NUMPRS_DECIMAL
;
return
S_OK
;
}
/**********************************************************************
* VarNumFromParseNum [OLEAUT32.47]
*/
HRESULT
WINAPI
VarNumFromParseNum
(
NUMPARSE
*
pnumprs
,
BYTE
*
rgbDig
,
ULONG
dwVtBits
,
VARIANT
*
pvar
)
{
DWORD
xint
;
int
i
;
FIXME
(
"(,dwVtBits=%lx,....), partial stub!
\n
"
,
dwVtBits
);
xint
=
0
;
for
(
i
=
0
;
i
<
pnumprs
->
cDig
;
i
++
)
xint
=
xint
*
10
+
rgbDig
[
i
];
VariantInit
(
pvar
);
if
(
dwVtBits
&
VTBIT_I4
)
{
pvar
->
vt
=
VT_I4
;
pvar
->
u
.
intVal
=
xint
;
return
S_OK
;
}
if
(
dwVtBits
&
VTBIT_R8
)
{
pvar
->
vt
=
VT_R8
;
pvar
->
u
.
dblVal
=
xint
;
return
S_OK
;
}
else
{
FIXME
(
"vtbitmask is unsupported %lx
\n
"
,
dwVtBits
);
return
E_FAIL
;
}
}
/**********************************************************************
/**********************************************************************
* VariantTimeToDosDateTime [OLEAUT32.??]
* VariantTimeToDosDateTime [OLEAUT32.??]
* Convert variant representation of time to the date and time representation
* Convert variant representation of time to the date and time representation
...
...
include/oleauto.h
View file @
4736cc8c
...
@@ -526,6 +526,47 @@ typedef struct {
...
@@ -526,6 +526,47 @@ typedef struct {
USHORT
wDayOfYear
;
USHORT
wDayOfYear
;
}
UDATE
;
}
UDATE
;
typedef
struct
{
INT
cDig
;
ULONG
dwInFlags
;
ULONG
dwOutFlags
;
INT
cchUsed
;
INT
nBaseShift
;
INT
nPwr10
;
}
NUMPARSE
;
#define NUMPRS_LEADING_WHITE 0x0001
#define NUMPRS_TRAILING_WHITE 0x0002
#define NUMPRS_LEADING_PLUS 0x0004
#define NUMPRS_TRAILING_PLUS 0x0008
#define NUMPRS_LEADING_MINUS 0x0010
#define NUMPRS_TRAILING_MINUS 0x0020
#define NUMPRS_HEX_OCT 0x0040
#define NUMPRS_PARENS 0x0080
#define NUMPRS_DECIMAL 0x0100
#define NUMPRS_THOUSANDS 0x0200
#define NUMPRS_CURRENCY 0x0400
#define NUMPRS_EXPONENT 0x0800
#define NUMPRS_USE_ALL 0x1000
#define NUMPRS_STD 0x1FFF
#define NUMPRS_NEG 0x10000
#define NUMPRS_INEXACT 0x20000
#define VTBIT_I1 (1 << VT_I1)
#define VTBIT_UI1 (1 << VT_UI1)
#define VTBIT_I2 (1 << VT_I2)
#define VTBIT_UI2 (1 << VT_UI2)
#define VTBIT_I4 (1 << VT_I4)
#define VTBIT_UI4 (1 << VT_UI4)
#define VTBIT_R4 (1 << VT_R4)
#define VTBIT_R8 (1 << VT_R8)
#define VTBIT_CY (1 << VT_CY)
#define VTBIT_DECIMAL (1 << VT_DECIMAL)
HRESULT
WINAPI
VarParseNumFromStr
(
OLECHAR
*
,
LCID
,
ULONG
,
NUMPARSE
*
,
BYTE
*
);
HRESULT
WINAPI
VarNumFromParseNum
(
NUMPARSE
*
,
BYTE
*
,
ULONG
,
VARIANT
*
);
INT
WINAPI
DosDateTimeToVariantTime
(
USHORT
,
USHORT
,
DATE
*
);
INT
WINAPI
DosDateTimeToVariantTime
(
USHORT
,
USHORT
,
DATE
*
);
INT
WINAPI
VariantTimeToDosDateTime
(
DATE
,
USHORT
*
,
USHORT
*
);
INT
WINAPI
VariantTimeToDosDateTime
(
DATE
,
USHORT
*
,
USHORT
*
);
...
...
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