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
7f1473ac
Commit
7f1473ac
authored
Jun 03, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jun 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Support more default properties.
parent
06db5a98
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
4 deletions
+63
-4
datainit.c
dlls/oledb32/datainit.c
+27
-3
Makefile.in
dlls/oledb32/tests/Makefile.in
+1
-1
database.c
dlls/oledb32/tests/database.c
+35
-0
No files found.
dlls/oledb32/datainit.c
View file @
7f1473ac
...
...
@@ -296,12 +296,36 @@ struct dbproperty {
VARTYPE
type
;
};
static
const
WCHAR
conn_timeout
[]
=
{
'C'
,
'o'
,
'n'
,
'n'
,
'e'
,
'c'
,
't'
,
' '
,
'T'
,
'i'
,
'm'
,
'e'
,
'o'
,
'u'
,
't'
,
0
};
static
const
WCHAR
datasourceW
[]
=
{
'D'
,
'a'
,
't'
,
'a'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
persistsiW
[]
=
{
'P'
,
'e'
,
'r'
,
's'
,
'i'
,
's'
,
't'
,
' '
,
'S'
,
'e'
,
'c'
,
'u'
,
'r'
,
'i'
,
't'
,
'y'
,
' '
,
'I'
,
'n'
,
'f'
,
'o'
,
0
};
static
const
WCHAR
extemdedW
[]
=
{
'E'
,
'x'
,
't'
,
'e'
,
'n'
,
'd'
,
'e'
,
'd'
,
' '
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'i'
,
'e'
,
's'
,
0
};
static
const
WCHAR
gen_timeout
[]
=
{
'G'
,
'e'
,
'n'
,
'e'
,
'r'
,
'a'
,
'l'
,
' '
,
'T'
,
'i'
,
'm'
,
'e'
,
'o'
,
'u'
,
't'
,
0
};
static
const
WCHAR
initcatW
[]
=
{
'I'
,
'n'
,
'i'
,
't'
,
'i'
,
'a'
,
'l'
,
' '
,
'C'
,
'a'
,
't'
,
'a'
,
'l'
,
'o'
,
'g'
,
0
};
static
const
WCHAR
localeIDW
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'e'
,
' '
,
'I'
,
'd'
,
'e'
,
'n'
,
't'
,
'i'
,
'f'
,
'i'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
locationW
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
modeW
[]
=
{
'M'
,
'o'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
oledbservW
[]
=
{
'O'
,
'L'
,
'E'
,
' '
,
'D'
,
'B'
,
' '
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'i'
,
'e'
,
's'
,
0
};
static
const
WCHAR
passwordW
[]
=
{
'P'
,
'a'
,
's'
,
's'
,
'w'
,
'o'
,
'r'
,
'd'
,
0
};
static
const
WCHAR
persiststW
[]
=
{
'P'
,
'e'
,
'r'
,
's'
,
'i'
,
's'
,
't'
,
' '
,
'S'
,
'e'
,
'c'
,
'u'
,
'r'
,
'i'
,
't'
,
'y'
,
' '
,
'I'
,
'n'
,
'f'
,
'o'
,
0
};
static
const
WCHAR
promptW
[]
=
{
'P'
,
'r'
,
'o'
,
'm'
,
'p'
,
't'
,
0
};
static
const
WCHAR
useridW
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
' '
,
'I'
,
'D'
,
0
};
static
const
WCHAR
winhandleW
[]
=
{
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
' '
,
'H'
,
'a'
,
'n'
,
'd'
,
'l'
,
'e'
,
0
};
static
const
struct
dbproperty
dbproperties
[]
=
{
{
datasourceW
,
DBPROP_INIT_DATASOURCE
,
DBPROPOPTIONS_REQUIRED
,
VT_BSTR
},
{
persistsiW
,
DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO
,
DBPROPOPTIONS_OPTIONAL
,
VT_BOOL
}
{
conn_timeout
,
DBPROP_INIT_TIMEOUT
,
DBPROPOPTIONS_OPTIONAL
,
VT_I4
},
{
datasourceW
,
DBPROP_INIT_DATASOURCE
,
DBPROPOPTIONS_REQUIRED
,
VT_BSTR
},
{
extemdedW
,
DBPROP_INIT_PROVIDERSTRING
,
DBPROPOPTIONS_REQUIRED
,
VT_BSTR
},
{
gen_timeout
,
DBPROP_INIT_GENERALTIMEOUT
,
DBPROPOPTIONS_OPTIONAL
,
VT_I4
},
{
initcatW
,
DBPROP_CATALOGLOCATION
,
DBPROPOPTIONS_OPTIONAL
,
VT_BSTR
},
{
localeIDW
,
DBPROP_INIT_LCID
,
DBPROPOPTIONS_OPTIONAL
,
VT_I4
},
{
locationW
,
DBPROP_INIT_LOCATION
,
DBPROPOPTIONS_OPTIONAL
,
VT_BSTR
},
{
modeW
,
DBPROP_INIT_MODE
,
DBPROPOPTIONS_OPTIONAL
,
VT_I4
},
{
oledbservW
,
DBPROP_INIT_OLEDBSERVICES
,
DBPROPOPTIONS_OPTIONAL
,
VT_I4
},
{
passwordW
,
DBPROP_AUTH_PASSWORD
,
DBPROPOPTIONS_OPTIONAL
,
VT_BSTR
},
{
persiststW
,
DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO
,
DBPROPOPTIONS_OPTIONAL
,
VT_BOOL
},
{
promptW
,
DBPROP_INIT_PROMPT
,
DBPROPOPTIONS_OPTIONAL
,
VT_I2
},
{
useridW
,
DBPROP_AUTH_USERID
,
DBPROPOPTIONS_OPTIONAL
,
VT_BSTR
},
{
winhandleW
,
DBPROP_INIT_HWND
,
DBPROPOPTIONS_OPTIONAL
,
VT_I4
},
};
static
HRESULT
set_dbpropset
(
BSTR
name
,
BSTR
value
,
DBPROPSET
**
propset
)
...
...
dlls/oledb32/tests/Makefile.in
View file @
7f1473ac
TESTDLL
=
oledb32.dll
IMPORTS
=
uuid oleaut32 ole32 user32 gdi32 advapi32
IMPORTS
=
uuid
shell32
oleaut32 ole32 user32 gdi32 advapi32
C_SRCS
=
\
convert.c
\
...
...
dlls/oledb32/tests/database.c
View file @
7f1473ac
...
...
@@ -27,6 +27,7 @@
#include "ole2.h"
#include "msdadc.h"
#include "msdasc.h"
#include "shlobj.h"
#include "wine/test.h"
...
...
@@ -36,6 +37,8 @@ static void test_GetDataSource(WCHAR *initstring)
IDBInitialize
*
dbinit
=
NULL
;
HRESULT
hr
;
trace
(
"Data Source: %s
\n
"
,
wine_dbgstr_w
(
initstring
));
hr
=
CoCreateInstance
(
&
CLSID_MSDAINITIALIZE
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDataInitialize
,(
void
**
)
&
datainit
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
@@ -44,11 +47,43 @@ static void test_GetDataSource(WCHAR *initstring)
if
(
SUCCEEDED
(
hr
))
{
IDBProperties
*
props
=
NULL
;
IMalloc
*
ppM
=
NULL
;
hr
=
SHGetMalloc
(
&
ppM
);
if
(
FAILED
(
hr
))
{
ok
(
0
,
"Couldn't get IMalloc object.
\n
"
);
goto
end
;
}
hr
=
IDBInitialize_QueryInterface
(
dbinit
,
&
IID_IDBProperties
,
(
void
**
)
&
props
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
ULONG
cnt
;
DBPROPINFOSET
*
pInfoset
;
OLECHAR
*
ary
;
hr
=
IDBProperties_GetPropertyInfo
(
props
,
0
,
NULL
,
&
cnt
,
&
pInfoset
,
&
ary
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ULONG
i
;
for
(
i
=
0
;
i
<
pInfoset
->
cPropertyInfos
;
i
++
)
{
trace
(
"(0x%04x) '%s' %d
\n
"
,
pInfoset
->
rgPropertyInfos
[
i
].
dwPropertyID
,
wine_dbgstr_w
(
pInfoset
->
rgPropertyInfos
[
i
].
pwszDescription
),
pInfoset
->
rgPropertyInfos
[
i
].
vtType
);
}
IMalloc_Free
(
ppM
,
ary
);
}
IDBProperties_Release
(
props
);
}
IMalloc_Release
(
ppM
);
end:
IDBInitialize_Release
(
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