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
ed53dafc
Commit
ed53dafc
authored
Oct 27, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Oct 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Add CanConvert support for DBTYPE_FILETIME.
parent
021eaade
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
16 deletions
+29
-16
convert.c
dlls/oledb32/convert.c
+15
-3
convert.c
dlls/oledb32/tests/convert.c
+14
-13
No files found.
dlls/oledb32/convert.c
View file @
ed53dafc
...
...
@@ -452,6 +452,7 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface,
{
case
DBTYPE_DATE
:
case
DBTYPE_GUID
:
case
DBTYPE_FILETIME
:
return
S_OK
;
default:
if
(
dst_base_type
==
DBTYPE_DBTIMESTAMP
)
return
S_OK
;
...
...
@@ -462,7 +463,8 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface,
switch
(
dst_base_type
)
{
case
DBTYPE_NULL
:
case
DBTYPE_VARIANT
:
return
S_OK
;
case
DBTYPE_VARIANT
:
case
DBTYPE_FILETIME
:
return
S_OK
;
default:
return
S_FALSE
;
}
...
...
@@ -486,8 +488,12 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface,
case
DBTYPE_I8
:
if
(
common_class
(
dst_class
))
return
S_OK
;
if
(
dst_base_type
==
DBTYPE_BYTES
)
return
S_OK
;
return
S_FALSE
;
switch
(
dst_base_type
)
{
case
DBTYPE_BYTES
:
case
DBTYPE_FILETIME
:
return
S_OK
;
default:
return
S_FALSE
;
}
case
DBTYPE_DATE
:
switch
(
dst_class
)
...
...
@@ -502,6 +508,7 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface,
case
DBTYPE_I8
:
case
DBTYPE_DATE
:
case
DBTYPE_DBDATE
:
case
DBTYPE_FILETIME
:
return
S_OK
;
default:
return
S_FALSE
;
}
...
...
@@ -524,6 +531,7 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface,
case
DBTYPE_GUID
:
case
DBTYPE_BYTES
:
case
DBTYPE_DBDATE
:
case
DBTYPE_FILETIME
:
return
S_OK
;
default:
return
S_FALSE
;
}
...
...
@@ -567,6 +575,9 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface,
default:
return
S_FALSE
;
}
case
DBTYPE_FILETIME
:
if
(
dst_class
==
DBTYPE_I8
)
return
S_OK
;
/* fall through */
case
DBTYPE_DBDATE
:
switch
(
dst_class
)
{
...
...
@@ -576,6 +587,7 @@ static HRESULT WINAPI convert_CanConvert(IDataConvert* iface,
case
DBTYPE_BSTR
:
case
DBTYPE_VARIANT
:
case
DBTYPE_DBDATE
:
case
DBTYPE_FILETIME
:
return
S_OK
;
default:
return
S_FALSE
;
}
...
...
dlls/oledb32/tests/convert.c
View file @
ed53dafc
...
...
@@ -150,22 +150,22 @@ struct can_convert
DWORD
can_convert_to
;
}
simple_convert
[]
=
{
{
DBTYPE_EMPTY
,
0x
2
3bfd9ff
},
{
DBTYPE_NULL
,
0x
0
0001002
},
{
DBTYPE_EMPTY
,
0x
6
3bfd9ff
},
{
DBTYPE_NULL
,
0x
4
0001002
},
{
DBTYPE_I2
,
0x3b9fd9ff
},
{
DBTYPE_I4
,
0x3bdfd9ff
},
{
DBTYPE_R4
,
0x3b9fd9ff
},
{
DBTYPE_R8
,
0x3b9fd9ff
},
{
DBTYPE_CY
,
0x039fd97f
},
{
DBTYPE_DATE
,
0x
3
99f99bf
},
{
DBTYPE_DATE
,
0x
7
99f99bf
},
{
DBTYPE_BSTR
,
0x
3
bffd9ff
},
{
DBTYPE_IDISPATCH
,
0x
3
bffffff
},
{
DBTYPE_BSTR
,
0x
7
bffd9ff
},
{
DBTYPE_IDISPATCH
,
0x
7
bffffff
},
{
DBTYPE_ERROR
,
0x01001500
},
{
DBTYPE_BOOL
,
0x039fd9ff
},
{
DBTYPE_VARIANT
,
0x
3
bffffff
},
{
DBTYPE_VARIANT
,
0x
7
bffffff
},
{
DBTYPE_IUNKNOWN
,
0x00003203
},
{
DBTYPE_DECIMAL
,
0x3b9fd97f
},
{
DBTYPE_I1
,
0x3b9fd9ff
},
...
...
@@ -173,20 +173,21 @@ struct can_convert
{
DBTYPE_UI1
,
0x3b9fd9ff
},
{
DBTYPE_UI2
,
0x3b9fd9ff
},
{
DBTYPE_UI4
,
0x3bdfd9ff
},
{
DBTYPE_I8
,
0x
0
3dfd97f
},
{
DBTYPE_I8
,
0x
4
3dfd97f
},
{
DBTYPE_UI8
,
0x
0
3dfd97f
},
{
DBTYPE_UI8
,
0x
4
3dfd97f
},
{
DBTYPE_GUID
,
0x01e01103
},
{
DBTYPE_BYTES
,
0x01fc110b
},
{
DBTYPE_STR
,
0x
3
bffd9ff
},
{
DBTYPE_STR
,
0x
7
bffd9ff
},
{
DBTYPE_WSTR
,
0x
3
bffd9ff
},
{
DBTYPE_WSTR
,
0x
7
bffd9ff
},
{
DBTYPE_NUMERIC
,
0x039fd97f
},
{
DBTYPE_UDT
,
0x00000000
},
{
DBTYPE_DBDATE
,
0x
3
9801183
},
{
DBTYPE_DBDATE
,
0x
7
9801183
},
{
DBTYPE_DBTIME
,
0x39801183
},
{
DBTYPE_DBTIMESTAMP
,
0x39801183
}
{
DBTYPE_DBTIME
,
0x79801183
},
{
DBTYPE_DBTIMESTAMP
,
0x79801183
},
{
DBTYPE_FILETIME
,
0x79981183
}
};
...
...
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