Skip navigation
Copymgt
Currently Being Moderated

how do I use a Sppluginref

Oct 10, 2013 7:37 PM

I have a function in which I have access to a Sppluginref object that refers to the plugin I am developping.  I would like to call one of the methods of the plugin. Could anybody tell me how I do this ? What is the syntax?

 

Thanks,

 
Replies
  • Currently Being Moderated
    Oct 11, 2013 4:22 AM   in reply to Copymgt

    That's a little vague. Do you mean you have a method on your plugin class you'd like to call? There's no real way to do that, but you might be able to fake it if you really need to call something on it.

     

    Try something like this:

     

    SPPluginEntryFunc entryFunction = 0;

     

    sSPPlug->GetPluginHostEntry(plugin_reference, &entryFunction);

    // check error

     

    void* my_data = 0;

    entryFunction("my_caller", "my_selector", my_data);

     

     

    That won't let you call a method directly, but in your entry function you can catch your custom caller & selector and use that to determine what method to invoke.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points