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_request(int dde_channel,char *item,char **buf,unsigned max_wait) ;

Scroll Prev Top Next More

dde_channel - as returned from vdde_initiate.

item - the name of the item you want a value for.

buf - a location to put the results.  This should be the address of an unallocated char *.

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_request function is used to retrieve data from a DDE server.  Because DDE is an asynchronous operation this function will wait for up to max_wait time before returning in order to allow the server time to respond.  If the server responds earlier the function will return earlier.  On success *buf contains the string received.  All data is sent and received as text strings.

NOTE *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 or vdde_vrequest or vdde_terminate.