GetString

PowerBuilder Native Interface

IPB_Session interface:

GetString method

Description

Returns a pointer to the string passed in as an argument.

Syntax

GetString (pbstring* string)

Argument

Description

string

A pointer to a pbstring

Return Values

LPCTSTR.

Examples

This example uses the IPB_Value GetString function to obtain a string value from the PBCallInfo structure. If the string is not null, the IPB_Session GetString function sets the value of the proxyname string to a pointer to the returned value:

string proxyName;
{
   pbstring pn = ci->pArgs->GetAt(2)->GetString();

   if (pn == NULL)
   {
      ci->returnValue->SetLong(kInvalidProxyName);
      return PBX_OK;
   }
   else
   {
      proxyName = session->GetString(pn);
   }
}

Usage

When you have finished using the string, call the ReleaseString method to free the memory acquired.

See Also