IPB_Session interface:
GetSharedVarID method
Description
Returns the internal ID of a shared variable.
Syntax
GettSharedVarID(pbgroup group, LPCTSTR fieldname)
Argument |
Description |
---|---|
group |
The group to which the shared variable belongs |
fieldname |
The name of the field that contains the shared variable, in lowercase |
Return Values
pbfieldID. Returns 0xffff if the ID cannot be found.
Examples
This code uses GetSharedVarID to obtain the field ID of a shared variable, then uses that ID to obtain the value of the variable:
curGroup = session -> GetCurrGroup();
fid = session -> GetSharedVarID(curGroup,"i_svar");
if (fid == 0xffff)
{
MessageBox(NULL, "Illegal fid!", "default", MB_OK);
return;
}
i_val = session -> GetIntSharedVar(curGroup, fid,
isNull);