wcLoad( )

Syntax . . Returns . . Rules . . Tips . . Program Example . . Related Topics . . A-Z Index . . Home

Loads an AppPage and returns a handle to that page.

Example

returnCode = wcLoad(cntrlHandle, pageID, &pageHandle);

Syntax

int wcLoad(void *controlHandle, 
           char *MiVal,
           char **pageHandle)
controlHandleThe handle to the control structure.
MiValThe page ID. If this argument is null, wcLoad( ) uses the value of the MIval parameter from the configuration file.
pageHandleOut parameter used to return a handle to an AppPage.

Returns

0Success.
Error codeFailure or exception. For a list of possible error codes, see Error Messages.

Rules

Tips

Program Example

The following code shows how wcLoad( ) is used in an application.

int handleRequest(wcp)
    void	*wcp;
{
    char    *pagePtr;
    char    *pageId;
    int     ret;

    wcGetVariable(wcp, "MIval", &pageId);
	
    if((ret = wcLoad(wcp, pageId, &pagePtr)) < 0)
		return wcTraceErr(wcp, ret);

    ret = WebExplode(wcp, pagePtr, NULL);

    if (pagePtr!=NULL)
        free(pagePtr);

    return (ret);
}

Related Topics

wcAppPageConnName( )
wcLoadLO( )
WebExplode( )


Top of Page . . Syntax . . Returns . . Rules . . Tips . . Program Example . . A-Z Index . . Home