XXX_Write (Device Manager) (Compact 2013)

3/26/2014

This function writes data to the device.

Syntax

DWORD XXX_Write(
  DWORD hOpenContext,
  LPCVOID pBuffer,
  DWORD Count,
  HANDLE hAsyncRef
);

Parameters

  • hOpenContext
    [in] Handle to the open context of the device. The call to the XXX_Open (Device Manager) function returns this identifier.
  • pBuffer
    [out] Pointer to the buffer that contains the data to write.
  • Count
    [in] Number of bytes to write from the pBuffer buffer into the device.
  • hAsyncRef
    [in] Handle to an I/O packet. This parameter is optional and is used as an input reference handle for CreateAsyncIoHandle.

Return Value

The number of bytes written indicates success. A value of -1 indicates failure.

Remarks

After an application uses the WriteFile function to write to the device, the operating system, invokes this function.

Device Manager uses the XXX prefix as a placeholder. When implementing the stream interface, replace XXX with a prefix appropriate for your specific 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

See Also

Reference

Stream Interface Driver Functions
ActivateDeviceEx
XXX_Open (Device Manager)

Other Resources

WriteFile