Generic FunctionPackage: ddeToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version

convert-returned-dde-buffer

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.

Here is the default method:

(defmethod convert-returned-dde-buffer ((port dde-port) buffer length)
  (convert-returned-dde-string
   port (string-from-dde-buffer buffer length)))

See dde.htm for information about DDE support.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.7.29.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version