Chapter 5 C Routines Reference


JagGetInstanceData

Description

Retrieve the address of C component instance data.

Syntax

#include <jagpublic.h> 
JagStatus JagGetInstanceData(CS_VOID **datapp);

Parameters

datapp 

The address of a pointer to be set to the address of instance data. If no instance data has been installed, the pointer is set to NULL.

Return Values

JagGetInstanceData returns JAG_SUCCEED unless a serious error occurs, in which case JAG_FAIL is returned.

Usage

JagSetInstanceData and JagGetInstanceData allow you to associate data with a particular instance of a C component. For example, you might save a counter and use it to keep track of how many times a particular method has been called.

JagSetInstanceData saves a pointer to component instance data; JagGetInstanceData retrieves the address of the saved data. For an introduction to these routines, see "Components that Require Instance Specific Data" in the Jaguar CTS Programmer's Guide.

Note   Note To associate instance data with a C++ component, use class member variables.

See Also

JagSetInstanceData

"Creating C Components" in the Jaguar CTS Programmer's Guide

 


Copyright © 2000 Sybase, Inc. All rights reserved.