Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: About Components (Read 4051 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

About Components

Want to active another plugin, but dont know how to do
Someone do me a favor to tell me ?

How to use these:

virtual service_base * service_enum_create(const GUID &g,int n)=0;
virtual int service_enum_get_count(const GUID &g)=0;

and another one in service.h

static service_base * enum_create(const GUID &g,int n);
Good good study, day day up, :)
[span style=\'color:red\']The superman is the meaning of the earth.
Let your will say: the superman shall be the meaning of the earth![/span]

About Components

Reply #1
There are some examples in the SDK of how to use the enumerations. (Or so Peter says.  I haven't actually looked.)

Basically, there is no way to enumerate the plugins, because there is no "plugin" base class.  You can enumerate the context menu items or the components menu items, though.

About Components

Reply #2
You don't need to call those functions directly. If you would like to enumerate implementations for some foo service, you can use code like this:
Code: [Select]
    service_enum_t<foo> e;
    foo * ptr;
    for(ptr=e.first();ptr;ptr=e.next())
    {
 /* do something with ptr here */
 ptr->service_release();
    }

Of course you can also store the values returned by e.first(), and release them later. You also don't need to iterate until e.first() returns 0.

About Components

Reply #3
thx!
Good good study, day day up, :)
[span style=\'color:red\']The superman is the meaning of the earth.
Let your will say: the superman shall be the meaning of the earth![/span]