LEFEVRE Damien .net

Friday 18 December 2009, 12:48

MFC - Get application directory from anywhere (main exe, DLLs)

[cpp]
BOOL GetApplicationDirectory(CString& _sApplicationDirectory)
{
	TCHAR szPathName[_MAX_PATH];
	if (FAILED(::GetModuleFileName(NULL, szPathName, _MAX_PATH)))
	{
		return FALSE;
	}

	TCHAR szDrive[_MAX_DRIVE];
	TCHAR szDirectory[_MAX_DIR];
	TCHAR szFileName[_MAX_FNAME];
	TCHAR szExtension[_MAX_EXT];

	// Split path
	_tsplitpath_s(szPathName, szDrive, _MAX_DRIVE, szDirectory, _MAX_DIR, 
		szFileName, _MAX_FNAME, szExtension, _MAX_EXT);

	// Make safe path
	_tmakepath_s(szPathName, _MAX_PATH, szDrive, szDirectory, _T(""), _T(""));

	_sApplicationDirectory = szPathName;

	return TRUE;
}

Monday 14 December 2009, 07:19

ZoomBrowser EX installer

Those smart asses from Canon won't ship the ZoomBrowser EX installer, only updaters.

I've got an XP laptop.

So the what you should do is:

Canon does not seem to know what is a multilanguage installer either. So choose carefully alternative downloads for the language you are looking for...

Thank you Canon for wasting my time!!