The information in this article applies to:
SYMPTOMSIf you simultaneously access the same registry key from multiple threads in a single process, an error might occur. For example, if several threads in a carefully designed multi-threaded Win32 application try to open the same registry key using RegOpenKeyEx()in a loop, the function could fail with the following error code of 6: This error does not occur across process boundaries. Thus, two single- threaded processes that are competing for the same registry key will not be affected by this bug. CAUSEThis behavior is intermittent and is the result of a race condition between the threads simultaneously accessing the same registry key. RESOLUTIONThere are several possible workarounds for this situation:
STATUSMicrosoft has confirmed this to be a bug 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. MORE INFORMATIONThe following sample code illustrates the problem with the RegOpenKeyEx() function. Note that the error only happens intermittently with the following code. Sample Code
Additional query words: regedit problem known occasionally concurrently RegOpenKey RegCloseKey
Keywords : kberrmsg kbAPI kbKernBase kbNTOS400 kbWinOS2000 kbRegistry kbDSupport kbGrpKernBase |
Last Reviewed: January 10, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |