Microsoft KB Archive/193463

From BetaArchive Wiki

HOWTO: Troubleshoot Remote Registry Access on Windows 95/98

Q193463



The information in this article applies to:


  • Microsoft Win32 Application Programming Interface (API), included with:
    • Microsoft Windows 95
    • Microsoft Windows 98





SYMPTOMS

This article describes several problems that can occur with remote registry access when one or more of the computers involved is running Windows 95 or Windows 98.



MORE INFORMATION

RegConnectRegistry() Fails with ERROR_ACCESS_DENIED

To troubleshoot this problem:

  1. Make sure that the Remote Administration Services are installed on each of the Windows 95 or Windows 98 computers involved. For additional information, please see the following article in the Microsoft Knowledge Base:

    Q141460 How to Install Remote Administration Services

  2. On the remote machine that you are trying to connect to, make sure that remote administration is enabled. To check this, go to the Control Panel, open the Passwords dialog box, click the Remote Administration tab, and make sure the Enable Remote Administration check box is selected.
  3. If the remote computer that you are trying to connect to is configured for user-level security, make sure that you are listed as a remote administrator. To check this, go to the Control Panel, open the Passwords dialog box, click the Remote Administration tab, and make sure you are listed in the Administrators list box.

RegConnectRegistry() Fails with ERROR_BAD_NETPATH

To troubleshoot this problem:

  1. Make sure that the Remote Administration Services are installed on each of the Windows 95 or Windows 98 computers involved. For additional information, please see the following article in the Microsoft Knowledge Base:

    Q141460 How to Install Remote Administration Services

  2. On the remote computer that you are trying to connect to, make sure that remote administration is enabled. To check this, go to the Control Panel, open the Passwords dialog box, click the Remote Administration tab, and make sure the Enable Remote Administration check box is selected.
  3. Make sure the computers are communicating through the same network protocol (for example, TCP/IP).
  4. If you fail to connect to a remote Windows 9x registry after connecting to a remote Windows NT registry, try installing the IPX/SPX network protocol alongside the TCP/IP protocol, please see the following article in the Microsoft Knowledge Base:

    Q193464 BUG: Windows 95/98 Fails to Connect to other Win 95/98 Registry

RegQueryInfoKey() returns incorrect data

To troubleshoot this problem:

  1. You should allocate a buffer twice as large as cbMaxSubKeyLen when accessing a remote Windows 95 or Windows 98 registry. When connected to a remote Windows 95 or Windows 98 registry, the cbMaxSubKeyLen parameter receives only half the actual length of the longest subkey of hKey. For additional information, please see the following article in the Microsoft Knowledge Base:

    Q193465 BUG: RegQueryInfoKey Returns Length Div 2 for cbMaxSubKeyLen

  2. When connected to a remote Windows NT registry, the size returned in cbMaxSubKeyLen includes the final NULL character, even though the API reference says it does not. This should not cause any serious problems, because it usually means that the allocated buffer is one byte too large. It can be a problem if strings are being compared based solely on buffer size.

NOTE: Item number two was a documentation error. The API behaves in this manner by design on Windows 95. The documents will be updated to reflect this in future releases of Visual Studio.

Additional query words:

Keywords : kbKernBase kbRegistry
Issue type : kbhowto
Technology : kbAudDeveloper kbWin32sSearch kbWin32API


Last Reviewed: December 16, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.