Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Plugin System – an alternative to GetProcAddress and interfaces

, 25 May 2007
A powerful and extensible way of creating plugin-based applications
pluginsystem_src.zip
defmaker
defmaker.dsp
defmaker.dsw
DLL+EXE
Host.dsw
HostExe.dsp
BMPParser
BMPParser.dsp
Host
Host.dsp
Release
BMPParser.imp
Host.dll
HostExe.exe
TGAParser.imp
TGAParser
TGAParser.dsp
EXE
Host.dsp
Host.dsw
BMPParser
BMPParser.dsp
ImageParser
ImageParser.dsp
Release
BMPParser.imp
Host.exe
TGAParser.imp
TGAParser
TGAParser.dsp
Interface
Host.dsp
Host.dsw
BMPParser
BMPParser.dsp
Release
BMPParser.imp
Host.exe
TGAParser.imp
TGAParser
TGAParser.dsp
// Host.h - defines the host API
//
// Part of the Plugin System tutorial
//
///////////////////////////////////////////////////////////////////////////////

#ifndef _HOST_H
#define _HOST_H

#ifdef COMPILE_HOST
#define HOSTAPI __declspec(dllexport) // when the host is compiling
#else
#define HOSTAPI __declspec(dllimport) // when the plugins are compiling
#endif

// adds the parser to the g_Parsers list
void AddParser( class CImageParser *parser );

#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)

About the Author

Ivo Beltchev
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.

| Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 25 May 2007
Article Copyright 2007 by Ivo Beltchev
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid