Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > DSS Supplement > Dynamic Data Exchange > Using Vensim as a DDE Client

int VEFCC vdde_vrequest(int dde_channel,char **item,char **buf,int nitem,unsigned max_wait) ;

Scroll Prev Top Next More

dde_channel - as returned from vdde_initiate.

item - the list of names of the items you want a value for.

buf - a vector of locations to put the results.  This should be declared in the form char *buf[MAXREQ] and passed as buf.

nitem - the number of items contained in the lists.

max_wait - the maximum time, in milliseconds, to wait for a response from the server before returning an error code.

return value - 0 on failure and 1 on success

The vdde_vrequest function is used to retrieve data from a DDE server.  If you need to retrieve several items from the server this function will be faster to use than multiple calls to vdde_request.  On success buf[0] contains the string for the first item, buf[1] for the second and so on.  On failure one or more of buf[i] will be null indicating a failure to retrieve that item.

NOTE each element of buf points to globally allocated memory managed internally by Vensim.  Under no circumstances should you attempt to free this memory or use it elsewhere.  Its contents remain valid until a new call to vdde_request, vdde_vrequest or vdde_terminate.