|
#pragma once
#include "../diagnostic/is_valid.hpp"
#include "../diagnostic/verify.hpp"
#include "../meta/szero.hpp"
#include "../string/scoped_string_buffer.hpp"
#include "fill_module_file_name.hpp"
#include "max_path.hpp"
#include "path_find_extension.hpp"
namespace tomato {
template< class StringT >
void build_module_file_name_extension(StringT& str, LPCTSTR pszExt, HINSTANCE hInst = _Module.GetModuleInstance())
{
ATLASSERT(is_valid(pszExt));
ATLASSERT(*pszExt == _T('.'));
scoped_string_buffer<StringT> buf(str, max_path::value);
fill_module_file_name(buf, hInst);
LPTSTR psz = path_find_extension(buf.begin());
ATLASSERT(*psz != tszero::value);
// See: ATL7::AtlLoadTypeLib
verify((psz - buf.begin() + lstrlen(pszExt)) <= max_path::value);
verify_api(lstrcpy(psz, pszExt) != NULL);
}
} // namespace tomato
|
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