32{
36 static const WCHAR wszServiceClass[] = {
'c',
'l',
'a',
's',
's',0};
37 static const WCHAR wszServiceHost[] = {
'h',
'o',
's',
't',0};
38 static const WCHAR wszInstanceName[] = {
'i',
'n',
's',
't',
'a',
'n',
'c',
'e',0};
39 static const WCHAR wszReferrer[] = {
'r',
'e',
'f',
'e',
'r',
'r',
'e',
'r',0};
40 static const WCHAR wszSpn1[] = {
'c',
'l',
'a',
's',
's',
'/',
'h',
'o',
's',
't',0};
41 static const WCHAR wszSpn2[] = {
'c',
'l',
'a',
's',
's',
'/',
'i',
'n',
's',
't',
'a',
'n',
'c',
'e',
'/',
'h',
'o',
's',
't',0};
42 static const WCHAR wszSpn3[] = {
'c',
'l',
'a',
's',
's',
'/',
'i',
'n',
's',
't',
'a',
'n',
'c',
'e',
':',
'5',
'5',
'5',
'/',
'h',
'o',
's',
't',0};
43 static const WCHAR wszSpn4[] = {
'c',
'l',
'a',
's',
's',
'/',
'i',
'n',
's',
't',
'a',
'n',
'c',
'e',
':',
'5',
'5',
'5',
'/',
'h',
'o',
's',
't',0};
44 static const WCHAR wszSpn5[] = {
'c',
'l',
'a',
's',
's',
'/',
'h',
'o',
's',
't',
':',
'5',
'5',
'5',0};
45
46 spn[0] = '\0';
47
51
55
60 ok(spn_length ==
lstrlenW(wszSpn1) + 1,
"DsMakeSpnW should have returned spn_length of %d instead of %d\n",
lstrlenW(wszSpn1) + 1, spn_length);
61
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 %d\n",
lstrlenW(wszSpn2) + 1, spn_length);
67
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 %d\n",
lstrlenW(wszSpn3) + 1, spn_length);
73
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 %d\n",
lstrlenW(wszSpn4) + 1, spn_length);
79
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 %d\n",
lstrlenW(wszSpn5) + 1, spn_length);
85}
DWORD WINAPI DsMakeSpnW(LPCWSTR svc_class, LPCWSTR svc_name, LPCWSTR inst_name, USHORT inst_port, LPCWSTR ref, DWORD *spn_length, LPWSTR spn)