Previous PageTable Of Contents../index.htmlIndexNext Page

dx_fileread( )

Description | Cautions | Example | Errors | See Also

Name:

int dx_fileread(handle, buffer, count)

Inputs:

int handle

  handle returned from dx_fileopen( )

 

void *buffer

  storage location for data

 

unsigned int count

  maximum number of bytes

Returns:

number of bytes if success

 

-1 if failure

Category:

File Management

   

Top Of PageDescription

The dx_fileread( ) function reads data from a file associated with the file handle. The function will read the number of bytes from the file associated with the handle into the buffer. The number of bytes read may be less than the value of count if there are fewer than count bytes left in the file or if the file was opened in text mode. See the _read function in the Microsoft Visual C++ Run-Time Library Reference for more information.

Top Of PageCautions

Use dx_fileread( ) instead of _read to ensure the compatibility of applications with the libraries across various versions of Visual C++.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate failure, a system error has occurred; use dx_fileerrno( ) to obtain the system error value. Refer to the dx_fileerrno( ) function for a list of the possible system error values.

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Dialogic Corporation
All rights reserved
This page generated February, 2002