sapi/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
18fe398290
commit
0b3c158cb8
|
@ -1,4 +1,3 @@
|
|||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
||||
TESTDLL = sapi.dll
|
||||
IMPORTS = ole32 user32 advapi32
|
||||
|
||||
|
|
|
@ -36,26 +36,26 @@ static void test_interfaces(void)
|
|||
|
||||
hr = CoCreateInstance(&CLSID_SpFileStream, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpeechFileStream, (void **)&filestream);
|
||||
ok(hr == S_OK, "Failed to create ISpeechFileStream interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create ISpeechFileStream interface: %#lx.\n", hr);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpFileStream, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IUnknown, (void **)&unk);
|
||||
ok(hr == S_OK, "Failed to create IUnknown interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create IUnknown interface: %#lx.\n", hr);
|
||||
IUnknown_Release(unk);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpFileStream, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IDispatch, (void **)&dispatch);
|
||||
ok(hr == S_OK, "Failed to create IDispatch interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create IDispatch interface: %#lx.\n", hr);
|
||||
IDispatch_Release(dispatch);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpFileStream, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpeechBaseStream, (void **)&basestream);
|
||||
ok(hr == S_OK, "Failed to create ISpeechBaseStream interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create ISpeechBaseStream interface: %#lx.\n", hr);
|
||||
ISpeechBaseStream_Release(basestream);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpFileStream, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpStream, (void **)&spstrem);
|
||||
ok(hr == S_OK, "Failed to create ISpStream interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create ISpStream interface: %#lx.\n", hr);
|
||||
|
||||
ISpStream_Release(spstrem);
|
||||
ISpeechFileStream_Release(filestream);
|
||||
|
|
|
@ -34,26 +34,26 @@ static void test_interfaces(void)
|
|||
|
||||
hr = CoCreateInstance(&CLSID_SpResourceManager, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpResourceManager, (void **)&resource_manager);
|
||||
ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#lx.\n", hr);
|
||||
ok(!!resource_manager, "Expected non-NULL resource manager.\n");
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpResourceManager, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpResourceManager, (void **)&resource_manager2);
|
||||
ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#lx.\n", hr);
|
||||
ok(!!resource_manager2, "Expected non-NULL resource manager.\n");
|
||||
todo_wine ok(resource_manager2 == resource_manager, "Expected managers to match.\n");
|
||||
ISpResourceManager_Release(resource_manager2);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpResourceManager, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IUnknown, (void **)&unk);
|
||||
ok(hr == S_OK, "Failed to create IUnknown interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create IUnknown interface: %#lx.\n", hr);
|
||||
ok(!!unk, "Expected non-NULL unk.\n");
|
||||
todo_wine ok(unk == (IUnknown *)resource_manager, "Expected unk to match existing manager.\n");
|
||||
IUnknown_Release(unk);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpResourceManager, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IDispatch, (void **)&dispatch);
|
||||
ok(hr == E_NOINTERFACE, "Succeeded to create IDispatch interface: %#x.\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "Succeeded to create IDispatch interface: %#lx.\n", hr);
|
||||
ok(!dispatch, "Expected NULL dispatch, got %p.", dispatch);
|
||||
|
||||
ISpResourceManager_Release(resource_manager);
|
||||
|
|
|
@ -31,7 +31,7 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line)
|
|||
ULONG rc;
|
||||
IUnknown_AddRef(obj);
|
||||
rc = IUnknown_Release(obj);
|
||||
ok_(__FILE__,line)(rc == ref, "Unexpected refcount %d, expected %d.\n", rc, ref);
|
||||
ok_(__FILE__,line)(rc == ref, "Unexpected refcount %ld, expected %ld.\n", rc, ref);
|
||||
}
|
||||
|
||||
static void test_interfaces(void)
|
||||
|
@ -43,19 +43,19 @@ static void test_interfaces(void)
|
|||
|
||||
hr = CoCreateInstance(&CLSID_SpStream, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpStream, (void **)&speech_stream);
|
||||
ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#lx.\n", hr);
|
||||
EXPECT_REF(speech_stream, 1);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpStream, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IUnknown, (void **)&unk);
|
||||
ok(hr == S_OK, "Failed to create IUnknown interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create IUnknown interface: %#lx.\n", hr);
|
||||
EXPECT_REF(unk, 1);
|
||||
EXPECT_REF(speech_stream, 1);
|
||||
IUnknown_Release(unk);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpStream, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IDispatch, (void **)&dispatch);
|
||||
ok(hr == E_NOINTERFACE, "Succeeded to create IDispatch interface: %#x.\n", hr);
|
||||
ok(hr == E_NOINTERFACE, "Succeeded to create IDispatch interface: %#lx.\n", hr);
|
||||
ok(!dispatch, "Expected NULL dispatch, got %p.", dispatch);
|
||||
|
||||
ISpStream_Release(speech_stream);
|
||||
|
|
|
@ -35,16 +35,16 @@ static void test_data_key(void)
|
|||
|
||||
hr = CoCreateInstance( &CLSID_SpDataKey, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpRegDataKey, (void **)&data_key );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
res = RegCreateKeyExA( HKEY_CURRENT_USER, "Software\\Winetest\\sapi", 0, NULL, 0, KEY_ALL_ACCESS,
|
||||
NULL, &key, NULL );
|
||||
ok( res == ERROR_SUCCESS, "got %d\n", res );
|
||||
ok( res == ERROR_SUCCESS, "got %ld\n", res );
|
||||
|
||||
hr = ISpRegDataKey_SetKey( data_key, key, FALSE );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
hr = ISpRegDataKey_SetKey( data_key, key, FALSE );
|
||||
ok( hr == SPERR_ALREADY_INITIALIZED, "got %08x\n", hr );
|
||||
ok( hr == SPERR_ALREADY_INITIALIZED, "got %08lx\n", hr );
|
||||
|
||||
ISpRegDataKey_Release( data_key );
|
||||
}
|
||||
|
@ -58,25 +58,25 @@ static void test_token_category(void)
|
|||
|
||||
hr = CoCreateInstance( &CLSID_SpObjectTokenCategory, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpObjectTokenCategory, (void **)&cat );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectTokenCategory_EnumTokens( cat, NULL, NULL, &enum_tokens );
|
||||
ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
|
||||
ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectTokenCategory_SetId( cat, L"bogus", FALSE );
|
||||
ok( hr == SPERR_INVALID_REGISTRY_KEY, "got %08x\n", hr );
|
||||
ok( hr == SPERR_INVALID_REGISTRY_KEY, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectTokenCategory_SetId( cat, SPCAT_VOICES, FALSE );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectTokenCategory_SetId( cat, SPCAT_VOICES, FALSE );
|
||||
ok( hr == SPERR_ALREADY_INITIALIZED, "got %08x\n", hr );
|
||||
ok( hr == SPERR_ALREADY_INITIALIZED, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectTokenCategory_EnumTokens( cat, NULL, NULL, &enum_tokens );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
hr = IEnumSpObjectTokens_GetCount( enum_tokens, &count );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
IEnumSpObjectTokens_Release( enum_tokens );
|
||||
ISpObjectTokenCategory_Release( cat );
|
||||
|
@ -91,26 +91,26 @@ static void test_token_enum(void)
|
|||
|
||||
hr = CoCreateInstance( &CLSID_SpObjectTokenEnum, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpObjectTokenEnumBuilder, (void **)&token_enum );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectTokenEnumBuilder_GetCount( token_enum, &count );
|
||||
ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
|
||||
ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectTokenEnumBuilder_Next( token_enum, 1, &token, &count );
|
||||
ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
|
||||
ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectTokenEnumBuilder_SetAttribs( token_enum, NULL, NULL );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
count = 0xdeadbeef;
|
||||
hr = ISpObjectTokenEnumBuilder_GetCount( token_enum, &count );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( count == 0, "got %u\n", count );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
ok( count == 0, "got %lu\n", count );
|
||||
|
||||
count = 0xdeadbeef;
|
||||
hr = ISpObjectTokenEnumBuilder_Next( token_enum, 1, &token, &count );
|
||||
ok( hr == S_FALSE, "got %08x\n", hr );
|
||||
ok( count == 0, "got %u\n", count );
|
||||
ok( hr == S_FALSE, "got %08lx\n", hr );
|
||||
ok( count == 0, "got %lu\n", count );
|
||||
|
||||
ISpObjectTokenEnumBuilder_Release( token_enum );
|
||||
}
|
||||
|
@ -126,21 +126,21 @@ static void test_default_token_id(void)
|
|||
|
||||
hr = CoCreateInstance( &CLSID_SpObjectTokenCategory, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpObjectTokenCategory, (void **)&cat );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
token_id = (LPWSTR)0xdeadbeef;
|
||||
hr = ISpObjectTokenCategory_GetDefaultTokenId( cat, &token_id );
|
||||
ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
|
||||
ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
|
||||
ok( token_id == (LPWSTR)0xdeadbeef, "got %p\n", token_id );
|
||||
|
||||
hr = ISpObjectTokenCategory_GetDefaultTokenId( cat, NULL );
|
||||
ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
|
||||
ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectTokenCategory_SetId( cat, SPCAT_AUDIOOUT, FALSE );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectTokenCategory_GetDefaultTokenId( cat, NULL );
|
||||
ok( hr == E_POINTER, "got %08x\n", hr );
|
||||
ok( hr == E_POINTER, "got %08lx\n", hr );
|
||||
|
||||
token_id = (LPWSTR)0xdeadbeef;
|
||||
hr = ISpObjectTokenCategory_GetDefaultTokenId( cat, &token_id );
|
||||
|
@ -152,7 +152,7 @@ static void test_default_token_id(void)
|
|||
return;
|
||||
}
|
||||
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
ok( token_id != (LPWSTR)0xdeadbeef && token_id != NULL, "got %p\n", token_id );
|
||||
|
||||
regvalue_size = sizeof( regvalue );
|
||||
|
@ -163,7 +163,7 @@ static void test_default_token_id(void)
|
|||
skip( "DefaultDefaultTokenId not found for AudioOutput category (%s)\n",
|
||||
wine_dbgstr_w(token_id) );
|
||||
} else {
|
||||
ok( res == ERROR_SUCCESS, "got %08x\n", res );
|
||||
ok( res == ERROR_SUCCESS, "got %08lx\n", res );
|
||||
ok( !wcscmp(regvalue, token_id),
|
||||
"GetDefaultTokenId (%s) should be equal to the DefaultDefaultTokenId key (%s)\n",
|
||||
wine_dbgstr_w(token_id), wine_dbgstr_w(regvalue) );
|
||||
|
@ -182,52 +182,52 @@ static void test_object_token(void)
|
|||
|
||||
hr = CoCreateInstance( &CLSID_SpObjectToken, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpObjectToken, (void **)&token );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectToken_GetId( token, NULL );
|
||||
todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
|
||||
todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
|
||||
|
||||
tempW = (LPWSTR)0xdeadbeef;
|
||||
hr = ISpObjectToken_GetId( token, &tempW );
|
||||
todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
|
||||
todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
|
||||
ok( tempW == (LPWSTR)0xdeadbeef, "got %s\n", wine_dbgstr_w(tempW) );
|
||||
|
||||
hr = ISpObjectToken_GetCategory( token, NULL );
|
||||
todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
|
||||
todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
|
||||
|
||||
cat = (LPVOID)0xdeadbeef;
|
||||
hr = ISpObjectToken_GetCategory( token, &cat );
|
||||
todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
|
||||
todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
|
||||
ok( cat == (LPVOID)0xdeadbeef, "got %p\n", cat );
|
||||
|
||||
hr = ISpObjectToken_SetId( token, NULL, NULL, FALSE );
|
||||
ok( hr == E_POINTER, "got %08x\n", hr );
|
||||
ok( hr == E_POINTER, "got %08lx\n", hr );
|
||||
hr = ISpObjectToken_SetId( token, L"bogus", NULL, FALSE );
|
||||
ok( hr == E_POINTER, "got %08x\n", hr );
|
||||
ok( hr == E_POINTER, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectToken_SetId( token, NULL, L"bogus", FALSE );
|
||||
ok( hr == SPERR_NOT_FOUND, "got %08x\n", hr );
|
||||
ok( hr == SPERR_NOT_FOUND, "got %08lx\n", hr );
|
||||
hr = ISpObjectToken_SetId( token, NULL, L"HKEY_LOCAL_MACHINE\\SOFTWARE\\winetest bogus", FALSE );
|
||||
ok( hr == SPERR_NOT_FOUND, "got %08x\n", hr );
|
||||
ok( hr == SPERR_NOT_FOUND, "got %08lx\n", hr );
|
||||
|
||||
/* SetId succeeds even if the key is invalid, but exists */
|
||||
hr = ISpObjectToken_SetId( token, NULL, L"HKEY_LOCAL_MACHINE\\SOFTWARE", FALSE );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectToken_SetId( token, NULL, NULL, FALSE );
|
||||
ok( hr == SPERR_ALREADY_INITIALIZED, "got %08x\n", hr );
|
||||
ok( hr == SPERR_ALREADY_INITIALIZED, "got %08lx\n", hr );
|
||||
hr = ISpObjectToken_SetId( token, NULL, L"bogus", FALSE );
|
||||
ok( hr == SPERR_ALREADY_INITIALIZED, "got %08x\n", hr );
|
||||
ok( hr == SPERR_ALREADY_INITIALIZED, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectToken_GetId( token, NULL );
|
||||
todo_wine ok( hr == E_POINTER, "got %08x\n", hr );
|
||||
todo_wine ok( hr == E_POINTER, "got %08lx\n", hr );
|
||||
|
||||
hr = ISpObjectToken_GetCategory( token, NULL );
|
||||
todo_wine ok( hr == E_POINTER, "got %08x\n", hr );
|
||||
todo_wine ok( hr == E_POINTER, "got %08lx\n", hr );
|
||||
|
||||
tempW = NULL;
|
||||
hr = ISpObjectToken_GetId( token, &tempW );
|
||||
todo_wine ok( hr == S_OK, "got %08x\n", hr );
|
||||
todo_wine ok( hr == S_OK, "got %08lx\n", hr );
|
||||
todo_wine ok( tempW != NULL, "got %p\n", tempW );
|
||||
if (tempW) {
|
||||
ok( !wcscmp(tempW, L"HKEY_LOCAL_MACHINE\\SOFTWARE"), "got %s\n",
|
||||
|
@ -237,22 +237,22 @@ static void test_object_token(void)
|
|||
|
||||
cat = (LPVOID)0xdeadbeef;
|
||||
hr = ISpObjectToken_GetCategory( token, &cat );
|
||||
todo_wine ok( hr == SPERR_INVALID_REGISTRY_KEY, "got %08x\n", hr );
|
||||
todo_wine ok( hr == SPERR_INVALID_REGISTRY_KEY, "got %08lx\n", hr );
|
||||
ok( cat == (LPVOID)0xdeadbeef, "got %p\n", cat );
|
||||
|
||||
/* get the default token id for SPCAT_AUDIOOUT */
|
||||
hr = CoCreateInstance( &CLSID_SpObjectTokenCategory, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpObjectTokenCategory, (void **)&cat );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
hr = ISpObjectTokenCategory_SetId( cat, SPCAT_AUDIOOUT, FALSE );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
token_id = (LPWSTR)0xdeadbeef;
|
||||
hr = ISpObjectTokenCategory_GetDefaultTokenId( cat, &token_id );
|
||||
if (hr == SPERR_NOT_FOUND) {
|
||||
skip( "AudioOutput category not found for GetDefaultTokenId\n" );
|
||||
return;
|
||||
}
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
ok( token_id != (LPWSTR)0xdeadbeef && token_id != NULL, "got %p\n", token_id );
|
||||
ISpObjectTokenCategory_Release( cat );
|
||||
|
||||
|
@ -260,15 +260,15 @@ static void test_object_token(void)
|
|||
ISpObjectToken_Release( token );
|
||||
hr = CoCreateInstance( &CLSID_SpObjectToken, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpObjectToken, (void **)&token );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
/* NULL appears to auto-detect the category */
|
||||
hr = ISpObjectToken_SetId( token, NULL, token_id, FALSE );
|
||||
ok( hr == S_OK, "got %08x\n", hr );
|
||||
ok( hr == S_OK, "got %08lx\n", hr );
|
||||
|
||||
tempW = NULL;
|
||||
hr = ISpObjectToken_GetId( token, &tempW );
|
||||
todo_wine ok( hr == S_OK, "got %08x\n", hr );
|
||||
todo_wine ok( hr == S_OK, "got %08lx\n", hr );
|
||||
todo_wine ok( tempW != NULL, "got %p\n", tempW );
|
||||
if (tempW) {
|
||||
ok( !wcsncmp(tempW, token_id, wcslen(token_id)),
|
||||
|
@ -278,12 +278,12 @@ static void test_object_token(void)
|
|||
|
||||
cat = (LPVOID)0xdeadbeef;
|
||||
hr = ISpObjectToken_GetCategory( token, &cat );
|
||||
todo_wine ok( hr == S_OK, "got %08x\n", hr );
|
||||
todo_wine ok( hr == S_OK, "got %08lx\n", hr );
|
||||
todo_wine ok( cat != (LPVOID)0xdeadbeef, "got %p\n", cat );
|
||||
if (cat != (LPVOID)0xdeadbeef) {
|
||||
tempW = NULL;
|
||||
hr = ISpObjectTokenCategory_GetId( cat, &tempW );
|
||||
todo_wine ok( hr == S_OK, "got %08x\n", hr );
|
||||
todo_wine ok( hr == S_OK, "got %08lx\n", hr );
|
||||
todo_wine ok( tempW != NULL, "got %p\n", tempW );
|
||||
if (tempW) {
|
||||
ok( !wcscmp(tempW, SPCAT_AUDIOOUT), "got %s\n", wine_dbgstr_w(tempW) );
|
||||
|
|
|
@ -31,7 +31,7 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line)
|
|||
ULONG rc;
|
||||
IUnknown_AddRef(obj);
|
||||
rc = IUnknown_Release(obj);
|
||||
ok_(__FILE__,line)(rc == ref, "Unexpected refcount %d, expected %d.\n", rc, ref);
|
||||
ok_(__FILE__,line)(rc == ref, "Unexpected refcount %ld, expected %ld.\n", rc, ref);
|
||||
}
|
||||
|
||||
static void test_interfaces(void)
|
||||
|
@ -45,38 +45,38 @@ static void test_interfaces(void)
|
|||
|
||||
hr = CoCreateInstance(&CLSID_SpVoice, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpeechVoice, (void **)&speech_voice);
|
||||
ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#lx.\n", hr);
|
||||
EXPECT_REF(speech_voice, 1);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpVoice, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IDispatch, (void **)&dispatch);
|
||||
ok(hr == S_OK, "Failed to create IDispatch interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create IDispatch interface: %#lx.\n", hr);
|
||||
EXPECT_REF(dispatch, 1);
|
||||
EXPECT_REF(speech_voice, 1);
|
||||
IDispatch_Release(dispatch);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpVoice, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_IUnknown, (void **)&unk);
|
||||
ok(hr == S_OK, "Failed to create IUnknown interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create IUnknown interface: %#lx.\n", hr);
|
||||
EXPECT_REF(unk, 1);
|
||||
EXPECT_REF(speech_voice, 1);
|
||||
IUnknown_Release(unk);
|
||||
|
||||
hr = CoCreateInstance(&CLSID_SpVoice, NULL, CLSCTX_INPROC_SERVER,
|
||||
&IID_ISpVoice, (void **)&spvoice);
|
||||
ok(hr == S_OK, "Failed to create ISpVoice interface: %#x.\n", hr);
|
||||
ok(hr == S_OK, "Failed to create ISpVoice interface: %#lx.\n", hr);
|
||||
EXPECT_REF(spvoice, 1);
|
||||
EXPECT_REF(speech_voice, 1);
|
||||
|
||||
hr = ISpVoice_QueryInterface(spvoice, &IID_ISpeechVoice, (void **)&speech_voice2);
|
||||
ok(hr == S_OK, "ISpVoice_QueryInterface failed: %#x.\n", hr);
|
||||
ok(hr == S_OK, "ISpVoice_QueryInterface failed: %#lx.\n", hr);
|
||||
EXPECT_REF(speech_voice2, 2);
|
||||
EXPECT_REF(spvoice, 2);
|
||||
EXPECT_REF(speech_voice, 1);
|
||||
ISpeechVoice_Release(speech_voice2);
|
||||
|
||||
hr = ISpeechVoice_QueryInterface(speech_voice, &IID_ISpVoice, (void **)&spvoice2);
|
||||
ok(hr == S_OK, "ISpeechVoice_QueryInterface failed: %#x.\n", hr);
|
||||
ok(hr == S_OK, "ISpeechVoice_QueryInterface failed: %#lx.\n", hr);
|
||||
EXPECT_REF(speech_voice, 2);
|
||||
EXPECT_REF(spvoice2, 2);
|
||||
EXPECT_REF(spvoice, 1);
|
||||
|
@ -85,7 +85,7 @@ static void test_interfaces(void)
|
|||
|
||||
hr = ISpeechVoice_QueryInterface(speech_voice, &IID_IConnectionPointContainer,
|
||||
(void **)&container);
|
||||
ok(hr == S_OK, "ISpeechVoice_QueryInterface failed: %#x.\n", hr);
|
||||
ok(hr == S_OK, "ISpeechVoice_QueryInterface failed: %#lx.\n", hr);
|
||||
EXPECT_REF(speech_voice, 2);
|
||||
EXPECT_REF(container, 2);
|
||||
IConnectionPointContainer_Release(container);
|
||||
|
|
Loading…
Reference in New Issue