다음을 통해 공유


XXX_Read (Device Manager) (Windows Embedded CE 6.0)

1/6/2010

This function reads data from the device identified by the open context.

Syntax

DWORD XXX_Read(
  DWORD hOpenContext,
  LPVOID pBuffer,
  DWORD Count 
);

Parameters

  • hOpenContext
    [in] Handle to the open context of the device. The XXX_Open (Device Manager) function creates and returns this identifier.
  • pBuffer
    [out] Pointer to the buffer that stores the data read from the device. This buffer should be at least Count bytes long.
  • Count
    [in] Number of bytes to read from the device into pBuffer.

Return Value

Returns zero to indicate end-of-file. Returns –1 to indicate an error. Returns the number of bytes read to indicate success.

Remarks

After an application calls the ReadFile function to read from the device, the operating system invokes this function. The hFile parameter is a handle to the device. The pBuffer parameter points to the buffer that contains the data read from the device. The Count parameter indicates the number of bytes that the application requests to read from the device.

Device Manager uses the XXX prefix as a placeholder. When implementing the stream interface, replace XXX with a prefix appropriate for your implementation or use undecorated entry point names in conjunction with DEVFLAGS_NAKEDENTRIES. For more information about other valid Flags values, see ActivateDeviceEx.

Requirements

Header Developer Implemented
Library Developer Implemented
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

Stream Interface Driver Functions
ActivateDeviceEx
XXX_Open (Device Manager)

Concepts

Device File Names

Other Resources

ReadFile