if (!BackupRead(hFile, 0, 0, &read, TRUE, FALSE, &ctx)) THROW_EXCEPTION(GetLastError());
if (ctx) if (!BackupRead(hFile, 0, 0, &read, TRUE, FALSE, &ctx)) THROW_EXCEPTION(GetLastError());
int ScanNTFSStreams(Entry* entry, HANDLE hFile){	PVOID ctx = 0;	DWORD read, seek_high;	Entry** pnext = &entry->_down;	int cnt = 0;	for(;;) {		struct NTFS_StreamHdr : public WIN32_STREAM_ID {			WCHAR name_padding[_MAX_FNAME];	// room for reading stream name		} hdr;		if (!BackupRead(hFile, (LPBYTE)&hdr, (LPBYTE)&hdr.cStreamName-(LPBYTE)&hdr, &read, FALSE, FALSE, &ctx) ||			(long)read!=(LPBYTE)&hdr.cStreamName-(LPBYTE)&hdr)			break;		if (hdr.dwStreamId == BACKUP_ALTERNATE_DATA) {			if (hdr.dwStreamNameSize &&				BackupRead(hFile, (LPBYTE)hdr.cStreamName, hdr.dwStreamNameSize, &read, FALSE, FALSE, &ctx) &&				read==hdr.dwStreamNameSize)			{				++cnt;				int l = hdr.dwStreamNameSize / sizeof(WCHAR);				LPCWSTR p = hdr.cStreamName;				LPCWSTR e = hdr.cStreamName + l;				if (l>0 && *p==':') {					++p, --l;					e = p;					while(l>0 && *e!=':')						++e, --l;					l = e - p;				}				Entry* stream_entry = new WinEntry(entry);				memcpy(&stream_entry->_data, &entry->_data, sizeof(WIN32_FIND_DATA));				lstrcpy(stream_entry->_data.cFileName, String(p, l));				stream_entry->_down = NULL;				stream_entry->_expanded = false;				stream_entry->_scanned = false;				stream_entry->_level = entry->_level + 1;				stream_entry->_bhfi_valid = false;				*pnext = stream_entry;				pnext = &stream_entry->_next;			}		}		 // jump to the next stream header		if (!BackupSeek(hFile, ~0, ~0, &read, &seek_high, &ctx)) {			DWORD error = GetLastError();			if (error != ERROR_SEEK) {				BackupRead(hFile, 0, 0, &read, TRUE, FALSE, &ctx);	// terminate BackupRead() loop				THROW_EXCEPTION(error);				//break;			}			hdr.Size.QuadPart -= read;			hdr.Size.HighPart -= seek_high;			BYTE buffer[4096];			while(hdr.Size.QuadPart > 0) {				if (!BackupRead(hFile, buffer, sizeof(buffer), &read, FALSE, FALSE, &ctx) || read!=sizeof(buffer))					break;				hdr.Size.QuadPart -= read;			}		}	}	if (!BackupRead(hFile, 0, 0, &read, TRUE, FALSE, &ctx))	// terminate BackupRead() loop		THROW_EXCEPTION(GetLastError());	return cnt;}