Click here to Skip to main content
15,897,891 members
Articles / Programming Languages / C++

Plugin System – an alternative to GetProcAddress and interfaces

Rate me:
Please Sign up or sign in to vote.
4.85/5 (64 votes)
25 May 2007CPOL10 min read 169.2K   1.9K   207  
A powerful and extensible way of creating plugin-based applications
// ImageParser.h - defines the base interface for all image parsers
//
// Part of the Plugin System tutorial
//
///////////////////////////////////////////////////////////////////////////////

#ifndef _IMAGEPARSER_H
#define _IMAGEPARSER_H

// IImageParser is the interface that all image parsers must implement
class IImageParser
{
public:
	virtual HBITMAP ParseFile( const char *fname )=0; // parses the image file and reads it into a HBITMAP
	virtual bool SupportsType( const char *type ) const=0; // returns true if the file type is supported
};

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Ivo started programming in 1985 on an Apple ][ clone. He graduated from Sofia University, Bulgaria with a MSCS degree. Ivo has been working as a professional programmer for over 12 years, and as a professional game programmer for over 10. He is currently employed in Pandemic Studios, a video game company in Los Angeles, California.

Comments and Discussions