Jump to content

  • Log In with Google      Sign In   
  • Create Account


some light on this please


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 AlexM   Members   -  Reputation: 122

Like
Likes
Like

Posted 07 January 2000 - 08:06 PM

can anybody shed some light on how to construct programs to accept plugins, and how are the plugins actually done? prefer some details. Thanks in advance!

Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9502

Like
Likes
Like

Posted 07 January 2000 - 10:32 PM

Whenever I''ve used plug-ins in my programs, I''ve use renamed dll''s. Create a dll header file that specifies the base interfaces on the plug-in you want. Such as (off the top of my head, so it probably won''t compile):

#ifndef _MYPLUGIN_H_
#define _MYPLUGIN_H_

declspec(dllexport) stdcall int GetVersion(void);
declspec(dllexport) stdcall char ** EnumerateFunctionNames(void);

#endif

Then when you want to use the plug-in call LoadLibrary on the plug-in file name, and check it for the functions in the header. If they aren''t there then it isn''t a valid plug-in. Then you can use the interfaces you specified to access the desired functionality.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS