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
ae9281e2
Commit
ae9281e2
authored
Nov 04, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Allow case-insensitive match for Provider keyword.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2d08613e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
2 deletions
+34
-2
datainit.c
dlls/oledb32/datainit.c
+25
-2
database.c
dlls/oledb32/tests/database.c
+9
-0
No files found.
dlls/oledb32/datainit.c
View file @
ae9281e2
...
...
@@ -413,7 +413,7 @@ static HRESULT parse_init_string(const WCHAR *initstring, struct dbprops *props)
if
(
scol
)
scol
++
;
start
=
scol
;
if
(
!
strcmpW
(
name
,
providerW
))
if
(
!
strcmp
i
W
(
name
,
providerW
))
{
SysFreeString
(
name
);
SysFreeString
(
value
);
...
...
@@ -548,6 +548,29 @@ static void datasource_release(BOOL created, IUnknown **datasource)
*
datasource
=
NULL
;
}
static
inline
WCHAR
*
strdupW
(
const
WCHAR
*
src
)
{
WCHAR
*
dest
;
if
(
!
src
)
return
NULL
;
dest
=
heap_alloc
((
strlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
dest
)
strcpyW
(
dest
,
src
);
return
dest
;
}
static
WCHAR
*
strstriW
(
const
WCHAR
*
str
,
const
WCHAR
*
sub
)
{
LPWSTR
strlower
,
sublower
,
r
;
strlower
=
CharLowerW
(
strdupW
(
str
));
sublower
=
CharLowerW
(
strdupW
(
sub
));
r
=
strstrW
(
strlower
,
sublower
);
if
(
r
)
r
=
(
LPWSTR
)
str
+
(
r
-
strlower
);
heap_free
(
strlower
);
heap_free
(
sublower
);
return
r
;
}
static
HRESULT
WINAPI
datainit_GetDataSource
(
IDataInitialize
*
iface
,
IUnknown
*
outer
,
DWORD
clsctx
,
LPWSTR
initstring
,
REFIID
riid
,
IUnknown
**
datasource
)
{
...
...
@@ -565,7 +588,7 @@ static HRESULT WINAPI datainit_GetDataSource(IDataInitialize *iface, IUnknown *o
/* first get provider name */
provclsid
=
IID_NULL
;
if
(
initstring
&&
(
prov
=
strstrW
(
initstring
,
providerW
)))
if
(
initstring
&&
(
prov
=
strstr
i
W
(
initstring
,
providerW
)))
{
WCHAR
*
start
,
*
progid
;
int
len
;
...
...
dlls/oledb32/tests/database.c
View file @
ae9281e2
...
...
@@ -382,6 +382,8 @@ static void test_initializationstring(void)
{
static
const
WCHAR
initstring_msdasql
[]
=
{
'P'
,
'r'
,
'o'
,
'v'
,
'i'
,
'd'
,
'e'
,
'r'
,
'='
,
'M'
,
'S'
,
'D'
,
'A'
,
'S'
,
'Q'
,
'L'
,
'.'
,
'1'
,
';'
,
'D'
,
'a'
,
't'
,
'a'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'='
,
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
0
};
static
const
WCHAR
initstring_msdasql2
[]
=
{
'p'
,
'R'
,
'o'
,
'V'
,
'i'
,
'D'
,
'e'
,
'R'
,
'='
,
'M'
,
'S'
,
'D'
,
'A'
,
'S'
,
'Q'
,
'L'
,
'.'
,
'1'
,
';'
,
'D'
,
'a'
,
't'
,
'a'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'='
,
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
0
};
static
const
WCHAR
initstring_sqloledb
[]
=
{
'P'
,
'r'
,
'o'
,
'v'
,
'i'
,
'd'
,
'e'
,
'r'
,
'='
,
'S'
,
'Q'
,
'L'
,
'O'
,
'L'
,
'E'
,
'D'
,
'B'
,
'.'
,
'1'
,
';'
,
'D'
,
'a'
,
't'
,
'a'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'='
,
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
0
};
IDataInitialize
*
datainit
=
NULL
;
...
...
@@ -414,6 +416,13 @@ static void test_initializationstring(void)
}
IDBInitialize_Release
(
dbinit
);
/* mixed casing string */
dbinit
=
NULL
;
hr
=
IDataInitialize_GetDataSource
(
datainit
,
NULL
,
CLSCTX_INPROC_SERVER
,
(
WCHAR
*
)
initstring_msdasql2
,
&
IID_IDBInitialize
,
(
IUnknown
**
)
&
dbinit
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDBInitialize_Release
(
dbinit
);
}
else
ok
(
dbinit
==
NULL
,
"got %p
\n
"
,
dbinit
);
...
...
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