PRB: WNetGetUser Does Not Fail on Win95 (173620)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
This article was previously published under Q173620 SYMPTOMS
WNetGetUser always succeeds on Windows 95, no matter what value you include
for the lpName parameter. As long as you pass a valid pointer to the
string, the function will succeed and will set the lpUserName parameter to
the name of the person that logged into the system.
For instance if you call:
res = WNetGetUser("VERYBADPATHDESCRIPTION", szName, cbName)
The function will return NO_ERROR (Zero) indicating that it was successful,
even though there is no drive letter or other path, and the szName
parameter will receive the user's logged in name.
According to the documentation the function should return one of two other
errors:
ERROR_NOT_CONNECTED
ERROR_NO_NET_OR_BAD_PATH.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. We are researching this bug and
will post new information here in the Microsoft Knowledge Base as it
becomes available.
Modification Type: | Major | Last Reviewed: | 4/6/2004 |
---|
Keywords: | kbAPI kbnetwork kbprb kbWNet KB173620 |
---|
|