2 Replies Latest reply: Oct 11, 2013 9:38 AM by Copymgt RSS

    how do I use a Sppluginref

    Copymgt Community Member

      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?



        • 1. Re: how do I use a Sppluginref
          A. Patterson Community Member

          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.

          • 2. Re: how do I use a Sppluginref
            Copymgt Community Member

            All this is the calling side of things.

            How do I set up a function as the EntryFunction of my plugin?