Changeset 39690 in vbox for trunk/src/VBox/Runtime/r3/win
- Timestamp:
- Dec 30, 2011 1:06:50 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 75528
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/pipe-win.cpp
r34119 r39690 1148 1148 1149 1149 1150 RTDECL(int) RTPipeQueryReadable(RTPIPE hPipe, size_t *pcbReadable) 1151 { 1152 RTPIPEINTERNAL *pThis = hPipe; 1153 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 1154 AssertReturn(pThis->u32Magic == RTPIPE_MAGIC, VERR_INVALID_HANDLE); 1155 AssertReturn(pThis->fRead, VERR_PIPE_NOT_READ); 1156 AssertPtrReturn(pcbReadable, VERR_INVALID_POINTER); 1157 1158 int rc = RTCritSectEnter(&pThis->CritSect); 1159 if (RT_FAILURE(rc)) 1160 return rc; 1161 1162 DWORD cbAvailable = 0; 1163 if (PeekNamedPipe(pThis->hPipe, NULL, 0, NULL, &cbAvailable, NULL) 1164 *pcbReadable = cbAvailable; 1165 else 1166 rc = RTErrConvertFromWin32(GetLastError()); 1167 1168 RTCritSectLeave(&pThis->CritSect); 1169 return rc; 1170 } 1171 1172 1150 1173 /** 1151 1174 * Internal RTPollSetAdd helper that returns the handle that should be added to
Note:
See TracChangeset
for help on using the changeset viewer.