114{
117 CHAR OrigHostname[128];
118 CHAR OrigDomainName[128];
119 CHAR OrigDhcpHostname[128];
120 CHAR OrigDhcpDomainName[128];
121 BOOL OrigHostnameExists;
122 BOOL OrigDomainNameExists;
123 BOOL OrigDhcpHostnameExists;
124 BOOL OrigDhcpDomainNameExists;
127
128 memset(OrigHostname, 0,
sizeof(OrigHostname));
129 memset(OrigDomainName, 0,
sizeof(OrigDomainName));
130 memset(OrigDhcpHostname, 0,
sizeof(OrigDhcpHostname));
131 memset(OrigDhcpDomainName, 0,
sizeof(OrigDhcpDomainName));
132
145
146 trace(
"Starting values:\n");
147 trace(
"Hostname: %s, exists %s\n", OrigHostname, OrigHostnameExists ?
"yes" :
"no");
148 trace(
"Domain: %s, exists %s\n", OrigDomainName, OrigDomainNameExists ?
"yes" :
"no");
149 trace(
"DhcpHostname: %s, exists %s\n", OrigDhcpHostnameExists ? OrigDhcpHostname :
"", OrigDhcpHostnameExists ?
"yes" :
"no");
150 trace(
"DhcpDomain: %s, exists %s\n", OrigDhcpDomainNameExists ? OrigDhcpDomainName :
"", OrigDhcpDomainNameExists ?
"yes" :
"no");
151
154 "GetNetworkParams returned %ld, expected ERROR_BUFFER_OVERFLOW\n",
155 ApiReturn);
157 skip(
"Can't determine size of FIXED_INFO. Can't proceed\n");
159 if (FixedInfo ==
NULL)
160 skip(
"FixedInfo is NULL. Can't proceed\n");
161
164 "GetNetworkParams(buf, &dwSize) returned %ld, expected NO_ERROR\n",
165 ApiReturn);
167 {
169 skip(
"GetNetworkParams failed. Can't proceed\n");
170 }
173 {
175 skip(
"FixedInfo->HostName is NULL. Can't proceed\n");
176 }
177 if (OrigDhcpHostnameExists)
178 {
179
180
181 }
182 else
183 ok(
strcmp(FixedInfo->
HostName, OrigHostname) == 0,
"FixedInfo->HostName is wrong '%s' != '%s'\n", FixedInfo->
HostName, OrigHostname);
186 {
188 skip(
"FixedInfo->DomainName is NULL. Can't proceed\n");
189 }
190 if(OrigDhcpDomainNameExists)
191 ok(
strcmp(FixedInfo->
DomainName, OrigDhcpDomainName) == 0,
"FixedInfo->DomainName is wrong '%s' != '%s'\n", FixedInfo->
DomainName, OrigDhcpDomainName);
192 else
193 ok(
strcmp(FixedInfo->
DomainName, OrigDomainName) == 0,
"FixedInfo->DomainName is wrong '%s' != '%s'\n", FixedInfo->
DomainName, OrigDomainName);
194 if (!OrigDhcpHostnameExists)
195 {
198 }
199 else
200 {
203 }
204 if (!OrigDhcpDomainNameExists)
205 {
208 }
209 else
210 {
213 }
214
219 "GetNetworkParams returned %ld, expected ERROR_BUFFER_OVERFLOW\n",
220 ApiReturn);
222 skip(
"Can't determine size of FIXED_INFO. Can't proceed\n");
224 if (FixedInfo ==
NULL)
225 skip(
"FixedInfo is NULL. Can't proceed\n");
228 "GetNetworkParams(buf, &dwSize) returned %ld, expected NO_ERROR\n",
229 ApiReturn);
231 {
233 skip(
"GetNetworkParams failed. Can't proceed\n");
234 }
235
236
237 if (OrigDhcpHostnameExists)
239 else
242 if (OrigDhcpDomainNameExists)
244 else
247
249 "GetNetworkParams(buf, &dwSize) returned %ld, expected NO_ERROR\n",
250 ApiReturn);
253 skip(
"FixedInfo->HostName is NULL. Can't proceed\n");
254 if (!OrigDhcpHostnameExists)
255 {
256
257
258 }
259 else
260 ok(
strcmp(FixedInfo->
HostName, OrigHostname) == 0,
"FixedInfo->HostName is wrong '%s' != '%s'\n", FixedInfo->
HostName, OrigHostname);
263 skip(
"FixedInfo->DomainName is NULL. Can't proceed\n");
264 if (!OrigDhcpDomainNameExists)
266 else
267 ok(
strcmp(FixedInfo->
DomainName, OrigDomainName) == 0,
"FixedInfo->DomainName is wrong '%s' != '%s'\n", FixedInfo->
DomainName, OrigDomainName);
268
270}
static INT ReadRegistryValue(PCHAR ValueName, PCHAR Value)
#define ROSTESTDHCPDOMAIN
static INT WriteRegistryValue(PCHAR ValueName, PCHAR Value)
static INT DeleteRegistryValue(PCHAR ValueName)
int strcmp(const char *String1, const char *String2)
#define HeapFree(x, y, z)
DWORD WINAPI GetNetworkParams(PFIXED_INFO pFixedInfo, PULONG pOutBufLen)
#define ERROR_FILE_NOT_FOUND
char HostName[MAX_HOSTNAME_LEN+4]
char DomainName[MAX_DOMAIN_NAME_LEN+4]
#define ERROR_BUFFER_OVERFLOW