BUG: Getting ERROR_INTERNAL_ERROR from GetCurrentHwProfile(). (237387)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows NT 4.0
This article was previously published under Q237387 SYMPTOMS
The GetCurrentHwProfile() API sometimes returns the following error:
ERROR_INTERNAL_ERROR.
CAUSE
The GetCurrentHwProfile() API is designed to retrieve hardware profile information stored in the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\IDConfigDB\Hardware Profiles.
Sometimes, when the hardware profile is not correctly setup, one or more entries can be missing from the registry, particularly the HwProfileGuid value.
If the HwProfileGuid value does not exist or contains an empty string, and the computer does not contain a properly configured network card, the GetCurrentHwProfile() API attempts to create HwProfileGuid value. Because the computer does not have a properly configured network card, the attempt to create a Globally Unique Identifier (GUID) fails, and instead a Locally Unique Identifier (LUID) is created.
When this happens, GetCurrentHwProfile() returns the following error message:
ERROR_INTERNAL_ERROR
This error message does not need to be returned because the UID is not required to be globally unique. In other words, the API should go on using the LUID and return success.
RESOLUTION
The work around is to either manually add the value into the registry yourself, or programmatically check for this condition and fix it before calling the API.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 11/3/2003 |
---|
Keywords: | kbAPI kbbug kbKernBase kbpending KB237387 |
---|
|