msdasql/tests: Fix printf format warnings with long types.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
35cf06c3e1
commit
bdb7bb1022
|
@ -1,4 +1,3 @@
|
|||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
||||
TESTDLL = msdasql.dll
|
||||
IMPORTS = uuid oleaut32 ole32 odbccp32
|
||||
|
||||
|
|
|
@ -50,17 +50,17 @@ static void test_msdasql(void)
|
|||
CLSID classid;
|
||||
|
||||
hr = CoCreateInstance( &CLSID_MSDASQL, NULL, CLSCTX_ALL, &IID_IUnknown, (void **)&unk);
|
||||
ok(hr == S_OK, "Failed to create object 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "Failed to create object 0x%08lx\n", hr);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
hr = IUnknown_QueryInterface(unk, &IID_IPersist, (void**)&persist);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IPersist_GetClassID(persist, &classid);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ok(IsEqualGUID(&classid, &CLSID_MSDASQL), "got %s\n", debugstr_guid(&classid));
|
||||
|
||||
IPersist_Release(persist);
|
||||
|
@ -91,7 +91,7 @@ static void test_Properties(void)
|
|||
};
|
||||
|
||||
hr = CoCreateInstance( &CLSID_MSDASQL, NULL, CLSCTX_ALL, &IID_IDBProperties, (void **)&props);
|
||||
ok(hr == S_OK, "Failed to create object 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "Failed to create object 0x%08lx\n", hr);
|
||||
|
||||
propidset.rgPropertyIDs = NULL;
|
||||
propidset.cPropertyIDs = 0;
|
||||
|
@ -99,13 +99,13 @@ static void test_Properties(void)
|
|||
|
||||
infocount = 0;
|
||||
hr = IDBProperties_GetPropertyInfo(props, 1, &propidset, &infocount, &propinfoset, &desc);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
VARTYPE types[14] = { VT_BSTR, VT_BOOL, VT_BSTR, VT_BSTR, intptr_vartype, VT_BSTR, VT_I4, VT_I2 , VT_I4, VT_BSTR, VT_I4, VT_BSTR, VT_I4, VT_I4 };
|
||||
|
||||
ok(IsEqualGUID(&propinfoset->guidPropertySet, &DBPROPSET_DBINIT), "got %s\n", debugstr_guid(&propinfoset->guidPropertySet));
|
||||
ok(propinfoset->cPropertyInfos == 14, "got %d\n", propinfoset->cPropertyInfos);
|
||||
ok(propinfoset->cPropertyInfos == 14, "got %lu\n", propinfoset->cPropertyInfos);
|
||||
|
||||
propidlist.guidPropertySet = DBPROPSET_DBINIT;
|
||||
propidlist.cPropertyIDs = propinfoset->cPropertyInfos;
|
||||
|
@ -115,10 +115,10 @@ static void test_Properties(void)
|
|||
{
|
||||
ok(propinfoset->rgPropertyInfos[i].vtType == types[i], "got %d\n", propinfoset->rgPropertyInfos[i].vtType);
|
||||
ok(propinfoset->rgPropertyInfos[i].dwFlags == (DBPROPFLAGS_DBINIT | DBPROPFLAGS_READ | DBPROPFLAGS_WRITE),
|
||||
"got %d\n", propinfoset->rgPropertyInfos[i].dwFlags);
|
||||
ok(properties[i] == propinfoset->rgPropertyInfos[i].dwPropertyID, "%d, got %d\n", i,
|
||||
"got %lu\n", propinfoset->rgPropertyInfos[i].dwFlags);
|
||||
ok(properties[i] == propinfoset->rgPropertyInfos[i].dwPropertyID, "%lu, got %lu\n", i,
|
||||
propinfoset->rgPropertyInfos[i].dwPropertyID);
|
||||
ok(propinfoset->rgPropertyInfos[i].vtType != VT_EMPTY, "%d, got %d\n", i,
|
||||
ok(propinfoset->rgPropertyInfos[i].vtType != VT_EMPTY, "%lu, got %u\n", i,
|
||||
propinfoset->rgPropertyInfos[i].vtType);
|
||||
|
||||
propidlist.rgPropertyIDs[i] = propinfoset->rgPropertyInfos[i].dwPropertyID;
|
||||
|
@ -131,15 +131,15 @@ static void test_Properties(void)
|
|||
CoTaskMemFree(propinfoset);
|
||||
|
||||
hr = IDBProperties_GetProperties(props, 1, &propidlist, &propcnt, &propset);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(propidlist.cPropertyIDs == 14, "got %d\n", propidlist.cPropertyIDs);
|
||||
ok(propset->cProperties == 14, "got %d\n", propset->cProperties);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ok(propidlist.cPropertyIDs == 14, "got %lu\n", propidlist.cPropertyIDs);
|
||||
ok(propset->cProperties == 14, "got %lu\n", propset->cProperties);
|
||||
|
||||
for (i = 0; i < propidlist.cPropertyIDs; i++)
|
||||
{
|
||||
VARTYPE vartype = VT_EMPTY;
|
||||
|
||||
ok(properties[i] == propidlist.rgPropertyIDs[i], "%d, got %d\n", i, propidlist.rgPropertyIDs[i]);
|
||||
ok(properties[i] == propidlist.rgPropertyIDs[i], "%lu, got %lu\n", i, propidlist.rgPropertyIDs[i]);
|
||||
|
||||
if(properties[i] == DBPROP_INIT_PROMPT)
|
||||
{
|
||||
|
@ -157,7 +157,7 @@ static void test_Properties(void)
|
|||
vartype = VT_I4;
|
||||
}
|
||||
|
||||
ok(V_VT(&propset->rgProperties[i].vValue) == vartype, "%d wrong type %d\n", i, V_VT(&propset->rgProperties[i].vValue));
|
||||
ok(V_VT(&propset->rgProperties[i].vValue) == vartype, "%lu wrong type %d\n", i, V_VT(&propset->rgProperties[i].vValue));
|
||||
}
|
||||
|
||||
CoTaskMemFree(propidlist.rgPropertyIDs);
|
||||
|
@ -172,11 +172,11 @@ static void test_Properties(void)
|
|||
propcnt = 0;
|
||||
propset = NULL;
|
||||
hr = IDBProperties_GetProperties(props, 1, &propidlist, &propcnt, &propset);
|
||||
ok(hr == DB_E_ERRORSOCCURRED, "got 0x%08x\n", hr);
|
||||
ok(hr == DB_E_ERRORSOCCURRED, "got 0x%08lx\n", hr);
|
||||
ok(IsEqualGUID(&propset->guidPropertySet, &DBPROPSET_DATASOURCEINFO), "got %s\n", debugstr_guid(&propset->guidPropertySet));
|
||||
ok(propset->cProperties == 1, "got %d\n", propset->cProperties);
|
||||
ok(propset->rgProperties[0].dwPropertyID == DBPROP_MULTIPLERESULTS, "got %d\n", propset->rgProperties[0].dwPropertyID);
|
||||
ok(propset->rgProperties[0].dwStatus == DBPROPSTATUS_NOTSUPPORTED, "got %d\n", propset->rgProperties[0].dwStatus);
|
||||
ok(propset->cProperties == 1, "got %lu\n", propset->cProperties);
|
||||
ok(propset->rgProperties[0].dwPropertyID == DBPROP_MULTIPLERESULTS, "got %ld\n", propset->rgProperties[0].dwPropertyID);
|
||||
ok(propset->rgProperties[0].dwStatus == DBPROPSTATUS_NOTSUPPORTED, "got %ld\n", propset->rgProperties[0].dwStatus);
|
||||
|
||||
CoTaskMemFree(propset);
|
||||
|
||||
|
@ -197,43 +197,43 @@ static void test_command_interfaces(IUnknown *cmd)
|
|||
IUnknown *unk;
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_ICommandProperties, (void**)&commandProp);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ICommandProperties_Release(commandProp);
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_ICommandWithParameters, (void**)&cmdwithparams);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ICommandWithParameters_Release(cmdwithparams);
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_ICommandText, (void**)&command_text);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ICommandText_Release(command_text);
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_IConvertType, (void**)&convertype);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
IConvertType_Release(convertype);
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_ICommandPrepare, (void**)&commandprepare);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ICommandPrepare_Release(commandprepare);
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_IColumnsInfo, (void**)&colinfo);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
IColumnsInfo_Release(colinfo);
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_ICommandStream, (void**)&commandstream);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_IMultipleResults, (void**)&multiple);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_IRowsetChange, (void**)&unk);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_IRowsetUpdate, (void**)&unk);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_IRowsetLocate, (void**)&unk);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||
}
|
||||
|
||||
static void test_command_text(IUnknown *cmd)
|
||||
|
@ -244,43 +244,43 @@ static void test_command_text(IUnknown *cmd)
|
|||
GUID dialect;
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_ICommandText, (void**)&command_text);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = ICommandText_GetCommandText(command_text, &dialect, &str);
|
||||
ok(hr == DB_E_NOCOMMAND, "got 0x%08x\n", hr);
|
||||
ok(hr == DB_E_NOCOMMAND, "got 0x%08lx\n", hr);
|
||||
|
||||
if (0)
|
||||
{
|
||||
/* Crashes under windows */
|
||||
hr = ICommandText_SetCommandText(command_text, NULL, L"select * from testing");
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
}
|
||||
|
||||
hr = ICommandText_SetCommandText(command_text, &DBGUID_DEFAULT, NULL);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = ICommandText_GetCommandText(command_text, &dialect, &str);
|
||||
ok(hr == DB_E_NOCOMMAND, "got 0x%08x\n", hr);
|
||||
ok(hr == DB_E_NOCOMMAND, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = ICommandText_SetCommandText(command_text, &DBGUID_DEFAULT, L"select * from testing");
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
|
||||
hr = ICommandText_GetCommandText(command_text, NULL, &str);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ok (!lstrcmpW(L"select * from testing", str), "got %s\n", debugstr_w(str));
|
||||
HeapFree(GetProcessHeap(), 0, str);
|
||||
|
||||
/* dialect empty value */
|
||||
hr = ICommandText_GetCommandText(command_text, &dialect, &str);
|
||||
ok(hr == DB_S_DIALECTIGNORED, "got 0x%08x\n", hr);
|
||||
ok(hr == DB_S_DIALECTIGNORED, "got 0x%08lx\n", hr);
|
||||
ok(IsEqualGUID(&DBGUID_DEFAULT, &dialect), "got %s\n", debugstr_guid(&dialect));
|
||||
ok (!lstrcmpW(L"select * from testing", str), "got %s\n", debugstr_w(str));
|
||||
HeapFree(GetProcessHeap(), 0, str);
|
||||
|
||||
dialect = DBGUID_DEFAULT;
|
||||
hr = ICommandText_GetCommandText(command_text, &dialect, &str);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ok(IsEqualGUID(&DBGUID_DEFAULT, &dialect), "got %s\n", debugstr_guid(&dialect));
|
||||
ok (!lstrcmpW(L"select * from testing", str), "got %s\n", debugstr_w(str));
|
||||
HeapFree(GetProcessHeap(), 0, str);
|
||||
|
@ -295,10 +295,10 @@ static void test_command_dbsession(IUnknown *cmd, IUnknown *session)
|
|||
IUnknown *sess;
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_ICommandText, (void**)&command_text);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = ICommandText_GetDBSession(command_text, &IID_IUnknown, &sess);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ok(session == sess, "different session pointers\n");
|
||||
|
||||
ICommandText_Release(command_text);
|
||||
|
@ -315,40 +315,40 @@ static void test_rowset_interfaces(IRowset *rowset, ICommandText *commandtext)
|
|||
HRESULT hr;
|
||||
|
||||
hr = IRowset_QueryInterface(rowset, &IID_IRowsetInfo, (void**)&info);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IRowsetInfo_GetSpecification(info, &IID_ICommandText, NULL);
|
||||
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
|
||||
ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IRowsetInfo_GetSpecification(info, &IID_ICommandText, (IUnknown**)&specification);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
if (specification)
|
||||
{
|
||||
ok(commandtext == specification, "got 0x%08x\n", hr);
|
||||
ok(commandtext == specification, "got 0x%08lx\n", hr);
|
||||
ICommandText_Release(specification);
|
||||
}
|
||||
IRowsetInfo_Release(info);
|
||||
|
||||
hr = IRowset_QueryInterface(rowset, &IID_IColumnsInfo, (void**)&col_info);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
IColumnsInfo_Release(col_info);
|
||||
|
||||
hr = IRowset_QueryInterface(rowset, &IID_IAccessor, (void**)&accessor);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
IAccessor_Release(accessor);
|
||||
|
||||
hr = IRowset_QueryInterface(rowset, &IID_IColumnsRowset, (void**)&col_rs);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
IColumnsRowset_Release(col_rs);
|
||||
|
||||
hr = IRowset_QueryInterface(rowset, &IID_IRowsetChange, (void**)&unk);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IRowset_QueryInterface(rowset, &IID_IRowsetUpdate, (void**)&unk);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IRowset_QueryInterface(rowset, &IID_IRowsetLocate, (void**)&unk);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||
}
|
||||
|
||||
static void test_command_rowset(IUnknown *cmd)
|
||||
|
@ -361,45 +361,45 @@ static void test_command_rowset(IUnknown *cmd)
|
|||
DBROWCOUNT affected;
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_ICommandText, (void**)&command_text);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IUnknown_QueryInterface(cmd, &IID_ICommandPrepare, (void**)&commandprepare);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = ICommandText_SetCommandText(command_text, &DBGUID_DEFAULT, NULL);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = ICommandPrepare_Prepare(commandprepare, 1);
|
||||
ok(hr == DB_E_NOCOMMAND, "got 0x%08x\n", hr);
|
||||
ok(hr == DB_E_NOCOMMAND, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = ICommandText_SetCommandText(command_text, &DBGUID_DEFAULT, L"CREATE TABLE testing (col1 INT, col2 SHORT)");
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = ICommandPrepare_Prepare(commandprepare, 1);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ICommandPrepare_Release(commandprepare);
|
||||
|
||||
affected = 9999;
|
||||
hr = ICommandText_Execute(command_text, NULL, &IID_IRowset, NULL, &affected, &unk);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
todo_wine ok(unk == NULL, "Unexpected value\n");
|
||||
todo_wine ok(affected == -1, "got %ld\n", affected);
|
||||
todo_wine ok(affected == -1, "got %Id\n", affected);
|
||||
if (unk)
|
||||
IUnknown_Release(unk);
|
||||
|
||||
hr = ICommandText_SetCommandText(command_text, &DBGUID_DEFAULT, L"select * from testing");
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
affected = 9999;
|
||||
hr = ICommandText_Execute(command_text, NULL, &IID_IRowset, NULL, &affected, &unk);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ok(unk != NULL, "Unexpected value\n");
|
||||
if (hr == S_OK)
|
||||
{
|
||||
ok(affected == -1, "wrong affected value\n");
|
||||
|
||||
hr = IUnknown_QueryInterface(unk, &IID_IRowset, (void**)&rowset);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
test_rowset_interfaces(rowset, command_text);
|
||||
|
||||
|
@ -441,11 +441,11 @@ static void test_sessions(void)
|
|||
|
||||
hr = CoCreateInstance( &CLSID_MSDAINITIALIZE, NULL, CLSCTX_INPROC_SERVER, &IID_IDataInitialize,
|
||||
(void **)&datainit );
|
||||
ok(hr == S_OK, "Failed to create object 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "Failed to create object 0x%08lx\n", hr);
|
||||
hr = IDataInitialize_GetDataSource( datainit, NULL, CLSCTX_INPROC_SERVER, connect_str, &IID_IDBInitialize,
|
||||
(IUnknown **)&dbinit );
|
||||
SysFreeString(connect_str);
|
||||
todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
IDataInitialize_Release( datainit );
|
||||
|
@ -453,11 +453,11 @@ static void test_sessions(void)
|
|||
}
|
||||
|
||||
hr = IDBInitialize_QueryInterface( dbinit, &IID_IDBProperties, (void **)&props );
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
IDBProperties_Release(props);
|
||||
|
||||
hr = IDBInitialize_Initialize( dbinit );
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
IDBInitialize_Release( dbinit );
|
||||
|
@ -466,54 +466,54 @@ static void test_sessions(void)
|
|||
}
|
||||
|
||||
hr = IDBInitialize_QueryInterface( dbinit, &IID_IDBCreateSession, (void **)&dbsession );
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IDBCreateSession_CreateSession( dbsession, NULL, &IID_IUnknown, &session );
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IUnknown_QueryInterface(session, &IID_IGetDataSource, (void**)&datasource);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IGetDataSource_GetDataSource(datasource, &IID_IDBProperties, (IUnknown**)&dsource);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ok(dsource == props, "different pointers\n");
|
||||
IDBProperties_Release(dsource);
|
||||
IGetDataSource_Release(datasource);
|
||||
|
||||
hr = IUnknown_QueryInterface(session, &IID_ITransaction, (void**)&transaction);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ITransaction_Release(transaction);
|
||||
|
||||
hr = IUnknown_QueryInterface(session, &IID_ITransactionLocal, (void**)&local);
|
||||
todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
if(hr == S_OK)
|
||||
ITransactionLocal_Release(local);
|
||||
|
||||
hr = IUnknown_QueryInterface(session, &IID_ITransactionObject, (void**)&object);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IUnknown_QueryInterface(session, &IID_ITransactionJoin, (void**)&join);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ITransactionJoin_Release(join);
|
||||
|
||||
hr = IUnknown_QueryInterface(session, &IID_IBindResource, (void**)&unimplemented);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IUnknown_QueryInterface(session, &IID_ICreateRow, (void**)&unimplemented);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IUnknown_QueryInterface(session, &IID_ISessionProperties, (void**)&session_props);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ISessionProperties_Release(session_props);
|
||||
|
||||
hr = IUnknown_QueryInterface(session, &IID_IOpenRowset, (void**)&openrowset);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IOpenRowset_QueryInterface(openrowset, &IID_IDBCreateCommand, (void**)&create_command);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = IDBCreateCommand_CreateCommand(create_command, NULL, &IID_IUnknown, (IUnknown **)&cmd);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
test_command_interfaces(cmd);
|
||||
|
@ -566,7 +566,7 @@ static void setup_database(void)
|
|||
if (!db_created)
|
||||
{
|
||||
SQLInstallerError(1, &code, buffer, sizeof(buffer), &size);
|
||||
trace("code %d, buffer %s, size %d\n", code, debugstr_a(buffer), size);
|
||||
trace("code %ld, buffer %s, size %d\n", code, debugstr_a(buffer), size);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, driver);
|
||||
|
||||
|
@ -595,7 +595,7 @@ static void cleanup_database(void)
|
|||
WORD size;
|
||||
|
||||
SQLInstallerError(1, &code, buffer, sizeof(buffer), &size);
|
||||
trace("code %d, buffer %s, size %d\n", code, debugstr_a(buffer), size);
|
||||
trace("code %ld, buffer %s, size %d\n", code, debugstr_a(buffer), size);
|
||||
}
|
||||
|
||||
DeleteFileA(mdbpath);
|
||||
|
@ -630,15 +630,15 @@ static void test_enumeration(void)
|
|||
}
|
||||
|
||||
hr = ISourcesRowset_GetSourcesRowset(source, NULL, &IID_IRowset, 0, NULL, (IUnknown**)&rowset);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
hr = ISourcesRowset_GetSourcesRowset(source, NULL, &IID_IRowset, 0, NULL, (IUnknown**)&rowset2);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ok(rowset != rowset2, "same pointer\n");
|
||||
IRowset_Release(rowset2);
|
||||
|
||||
hr = IRowset_QueryInterface(rowset, &IID_IColumnsInfo, (void**)&columninfo);
|
||||
todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
todo_wine ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
DBORDINAL columns;
|
||||
|
@ -647,8 +647,8 @@ static void test_enumeration(void)
|
|||
int i;
|
||||
|
||||
hr = IColumnsInfo_GetColumnInfo(columninfo, &columns, &dbcolumninfo, &buffer);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(columns == 6, "got %lu\n", columns);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ok(columns == 6, "got %Iu\n", columns);
|
||||
|
||||
for( i = 0; i < columns; i++ )
|
||||
{
|
||||
|
@ -659,9 +659,9 @@ static void test_enumeration(void)
|
|||
debugstr_w(dbcolumninfo[i].pwszName), debugstr_w(colinfo_data[i].pwszName));
|
||||
|
||||
ok (dbcolumninfo[i].pTypeInfo == colinfo_data[i].pTypeInfo, "got %p/%p", dbcolumninfo[i].pTypeInfo, colinfo_data[i].pTypeInfo);
|
||||
ok (dbcolumninfo[i].iOrdinal == colinfo_data[i].iOrdinal, "got %ld/%ld", dbcolumninfo[i].iOrdinal, colinfo_data[i].iOrdinal);
|
||||
ok (dbcolumninfo[i].dwFlags == colinfo_data[i].dwFlags, "got 0x%08x/0x%0x8", dbcolumninfo[i].dwFlags, colinfo_data[i].dwFlags);
|
||||
ok (dbcolumninfo[i].ulColumnSize == colinfo_data[i].ulColumnSize, "got %lu/%lu", dbcolumninfo[i].ulColumnSize, colinfo_data[i].ulColumnSize);
|
||||
ok (dbcolumninfo[i].iOrdinal == colinfo_data[i].iOrdinal, "got %Id/%Id", dbcolumninfo[i].iOrdinal, colinfo_data[i].iOrdinal);
|
||||
ok (dbcolumninfo[i].dwFlags == colinfo_data[i].dwFlags, "got 0x%08lx/0x%08lx", dbcolumninfo[i].dwFlags, colinfo_data[i].dwFlags);
|
||||
ok (dbcolumninfo[i].ulColumnSize == colinfo_data[i].ulColumnSize, "got %Iu/%Iu", dbcolumninfo[i].ulColumnSize, colinfo_data[i].ulColumnSize);
|
||||
ok (dbcolumninfo[i].wType == colinfo_data[i].wType, "got %d/%d", dbcolumninfo[i].wType, colinfo_data[i].wType);
|
||||
ok (dbcolumninfo[i].bPrecision == colinfo_data[i].bPrecision, "got %d/%d", dbcolumninfo[i].bPrecision, colinfo_data[i].bPrecision);
|
||||
ok (dbcolumninfo[i].bScale == colinfo_data[i].bScale, "got %d/%d", dbcolumninfo[i].bScale, colinfo_data[i].bScale);
|
||||
|
@ -672,15 +672,15 @@ static void test_enumeration(void)
|
|||
}
|
||||
|
||||
hr = IRowset_QueryInterface(rowset, &IID_IAccessor, (void**)&accessor);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
/* Request only SOURCES_NAME column */
|
||||
hr = IAccessor_CreateAccessor(accessor, DBACCESSOR_ROWDATA, 1, &bindings, 0, &hacc, NULL);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
ok(hacc != 0, "got %Ix\n", hacc);
|
||||
|
||||
hr = IAccessor_ReleaseAccessor(accessor, hacc, NULL);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "got 0x%08lx\n", hr);
|
||||
|
||||
IAccessor_Release(accessor);
|
||||
|
||||
|
|
Loading…
Reference in New Issue