Commit 1ad8180e authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

- fix a couple tests and traces

- add a couple stubs required by native ntlanman.dll
parent 46138d8e
...@@ -60,8 +60,9 @@ NET_API_STATUS WINAPI NetServerEnum( ...@@ -60,8 +60,9 @@ NET_API_STATUS WINAPI NetServerEnum(
LPDWORD resume_handle LPDWORD resume_handle
) )
{ {
FIXME("Stub (%p, %ld %p %ld %p %p %ld %s %p)\n",servername, level, bufptr, FIXME("Stub (%s %ld %p %ld %p %p %ld %s %p)\n", debugstr_w(servername),
prefmaxlen, entriesread, totalentries, servertype, debugstr_w(domain), resume_handle); level, bufptr, prefmaxlen, entriesread, totalentries, servertype,
debugstr_w(domain), resume_handle);
return ERROR_NO_BROWSER_SERVERS_FOUND; return ERROR_NO_BROWSER_SERVERS_FOUND;
} }
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
@ stub I_NetLogonUasLogoff @ stub I_NetLogonUasLogoff
@ stub I_NetLogonUasLogon @ stub I_NetLogonUasLogon
@ stub I_NetNameCanonicalize @ stub I_NetNameCanonicalize
@ stub I_NetNameCompare @ stdcall I_NetNameCompare(ptr wstr wstr ptr ptr)
@ stub I_NetNameValidate @ stdcall I_NetNameValidate(ptr wstr ptr ptr)
@ stub I_NetPathCanonicalize @ stub I_NetPathCanonicalize
@ stub I_NetPathCompare @ stub I_NetPathCompare
@ stub I_NetPathType @ stub I_NetPathType
......
...@@ -111,7 +111,8 @@ void run_usergetinfo_tests(void) ...@@ -111,7 +111,8 @@ void run_usergetinfo_tests(void)
"Bad Network Path: rc=%ld\n",rc); "Bad Network Path: rc=%ld\n",rc);
} }
rc=pNetUserGetInfo(sEmptyStr, sAdminUserName, 0, (LPBYTE *)&ui0); rc=pNetUserGetInfo(sEmptyStr, sAdminUserName, 0, (LPBYTE *)&ui0);
ok(rc == ERROR_BAD_NETPATH,"Bad Network Path: rc=%ld\n",rc); ok(rc == ERROR_BAD_NETPATH || rc == NERR_Success,
"Bad Network Path: rc=%ld\n",rc);
rc=pNetUserGetInfo(sInvalidName, sAdminUserName, 0, (LPBYTE *)&ui0); rc=pNetUserGetInfo(sInvalidName, sAdminUserName, 0, (LPBYTE *)&ui0);
ok(rc == ERROR_INVALID_NAME,"Invalid Server Name: rc=%ld\n",rc); ok(rc == ERROR_INVALID_NAME,"Invalid Server Name: rc=%ld\n",rc);
rc=pNetUserGetInfo(sInvalidName2, sAdminUserName, 0, (LPBYTE *)&ui0); rc=pNetUserGetInfo(sInvalidName2, sAdminUserName, 0, (LPBYTE *)&ui0);
......
...@@ -152,7 +152,7 @@ static void run_wkstatransportenum_tests(void) ...@@ -152,7 +152,7 @@ static void run_wkstatransportenum_tests(void)
/* 3rd check: is param 3 passed? */ /* 3rd check: is param 3 passed? */
apiReturn = pNetWkstaTransportEnum(NULL, 0, NULL, MAX_PREFERRED_LENGTH, apiReturn = pNetWkstaTransportEnum(NULL, 0, NULL, MAX_PREFERRED_LENGTH,
NULL, NULL, NULL); NULL, NULL, NULL);
ok(apiReturn == STATUS_ACCESS_VIOLATION || apiReturn == ERROR_INVALID_PARAMETER, ok(apiReturn == STATUS_ACCESS_VIOLATION || apiReturn == RPC_X_NULL_REF_POINTER,
"NetWkstaTransportEnum returned %ld\n", apiReturn); "NetWkstaTransportEnum returned %ld\n", apiReturn);
/* 4th check: is param 6 passed? */ /* 4th check: is param 6 passed? */
......
...@@ -53,6 +53,8 @@ BOOL NETAPI_IsLocalComputer(LPCWSTR ServerName) ...@@ -53,6 +53,8 @@ BOOL NETAPI_IsLocalComputer(LPCWSTR ServerName)
{ {
return TRUE; return TRUE;
} }
else if (ServerName[0] == '\0')
return TRUE;
else else
{ {
DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1; DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
...@@ -453,16 +455,34 @@ NET_API_STATUS WINAPI NetpGetComputerName(LPWSTR *Buffer) ...@@ -453,16 +455,34 @@ NET_API_STATUS WINAPI NetpGetComputerName(LPWSTR *Buffer)
} }
} }
NET_API_STATUS WINAPI I_NetNameCompare(LPVOID p1, LPWSTR wkgrp, LPWSTR comp,
LPVOID p4, LPVOID p5)
{
FIXME("(%p %s %s %p %p): stub\n", p1, debugstr_w(wkgrp), debugstr_w(comp),
p4, p5);
return ERROR_INVALID_PARAMETER;
}
NET_API_STATUS WINAPI I_NetNameValidate(LPVOID p1, LPWSTR wkgrp, LPVOID p3,
LPVOID p4)
{
FIXME("(%p %s %p %p): stub\n", p1, debugstr_w(wkgrp), p3, p4);
return ERROR_INVALID_PARAMETER;
}
NET_API_STATUS WINAPI NetWkstaGetInfo( LPWSTR servername, DWORD level, NET_API_STATUS WINAPI NetWkstaGetInfo( LPWSTR servername, DWORD level,
LPBYTE* bufptr) LPBYTE* bufptr)
{ {
NET_API_STATUS ret; NET_API_STATUS ret;
TRACE("%p %ld %p\n", debugstr_w( servername ), level, bufptr ); TRACE("%s %ld %p\n", debugstr_w( servername ), level, bufptr );
if (servername) if (servername)
{ {
FIXME("remote computers not supported\n"); if (!NETAPI_IsLocalComputer(servername))
return ERROR_INVALID_LEVEL; {
FIXME("remote computers not supported\n");
return ERROR_INVALID_LEVEL;
}
} }
if (!bufptr) return ERROR_INVALID_PARAMETER; if (!bufptr) return ERROR_INVALID_PARAMETER;
......
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