Returns the URL that identifies this browser session's connection.
returnCode = wcURL(cntrlHandle, &URL);
int wcURL(void *controlHandle,
char **URL)
| controlHandle | The handle to the control structure. |
| URL | Out parameter used to return the URL. |
| 0 | Success. |
| Error code | Failure or exception. For a list of possible error codes, see Error Messages. |
<A HREF=$WEB_HOME?MIval=menu&last=smith>Because there is no static value for the variable $WEB_HOME, INFORMIX-Universal Web Connect uses wcURL( ) to dynamically generate the value, which is the URL being used by the current browser session.
The following code shows how wcURL( ) is used in an application.
If you are constructing HTML programmatically from within an event handler, you must perform this task explicitly, as shown in the following code. The eventFunction( ) is called to insert dynamic HTML tags when an <MIEVENT> tag is encountered in an AppPage.
int eventFunction( )
{
...
wcPrintf("<A HREF=%s?MIval=menu&last=smith>", wcURL(wcp));
...
}
In this example, the URL is represented by the placeholder %s. This placeholder is replaced by the return value of wcURL( ).
Overview of Connection Types (Managed, Direct)