Microsoft KB Archive/274723

= FindUserName Returns ERROR_FILE_NOT_FOUND Instead of S_OK =

Article ID: 274723

Article Last Modified on 2/20/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition

-



This article was previously published under Q274723



SYMPTOMS
There is an issue that involves the use of the FindUser method on the DiskQuota scripting object. When a logon name is provided for a user whose SID-Name pair is not yet in the operator's SID-Name cache, the FindUser method returns HRESULT_FROM_WIN32 (ERROR_FILE_NOT_FOUND) rather than S_OK as documented in the Software Development Kit (SDK).



CAUSE
The problem is in the C++ IDiskQuotaControl::FindUserName method and the corresponding scripting FindUser method, both of which are implemented in Dskquota.dll.

If the logon name that is provided to the method is for a valid user but there is no entry in the disk quota SID-Name cache for that user, the method returns HRESULT_FROM_WIN32 (ERROR_FILE_NOT_FOUND) rather than S_OK as documented in the SDK. If there is an entry in the SID-Name cache for that user, the method returns S_OK as required.



RESOLUTION
To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

260910 How to Obtain the Latest Windows 2000 Service Pack



WORKAROUND
You can call the DiskQuota scripting TranslateLogonNameToSid method to obtain a SID string for the user. That string can be passed to &quot;FindUser&quot; rather than the name. This results in &quot;FindUser&quot; succeeding with S_OK.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Windows 2000 Service Pack 2.



MORE INFORMATION
This issue does not affect users of the Windows 2000 Disk Quota tool. It may affect developers or system administrators who want to use this call in the development of a quota tool or in script-based management.

Keywords: kbbug kbfix kbwin2000presp2fix KB274723

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.