Click here to Skip to main content
11,799,282 members (65,422 online)
Click here to Skip to main content
Add your own
alternative version

Internet Explorer AdBlock

, 17 Jan 2008 GPL3 40.2K 1.8K 41
Internet Explorer AdBlock Add-on
IE AdBlockPS
IE AdBlockps.def
IE AdBlock
IE AdBlock.def
IE AdBlock.rgs
// Redefinition protection
#ifndef PATH_H
#define PATH_H


#include <memory>				// Needed for singleton class
using namespace std;

// CPath

class CPath  
	// Functions
	static	CPath * Instance();
	bool	Init();
	bool	CreateAdBlockFolders();
	CString GetPathAdBlockLocation();
	CString GetPathAdBlockTemp();
	CString GetPathTemp();
	CString GetPathSystem();
	CString GetPathProgramfiles();
	CString GetPathApp();
	CString GetPathUserProfile();
	CString GetPathAppData();
	CString GetPathCommonAppData();
	CString ExtractFileName(CString sPath);
	CString ExtractFilePath(CString sPath, TCHAR tcSplitter = _T('\\'));
	CString ExtractDrive(CString sPath, CString sSplitter = CString(_T("\\")));
	CString ExtractFileExtension(CString sPath);
	CString StripFileExtension(CString sPath);
	CTime	GetFileDateTime(CString sFilename);
	static bool	CreateFolder(CString sFolder);

	// Constructor & destructor
	CPath();			// Private constructor because singleton!
	// Functions

	// Variables
	static std::auto_ptr<CPath> sm_inst;
	CString m_sPathAdBlockLocation;				// Path to adblock dll
	CString m_sPathAdBlockTemp;					// Path to adblock temp files
	CString m_sPathTemp;						// Path to system temp files
	CString m_sPathProgramfiles;				// Path to program files
	CString m_sPathSystem;						// Path to system folder
	CString m_sPathUserProfile;					// Path to user home directory
	CString m_sPathAppData;						// Path to application data
	CString m_sPathCommonAppData;				// Path to common application data
	CString m_sPathWindowsDirectory;			// Path to windows directory
	CString m_sPathUpdateServerPath;			// Server + path where updateinfo is located
	CString m_sPathUpdateServerFile;			// Server + path + file where updateinfo is located

// End of redefinition protection
#endif // PATH_H

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, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


About the Author

Geert van Horrik
Software Developer CatenaLogic
Netherlands Netherlands
I am Geert van Horrik, and I have studied Computer Science in the Netherlands.

I love to write software using .NET (especially the combination of WPF and C#). I am also the lead developer of Catel, an open-source application development framework for WPF, Silverlight, WP7 and WinRT with the focus on MVVM.

I have my own company since January 1st 2007, called CatenaLogic. This company develops commercial and non-commercial software.

To download (or buy) applications I have written, visit my website:

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.151002.1 | Last Updated 17 Jan 2008
Article Copyright 2008 by Geert van Horrik
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid