Changeset 7518 for trunk/src


Ignore:
Timestamp:
Dec 1, 2001, 8:26:40 PM (24 years ago)
Author:
sandervl
Message:

minor update

Location:
trunk/src/kernel32
Files:
2 edited

Legend:

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

    r7457 r7518  
    1 /* $Id: Fileio.cpp,v 1.56 2001-11-26 14:53:57 sandervl Exp $ */
     1/* $Id: Fileio.cpp,v 1.57 2001-12-01 19:26:40 sandervl Exp $ */
    22
    33/*
     
    653653              LPOVERLAPPED, lpOverlapped)
    654654{
     655  if(lpNumberOfBytesRead) *lpNumberOfBytesRead = 0;
     656  if(dwLength == 0) {
     657      dprintf(("!WARNING!: Nothing to do"));
     658      //TODO: should we fail here instead?? (wine doesn't)
     659      return TRUE;
     660  }
    655661  return (HMReadFile(hFile,
    656662                     pBuffer,
     
    668674              LPOVERLAPPED_COMPLETION_ROUTINE,  lpCompletionRoutine)
    669675{
     676  if(nNumberOfBytesToRead == 0) {
     677      dprintf(("!WARNING!: Nothing to do"));
     678      //TODO: should we fail here instead?? (wine doesn't)
     679      return TRUE;
     680  }
    670681  return (HMReadFileEx(hFile,
    671682                       lpBuffer,
     
    682693              LPOVERLAPPED, lpOverlapped)
    683694{
     695  if(nrbyteswritten) *nrbyteswritten = 0;
     696  if(nrbytes == 0) {
     697      dprintf(("!WARNING!: Nothing to do"));
     698      //TODO: should we fail here instead?? (wine doesn't)
     699      return TRUE;
     700  }
     701
    684702  return (HMWriteFile(hFile,
    685703                      buffer,
     
    716734              LPOVERLAPPED_COMPLETION_ROUTINE,  lpCompletionRoutine)
    717735{
     736  if(nNumberOfBytesToWrite == 0) {
     737      dprintf(("!WARNING!: Nothing to do"));
     738      //TODO: should we fail here instead?? (wine doesn't)
     739      return TRUE;
     740  }
     741
    718742  return (HMWriteFileEx(hFile,
    719743                        (LPVOID)lpBuffer,
  • trunk/src/kernel32/hmcomm.cpp

    r7499 r7518  
    1 /* $Id: hmcomm.cpp,v 1.22 2001-11-30 13:52:32 sandervl Exp $ */
     1/* $Id: hmcomm.cpp,v 1.23 2001-12-01 19:26:40 sandervl Exp $ */
    22
    33/*
     
    312312    dprintf(("Warning: lpOverlapped != NULL & !FILE_FLAG_OVERLAPPED; sync operation"));
    313313  }
     314//testestestest
     315  dprintf(("Bytes to write:"));
     316  for(int i=0;i<nNumberOfBytesToWrite;i++) {
     317          dprintf(("%x %c", ((char *)lpBuffer)[i], ((char *)lpBuffer)[i]));
     318  }
     319//testestestset
    314320
    315321  ret = OSLibDosWrite(pHMHandleData->hHMHandle, (LPVOID)lpBuffer, nNumberOfBytesToWrite,
     
    430436  if(ret == FALSE) {
    431437       dprintf(("!ERROR!: ReadFile failed with rc %d", GetLastError()));
     438  }
     439  else {
     440//testestestest
     441      dprintf(("Bytes read:"));
     442      for(int i=0;i<ulBytesRead;i++) {
     443          dprintf(("%x %c", ((char *)lpBuffer)[i], ((char *)lpBuffer)[i]));
     444      }
     445//testestestset
    432446  }
    433447  return ret;
     
    541555  dprintf(("SerialCommThread %x entered", hComm));
    542556
     557  SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
    543558  while(TRUE)
    544559  {
Note: See TracChangeset for help on using the changeset viewer.