Ignore:
Timestamp:
Jun 18, 2009, 11:53:26 AM (16 years ago)
Author:
ydario
Message:

Kernel32 updates.

File:
1 edited

Legend:

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

    r10083 r21302  
    255255 *****************************************************************************/
    256256
    257 UINT WIN32API _lwrite(HFILE arg1,
    258                       LPCSTR arg2,
    259                       UINT  arg3)
     257UINT WIN32API _lwrite(HFILE hFile,
     258                      LPCSTR lpBuffer,
     259                      UINT  cbWrite)
    260260{
    261261   ULONG rc;
    262 
    263    dprintf(("KERNEL32: _lwrite(%08xh, %08xh, %08xh)\n",
    264             arg1,
    265             arg2,
    266             arg3));
    267 
    268    if (!WriteFile(arg1,
    269                   (PVOID)arg2,
    270                   arg3,
     262   dprintf(("KERNEL32: _lwrite(%08xh, %08xh, %08xh)\n", hFile, lpBuffer, cbWrite));
     263
     264   if (!cbWrite)
     265       rc = SetEndOfFile(hFile) ? 0 : HFILE_ERROR;
     266   else
     267   {
     268       if (!WriteFile(hFile,
     269                      (PVOID)lpBuffer,
     270                      cbWrite,
    271271                  &rc,
    272272                  NULL))
    273       rc = -1;
    274 
    275    dprintf(("KERNEL32: _lwrite returns %08xh.\n",
    276             rc));
    277 
     273          rc = HFILE_ERROR;
     274   }
     275
     276   dprintf(("KERNEL32: _lwrite returns %08xh.\n", rc));
    278277   return rc;
    279278}
Note: See TracChangeset for help on using the changeset viewer.