Changeset 1296 for trunk/src


Ignore:
Timestamp:
Oct 14, 1999, 7:21:14 PM (26 years ago)
Author:
phaller
Message:

Fix: RegConnectRegistry slightly improved.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/advapi32/registry.cpp

    r803 r1296  
    1 /* $Id: registry.cpp,v 1.3 1999-09-02 19:39:08 phaller Exp $ */
     1/* $Id: registry.cpp,v 1.4 1999-10-14 17:21:14 phaller Exp $ */
    22
    33/*
     
    1717 * Includes                                                                  *
    1818 *****************************************************************************/
     19
     20#include <odin.h>
     21#include <odinwrap.h>
     22#include <os2sel.h>
    1923
    2024#include <os2win.h>
     
    2832#include <winreg.h>
    2933
    30 ODINDEBUGCHANNEL(ADVAPI32)
     34
     35ODINDEBUGCHANNEL(ADVAPI32-REGISTRY)
    3136
    3237
     
    749754                                   PLONG, arg4)
    750755{
     756  dprintf(("ADVAPI32:Registry key=%s\n",
     757           arg2));
    751758  return _O32_RegQueryValue(ConvertKey(arg1),
    752759                           arg2,
     
    811818                                    LPDWORD,arg6)
    812819{
     820  dprintf(("ADVAPI32:Registry key=%s\n",
     821           arg2));
    813822  return _O32_RegQueryValueEx(ConvertKey(arg1),
    814823                             arg2,
     
    10291038                                       PHKEY, phkResult)
    10301039{
    1031   dprintf(("ADVAPI32: RegConnectRegistryA not implemented yet."));
    1032 
    1033   if (lpszComputerName == NULL) /* local registry ? */
     1040  char szLocalName[256];
     1041  DWORD dwNameLength = sizeof(szLocalName)-2;
     1042
     1043  szLocalName[0] = '\\';
     1044  szLocalName[1] = '\\';
     1045  GetComputerNameA(szLocalName+2, &dwNameLength);
     1046
     1047  dprintf(("ADVAPI32: RegConnectRegistryA(%s,local %s) not implemented yet.\n",
     1048           lpszComputerName,
     1049           szLocalName));
     1050
     1051  /* local registry ? */
     1052  if ( (                    lpszComputerName  == NULL) ||
     1053       (strcmp(szLocalName, lpszComputerName) == 0   ) )
    10341054  {
    10351055    /* @@@PH experimental !!! */
     
    10391059  }
    10401060
    1041   // @@@PH 1999/06/09 always fake this API
    1042   *phkResult = hKey;
    1043   return (NO_ERROR);
     1061  return (ERROR_ACCESS_DENIED);
    10441062}
    10451063
Note: See TracChangeset for help on using the changeset viewer.