36 static const WCHAR wszServiceClass[] =
L"class";
37 static const WCHAR wszServiceHost[] =
L"host";
38 static const WCHAR wszInstanceName[] =
L"instance";
39 static const WCHAR wszReferrer[] =
L"referrer";
40 static const WCHAR wszSpn1[] =
L"class/host";
41 static const WCHAR wszSpn2[] =
L"class/instance/host";
42 static const WCHAR wszSpn3[] =
L"class/instance:555/host";
43 static const WCHAR wszSpn4[] =
L"class/instance:555/host";
44 static const WCHAR wszSpn5[] =
L"class/host:555";
60 ok(spn_length ==
lstrlenW(wszSpn1) + 1,
"DsMakeSpnW should have returned spn_length of %d instead of %ld\n",
lstrlenW(wszSpn1) + 1, spn_length);
63 ret =
DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 0,
NULL, &spn_length, spn);
66 ok(spn_length ==
lstrlenW(wszSpn2) + 1,
"DsMakeSpnW should have returned spn_length of %d instead of %ld\n",
lstrlenW(wszSpn2) + 1, spn_length);
69 ret =
DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555,
NULL, &spn_length, spn);
72 ok(spn_length ==
lstrlenW(wszSpn3) + 1,
"DsMakeSpnW should have returned spn_length of %d instead of %ld\n",
lstrlenW(wszSpn3) + 1, spn_length);
75 ret =
DsMakeSpnW(wszServiceClass, wszServiceHost, wszInstanceName, 555, wszReferrer, &spn_length, spn);
78 ok(spn_length ==
lstrlenW(wszSpn4) + 1,
"DsMakeSpnW should have returned spn_length of %d instead of %ld\n",
lstrlenW(wszSpn4) + 1, spn_length);
81 ret =
DsMakeSpnW(wszServiceClass, wszServiceHost,
NULL, 555, wszReferrer, &spn_length, spn);
84 ok(spn_length ==
lstrlenW(wszSpn5) + 1,
"DsMakeSpnW should have returned spn_length of %d instead of %ld\n",
lstrlenW(wszSpn5) + 1, spn_length);
89 static const WCHAR classW[] =
L"class";
91 static const WCHAR resultW[] =
L"class/host.domain";
#define ERROR_INVALID_PARAMETER
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
DWORD WINAPI DsMakeSpnW(LPCWSTR svc_class, LPCWSTR svc_name, LPCWSTR inst_name, USHORT inst_port, LPCWSTR ref, DWORD *spn_length, LPWSTR spn)
DWORD WINAPI DsClientMakeSpnForTargetServerW(LPCWSTR class, LPCWSTR name, DWORD *buflen, LPWSTR buf)
GLenum GLuint GLenum GLsizei const GLchar * buf
static void test_DsClientMakeSpnForTargetServer(void)
static void test_DsMakeSpn(void)
static const WCHAR hostW[]
#define ERROR_BUFFER_OVERFLOW