PA_Dial4DGetText


version 2003


PA_Dial4DGetText (dialog; variable; text) → long

Parameter Type Description
dialog PA_Dial4D Dialog reference
variable char* Name of the variable to access
text char* Pointer to the buffer that will receive the text
Function result long Length of the text

Description

The routine PA_Dial4DGetText returns the text for the variable variable in the buffer pointed to by text . The function returns the length of the text. You can pass a null buffer pointer if you only want to read the length of the text.

Example

   char* text = 0;
   long len;
 
   // first read the size of the buffer, passing a null pointer
   len = PA_Dial4DGetText( dialog, "vText", 0 );
   
   // if there is a text, allocate a buffer to hold it
   if ( len > 0 )
      text = malloc( len );
   
   // if buffer is allocated, get the text
   if ( text )
   {
      PA_Dial4DGetText( dialog, "vText", text );
      
      /* . . . */
      
      //   free the buffer when it's done with it   
      free( text );
   }

See Also

PA_Dial4DSetText .

Error Handling

None.