PA_GetPointerParameter


version 2003


PA_GetPointerParameter (params; index) → PA_Pointer

Parameter Type Description
params PA_PluginParameters Parameters received in PluginMain
index short Index of the parameter in params
Function result PA_Pointer Value of the indexth parameter

Description

The routine PA_GetPointerParameter returns the value of type PA_Pointer , of the index parameter in params .

The plug-in can then access the object pointed to by the pointer using PA_GetPointerKind , PA_GetPointerTableField and PA_GetPointerVariable .

See Create a new plugin for a description of parameter accessors.

NOTE

: The first parameter starts at index 1.

Example

Receive a pointer to a field, and do domething with the field.

   void PluginMain( long selector, PA_PluginParameter params )
   {
      switch ( selector )
      {
         . . .kInitPlugin, kDeinitPlugin...
 
         case kMyRoutine :
            DoWithFieldPointer(params );
            break;
 
      }
   }
 
   void DoWithFieldPointer (PA_PluginParameters params)
   {
      short         table, field;
      PA_Pointer   ptr;
 
      ptr = PA_GetPointerParameter (params, 1);
      PA_GetPointerTableField(ptr, &table, &field);
      if( (t != 0) && (f != 0) ) // if 0, it is not o Field Pointer
      {
         DoSomethingWithThisField(tabl, field);
      }
   }

See Also

Create a new plugin , PA_GetPointerKind , PA_GetPointerTableField , PA_GetPointerVariable .

Error Handling

PA_GetLastError

keeps the last error that occurred before calling the routine.