SetProp

PowerBuilder Native Interface

IPB_Session interface:

SetProp method

Description

Syntax

SetProp(LPCTSTR name, void* data)

Return Values

Examples

"subroutine f_setprop(int a)\n"
"function int f_getprop()\n"
enum MethodIDs
{
   mid_SetProp = 0,
   mid_GetProp = 1
};
int* SetVal = new int;

if (mid == mid_SetProp)
{
   *SetValue = ci -> pArgs -> GetAt(0) -> GetInt();
   session -> SetProp(prop_name, SetVal);
}
if (mid == mid_GetProp)
{
   int* GetVal;
   GetValue = (int *)session -> GetProp(prop_name);
   ci -> returnValue -> SetInt(*GetVal);
}

Usage

  • Use SetProp to register a new variable with the session or to change the value of an existing variable.

  • Use GetProp to access the variable.

  • Use RemoveProp to remove the variable from the list of variables associated with the session when it is no longer needed.

See Also