Changeset 269


Ignore:
Timestamp:
Jul 5, 1999, 9:55:10 AM (26 years ago)
Author:
phaller
Message:

Fix: HandleManager::Open32::OpenFile() as suggested by Edgar Buerkle

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/HandleManager.h

    r262 r269  
    1 /* $Id: HandleManager.h,v 1.1 1999-07-04 09:36:02 sandervl Exp $ */
     1/* $Id: HandleManager.h,v 1.2 1999-07-05 07:55:09 phaller Exp $ */
    22
    33/*
     
    5151      /* all handles to our special pseudo-devices are ORed with this define */
    5252   /* this allows us to determine quickly how to where to route requests to. */
    53 #define HM_HANDLE_ID   0xDEAD0000
     53#define HM_HANDLE_ID   0x77770000
    5454#define HM_HANDLE_MASK 0x0000FFFF
    5555
  • trunk/src/kernel32/hmopen32.cpp

    r241 r269  
    1 /* $Id: hmopen32.cpp,v 1.5 1999-06-29 11:02:52 phaller Exp $ */
     1/* $Id: hmopen32.cpp,v 1.6 1999-07-05 07:55:10 phaller Exp $ */
    22
    33/*
     
    517517{
    518518  HFILE hFile;
     519  FILETIME filetime;
     520  WORD filedatetime[2];
    519521
    520522  dprintfl(("KERNEL32: HandleManager::Open32::OpenFile %s(%s,%08x,%08x,%08x) - stub?\n",
     
    528530             "\\\\.\\") == 0)
    529531    lpFileName+=4;
     532
     533  // filling OFSTRUCT
     534  pOFStruct->cBytes = sizeof(OFSTRUCT);
     535  pOFStruct->nErrCode = 0;
    530536
    531537  hFile = O32_OpenFile(lpFileName,
     
    535541  {
    536542    pHMHandleData->hWinHandle = hFile;
     543    GetFileTime(hFile,
     544                NULL,
     545                NULL,
     546                &filetime );
     547    FileTimeToDosDateTime(&filetime,
     548                          &filedatetime[0],
     549                          &filedatetime[1] );
     550    memcpy(pOFStruct->reserved,
     551           filedatetime,
     552           sizeof(pOFStruct->reserved) );
    537553    return (NO_ERROR);
    538554  }
    539555
    540   //@@@PH: Edgar Buerkle suspects wrong return value here, should be 0 in case of success
     556  // error branch
    541557  hFile = O32_GetLastError();
    542   dprintf(("KERNEL32: HandleManager::Open32::OpenFile returns %08xh\n",
    543            hFile));
    544 
    545   return(hFile); // return error cause
     558  pOFStruct->nErrCode = hFile;
     559  dprintf(("KERNEL32: HandleManager::Open32::OpenFile Error %08xh\n",
     560            pOFStruct->nErrCode));
     561
     562  return(hFile);
    546563}
    547564
Note: See TracChangeset for help on using the changeset viewer.