convert-returned-dde-buffer

Generic Function

Package: common-graphics

Arguments: port buffer length

This generic function is called whenever an Allegro application is acting as a DDE client, and has called send-request. Its purpose is to convert the raw data being returned by the DDE server into a value that is directly useful by the lisp application. This generic function is not to be called by an application, but an application needs to supply its own method whenever the data returned by the DDE server is not a null-terminated string, which is assumed by the default method.

port is the DDE port on which send-request was called.

buffer is a foreign byte vector containing the raw DDE reply. Its data should be read with fslot-value-typed and converted into a Common Lisp value to return. For example, the following form will read the byte at index 12 in the buffer:

(ff:fslot-value-typed '(:array byte) :foreign buffer 12)

length is the length of the data being returned by the DDE server.

Most DDE servers will include terminating data in the buffer such as a null character (a zero byte) or a zero longword, so either the terminating data or the length argument could be used to determine the length of the data.

If this generic function is being called as the result of calling send-request for a :cold link, then the value that is returned by this generic function will then be returned by the call to send-request.

If send-request was instead called for a :warm or :hot link, then the value that is returned by this generic function will be passed to the application's receive-advice method for this dde-port.

The default method assumes that buffer contains a null-terminated string. It reads a string from the buffer and then calls convert-returned-dde-string to further convert the string as needed.

The value returned by convert-returned-dde-string is then returned by the default method.

See About DDE support in cgide.htm.

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.