JagSendMsg  JagSetSharedValue

Chapter 5: C Routines Reference

JagSetInstanceData

Description

Associate a reference to instance data with the current C component instance.

Syntax

#include <jagpublic.h> 
JagStatus JagSetInstanceData(CS_VOID *datap);

Parameters

datap

A pointer to instance data.

Returns

JagSetInstanceData 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 Appendix C, “Creating C Components,” in the EAServer Programmer’s Guide.

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

See also

JagGetInstanceData

Appendix C, “Creating C Components,” in the EAServer Programmer’s Guide





Copyright © 2005. Sybase Inc. All rights reserved. JagSetSharedValue