%DDEADV Set up advisory link.
% DDEADV sets up an advisory link (described in the "DDE Advisory Links"
% section) between MATLAB and a server application. When the data
% identified by the item argument changes, the string specified by the
% callback argument is passed to the eval function and evaluated. If the
% advisory link is a hot link, DDE modifies upmtx, the update matrix, to
% reflect the data in item. If item corresponds to a range of data
% values, a change to any value in the range causes callback to be
% evaluated.
%
% rc = DDEADV(channel,item,callback,upmtx,format,timeout)
%
% rc Return code: (logical) 0 indicates failure, 1 indicates success.
% channel Conversation channel from DDEINIT.
% item String specifying the DDE item name for the advisory
% link. Changing the data identified by item at the server
% triggers the advisory link. Multiple items have to be
% separated by blanks, enclose item names containing blanks
% with double quotes, e.g. "value x" "value y".
% callback String specifying the callback that is evaluated on
% update notification. Changing item at the server causes
% callback to get passed to the eval function to be evaluated.
% upmtx (optional) String specifying the name of a matrix that
% holds data sent with update notification. If upmtx is
% included, changing item at the server causes upmtx to be
% updated with the revised data.
% If not string, the name (if any) of the given array is used.
% Specifying an update matrix creates a hot link. Omitting
% upmtx or specifying it as an empty string, creates a warm
% link. If upmtx exists in the workspace, its contents are
% overwritten. If upmtx does not exist, it is created.
% format (optional) If NUMERIC, a two-element array specifying the
% format of the data requested. The first element indicates a
% Windows clipboard format to use for the request. The value 1
% corresponds to CF_Text, 13 for CF_UnicodeText;
% other values can be obtained by calling CLIPFORM.
% The second element of the format array
% specifies the type of the resultant matrix. The valid
% types are NUMERIC (the default, corresponding to a value
% of 0) and STRING (corresponding to a value of 1).
% If no format given, the default format array is [1 0].
% New: If STRING, this is the clipboard format name directly.
% Supported formats are 'Text', 'UnicodeText',
% 'XlTable', and 'MatTable'. The hot-link array will be STRING
% if 'Text' and 'UnicodeText', NUMERIC otherwise.
% timeout (optional) Scalar specifying the time-out limit for
% this operation. Timeout is specified in milliseconds.
% (1000 milliseconds = 1 second). If advisory link is not
% established within timeout milliseconds, the function fails.
% The default value of timeout is three seconds.
%
% For example,
% Set up a hot link between a range of cells in Excel and the
% matrix 'x'. If successful, display the matrix
% rc = ddeadv(channel, 'r1c1:r5c5', 'disp(x)', 'x');
%
% See also DDEINIT, DDETERM, DDEEXEC, DDEREQ, DDEPOKE, DDEUNADV, CLIPFORM.
%
% Copyright (c) 2001 TU Chemnitz
Vorgefundene Kodierung: ASCII (7 bit) | 2
|