WSGetLinksFromEnvironment (C Function)
Details
- WSGetLinksFromEnvironment() allocates memory to store the list of links that must be released by calling WSReleaseLinksFromEnvironment(). If WSGetLinksFromEnvironment() returns an error, do not call WSReleaseLinksFromEnvironment() on the contents of links.
- WSGetLinksFromEnvironment() returns 1 on success and 0 on failure.
- WSGetLinksFromEnvironment() is declared in the WSTP header file wstp.h.
Examples
Basic Examples (1)
#include "wstp.h"
void examineTheLinks(WSENV env)
{
WSLINK *theLinks;
int length;
int apiResult;
apiResult = WSGetLinksFromEnvironment(env, &theLinks, &length);
if(! apiResult)
{ /* Unable to retrieve the list of open links */ }
/* ... */
WSReleaseLinksFromEnvironment(env, theLinks, length);
}