CAtlFile::Read
Chiamare questo metodo per leggere i dati da un file a partire dalla posizione indicata dal puntatore del file.
HRESULT Read(
LPVOID pBuffer,
DWORD nBufSize
) throw( );
HRESULT Read(
LPVOID pBuffer,
DWORD nBufSize,
DWORD& nBytesRead
) throw( );
HRESULT Read(
LPVOID pBuffer,
DWORD nBufSize,
LPOVERLAPPED pOverlapped
) throw( );
HRESULT Read(
LPVOID pBuffer,
DWORD nBufSize,
LPOVERLAPPED pOverlapped,
LPOVERLAPPED_COMPLETION_ROUTINE pfnCompletionRoutine
) throw( );
Parametri
pBuffer
Puntatore a un buffer che riceverà i dati letti dal file.nBufSize
Dimensioni del buffer, in byte.nBytesRead
Numero di byte letti.pOverlapped
La struttura sovrapposta.Vedere lpOverlapped in ReadFile in Windows SDK.pfnCompletionRoutine
La routine di completamento.Vedere il lpCompletionRoutine in ReadFileEx in Windows SDK.
Valore restituito
Restituisce S_OK su positivo, o un errore HRESULT in errore.
Note
I primi tre form chiamano ReadFile, l'ultimo ReadFileEx per leggere i dati dal file.Utilizzo CAtlFile::Seek spostare il puntatore del file.
Requisiti
Header: atlfile.h