Click here to Skip to main content
11,796,774 members (73,778 online)
Click here to Skip to main content
Articles » Multimedia » GDI+ » General » Downloads
Add your own
alternative version

Dynamically generating images in ISAPI extension using GDI+ with live demo

, 3 Oct 2002 54.2K 341 25
A class wrapper to write GDI+ images to the client browser using an ISAPI extension.
#pragma once

/*! \brief A class wrapper for GDI+ initialization

 Author: Ryan Johnston, see
 \ingroup GDIpGroup
class CGDIpInitializer 
	//! Constructor offers the ability to initialize on construction, or delay until needed.
	CGDIpInitializer(bool bInitCtorDtor = false);

	//! If GDI+ has not explicitly been Deinitialized, do it in the destructor
	virtual ~CGDIpInitializer();

	/*! \brief Initialize function, makes sure only one GDI+ is called for each process.
	  This function creates a file mapping based on the current process id.
	If the mapping already exists, it knows that another instance of this class
	elsewhere in the process has already taken care of starting GDI+.
	void Initialize();

	/*! \brief Deinitialize or decrease initialize count.
	  No tricks to this function.  If this was the class that originally started GDI+,
	 and its initialization count has reached zero, it shuts down GDI+.
	void Deinitialize();

	HANDLE							m_hMap;
	bool							m_bInited, m_bInitCtorDtor;
	ULONG_PTR						m_gdiplusToken;
	Gdiplus::GdiplusStartupInput	m_gdiplusStartupInput;
	static long							m_initcount;

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.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Jonathan de Halleux
United States United States
Jonathan de Halleux is Civil Engineer in Applied Mathematics. He finished his PhD in 2004 in the rainy country of Belgium. After 2 years in the Common Language Runtime (i.e. .net), he is now working at Microsoft Research on Pex (

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.151002.1 | Last Updated 4 Oct 2002
Article Copyright 2002 by Jonathan de Halleux
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid