Commit 9c44ef5b authored by Vijay Kiran Kamuju's avatar Vijay Kiran Kamuju Committed by Alexandre Julliard

qwave: Add stub for QOSCreateHandle and tests.

parent fb1695a2
......@@ -20569,6 +20569,7 @@ wine_fn_config_makefile dlls/quartz enable_quartz
wine_fn_config_makefile dlls/quartz/tests enable_tests
wine_fn_config_makefile dlls/query enable_query
wine_fn_config_makefile dlls/qwave enable_qwave
wine_fn_config_makefile dlls/qwave/tests enable_tests
wine_fn_config_makefile dlls/rasapi16.dll16 enable_win16
wine_fn_config_makefile dlls/rasapi32 enable_rasapi32
wine_fn_config_makefile dlls/rasapi32/tests enable_tests
......
......@@ -3603,6 +3603,7 @@ WINE_CONFIG_MAKEFILE(dlls/quartz)
WINE_CONFIG_MAKEFILE(dlls/quartz/tests)
WINE_CONFIG_MAKEFILE(dlls/query)
WINE_CONFIG_MAKEFILE(dlls/qwave)
WINE_CONFIG_MAKEFILE(dlls/qwave/tests)
WINE_CONFIG_MAKEFILE(dlls/rasapi16.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/rasapi32)
WINE_CONFIG_MAKEFILE(dlls/rasapi32/tests)
......
MODULE = qwave.dll
IMPORTLIB = qwave
C_SRCS = \
main.c
/*
* Copyright 2018 Louis Lenders
* Copyright 2019 Vijay Kiran Kamuju
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -21,6 +22,7 @@
#include "windef.h"
#include "winbase.h"
#include "qos2.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(qwave);
......@@ -39,3 +41,13 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD reason, LPVOID lpv)
}
return TRUE;
}
BOOL WINAPI QOSCreateHandle(PQOS_VERSION version, PHANDLE handle)
{
FIXME("%p %p stub!\n", version, handle);
if (!version || !((version->MajorVersion == 1) && (version->MinorVersion == 0)) || !handle)
SetLastError(ERROR_INVALID_PARAMETER);
else
SetLastError(ERROR_SERVICE_ALREADY_RUNNING);
return FALSE;
}
......@@ -3,7 +3,7 @@
@ stub QOSAddSocketToFlow
@ stub QOSCancel
@ stub QOSCloseHandle
@ stub QOSCreateHandle
@ stdcall QOSCreateHandle(ptr ptr)
@ stub QOSEnumerateFlows
@ stub QOSNotifyFlow
@ stub QOSQueryFlow
......
TESTDLL = qwave.dll
IMPORTS = qwave
C_SRCS = \
qos.c
/*
* Copyright 2019 Vijay Kiran Kamuju
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <windows.h>
#include "qos2.h"
#include "wine/test.h"
static void test_QOSCreateHandle(void)
{
QOS_VERSION ver;
HANDLE h;
BOOL ret;
SetLastError(0xdeadbeef);
ret = QOSCreateHandle(NULL, NULL);
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = QOSCreateHandle(&ver, NULL);
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ver.MajorVersion = 0;
ver.MinorVersion = 0;
ret = QOSCreateHandle(&ver, &h);
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ver.MajorVersion = 1;
ver.MinorVersion = 0;
ret = QOSCreateHandle(&ver, &h);
todo_wine ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
todo_wine ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ver.MajorVersion = 1;
ver.MinorVersion = 5;
ret = QOSCreateHandle(&ver, &h);
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ver.MajorVersion = 2;
ver.MinorVersion = 0;
ret = QOSCreateHandle(&ver, &h);
ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
}
START_TEST(qos)
{
test_QOSCreateHandle();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment