| gclib 1.35.5 Communications API for Galil controllers and PLCs |

## ◆ GWrite()

GCLIB_DLL_EXPORTED GReturn GCALL GWrite | ( | GCon | g,
|  | GBufIn | buffer,
|  | GSize | buffer_len
| ) |  |

Performs a write on the connection.

Parameters

  g | Connection's handle.
  buffer | The user's write buffer. To send a Galil command, a terminating carriage return is usually required.
  buffer_len | The length of the data in the buffer.

Returns
  The success status or error code of the function. See gclib_errors.h for possible values. If G_NO_ERROR is returned, all bytes were written.

Warning
  This function is deprecated and will be removed in a future gclib version. Please contact Galil for needs not covered by the other gclib functions.

See x_gread_gwrite.cpp for an example.