41{
48
49 trace(
"Testing '%S':\n", pszNewName);
50
51
53 cbData = sizeof(szNVHostNameOld);
56 ok(szNVHostNameOld[0],
"szNVHostNameOld is empty\n");
57
58
60 cbData = sizeof(szHostNameOld);
63 ok(szHostNameOld[0],
"szHostNameOld is empty\n");
64
65
67 cbData = sizeof(szComputerNameOld);
70 ok(szComputerNameOld[0],
"szComputerNameOld is empty\n");
71
72
77 if (bValid)
79 else
81
82
84 cbData = sizeof(szNVHostNameNew);
87 if (bValid)
88 {
89 ok(szNVHostNameNew[0],
"szNVHostNameNew is empty\n");
91 "szNVHostNameNew '%S' should be pszNewName '%S'\n", szNVHostNameNew, pszNewName);
92 }
93
94
96 cbData = sizeof(szHostNameNew);
99 if (bValid)
100 {
101 ok(szHostNameNew[0],
"szHostNameNew is empty\n");
102 ok(
lstrcmpW(szHostNameNew, szHostNameOld) == 0,
103 "szHostNameNew '%S' should be szHostNameOld '%S'\n", szHostNameNew, szHostNameOld);
104 }
105
106
108 cbData = sizeof(szComputerNameNew);
111 if (bValid)
112 {
113 ok(szComputerNameNew[0],
"szComputerNameNew is empty\n");
115 {
118 ok(
lstrcmpiW(szComputerNameNew, szTruncatedNewName) == 0,
119 "szComputerNameNew '%S' should be szTruncatedNewName '%S'\n",
120 szComputerNameNew, szTruncatedNewName);
121 }
122 else
123 {
125 "szComputerNameNew '%S' should be pszNewName '%S'\n",
126 szComputerNameNew, pszNewName);
127 }
128 }
129
130
134
138
142}
#define ok_long(expression, result)
#define ok_int(expression, result)
BOOL WINAPI SetComputerNameExW(COMPUTER_NAME_FORMAT NameType, LPCWSTR lpBuffer)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define ERROR_INVALID_PARAMETER
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
DWORD WINAPI GetLastError(void)
#define MAX_COMPUTERNAME_LENGTH