Changeset 4197 for trunk/src/kernel32


Ignore:
Timestamp:
Sep 5, 2000, 10:35:40 PM (25 years ago)
Author:
sandervl
Message:

RegSetValue workaround + HMOpenFile fix

Location:
trunk/src/kernel32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/HandleManager.cpp

    r4171 r4197  
    1 /* $Id: HandleManager.cpp,v 1.47 2000-09-03 09:32:06 sandervl Exp $ */
     1/* $Id: HandleManager.cpp,v 1.48 2000-09-05 20:35:38 sandervl Exp $ */
    22
    33/*
     
    10101010                     &pHMHandleData->dwShare);
    10111011
    1012   pHMHandleData->dwCreation = 0;
     1012  //SvL; Must be OPEN_EXISTING because mmaps depend on it (to duplicate
     1013  //     the file handle when this handle is a parameter for CreateFileMappingA/W
     1014  pHMHandleData->dwCreation = OPEN_EXISTING;
    10131015  pHMHandleData->dwFlags    = 0;
    10141016  pHMHandleData->lpHandlerData = NULL;
  • trunk/src/kernel32/registry.cpp

    r3678 r4197  
    1 /* $Id: registry.cpp,v 1.2 2000-06-08 18:08:56 sandervl Exp $ */
     1/* $Id: registry.cpp,v 1.3 2000-09-05 20:35:39 sandervl Exp $ */
    22
    33/*
     
    899899                                 DWORD, cbData)
    900900{
     901 LONG rc;
     902
    901903  //SvL: 8-11-'97: Bugfix: crash in pmwinx if size == 0 and string is large
    902904  if(cbData == 0)
    903905    cbData = strlen(lpData);
    904906
    905   return(_O32_RegSetValue(ConvertKey(hkey),
     907  rc = _O32_RegSetValue(ConvertKey(hkey),
    906908                         lpSubKey,
    907909                         dwType,
    908910                         lpData,
    909                          cbData));
     911                         cbData);
     912  if(rc == ERROR_NOT_ENOUGH_MEMORY && cbData == 0 && dwType == REG_SZ)
     913  {
     914    char regdata = 0;
     915        //SvL: Netscape sets an empty string key this way; Open32 doesn't like it
     916        rc = _O32_RegSetValue(ConvertKey(hkey),
     917                         lpSubKey,
     918                         dwType,
     919                         &regdata,
     920                         1);
     921  }
     922  return rc;
    910923}
    911924
  • trunk/src/kernel32/virtual.cpp

    r3995 r4197  
    1 /* $Id: virtual.cpp,v 1.32 2000-08-11 18:42:55 sandervl Exp $ */
     1/* $Id: virtual.cpp,v 1.33 2000-09-05 20:35:40 sandervl Exp $ */
    22
    33/*
     
    5252                LPCSTR name      /* [in] Name of file-mapping object */ )
    5353{
     54 HANDLE hFileMap;
     55
    5456   dprintf(("CreateFileMappingA: %x %x %x%x %s", hFile, protect, size_high, size_low, name));
    55    return HMCreateFileMapping(hFile, sa, protect, size_high, size_low, name);
     57   hFileMap = HMCreateFileMapping(hFile, sa, protect, size_high, size_low, name);
     58   dprintf(("CreateFileMappingA returned %x", hFileMap));
     59   return hFileMap;
    5660}
    5761
Note: See TracChangeset for help on using the changeset viewer.