Skocz do zawartości

ReadFile


Law

Recommended Posts

Kawałek z MSDNa:

BOOL ReadFile(
  HANDLE hFile,                // handle of file to read
  LPVOID lpBuffer,             // pointer to buffer that receives data
  DWORD nNumberOfBytesToRead,  // number of bytes to read
  LPDWORD lpNumberOfBytesRead, // pointer to number of bytes read
  LPOVERLAPPED lpOverlapped    // pointer to structure for data
);

4 i 5 argument powinien byc wskaźnikiem, wiec mzoe o to chodzi ;)
Nic innego mi do głowy nie przychodzi.
Wiec poprawnie byloby tak:

char buffer[1024];
DWORD pdwBytes;
ReadFile(hFile, buffer, 1, &pdwBytes, NULL);
Link do komentarza
Udostępnij na innych stronach

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gość
Odpowiedz...

×   Wkleiłeś zawartość bez formatowania.   Usuń formatowanie

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Utwórz nowe...