1 #ifndef VERSION_CHECKER_CLASS
2 #define VERSION_CHECKER_CLASS
Provides a dynamically resizable ASCII character string.
A very common template for a dynamic array of bytes.
Holds all information about a file's versioning.
Holds a file's version identifier.
Provides version checking for shared libraries.
void complain_cannot_load(const basis::astring &library_file_name) const
Reports that the dll could not be loaded.
bool good_version() const
Performs the actual version check.
virtual ~version_checker()
Destructor releases any resources.
static bool get_record(const basis::astring &pathname, structures::version_record &to_fill)
Retrieves a version record for the file at "pathname".
static bool retrieve_version_info(const basis::astring &filename, basis::byte_array &to_fill)
Retrieves the version info for the "filename" into the array "to_fill".
static bool get_language(basis::byte_array &version_chunk, basis::un_short &high, basis::un_short &low)
Gets the language identifier out of the "version_chunk".
static basis::astring get_name(const void *to_find)
returns the name of the HMODULE specified by "to_find".
DEFINE_CLASS_NAME("version_checker")
static basis::astring module_name(const void *module_handle)
returns the module name where this object resides; only sensible on win32.
void complain_wrong_version(const basis::astring &library_file_name, const structures::version &expected_version, const structures::version &version_found) const
Reports that the file has the wrong version.
static bool loaded(const basis::astring &library_file_name)
returns true if the "library_file_name" is currently loaded.
basis::astring text_form() const
version_checker(const basis::astring &library_file_name, const structures::version &expected, const basis::astring &version_complaint)
Constructs a checking object and ensures the version is appropriate.
static structures::version retrieve_version(const basis::astring &pathname)
Returns the version given a "pathname" to the DLL or EXE file.
static void * get_handle(const basis::astring &library_file_name)
retrieves the module handle for the "library_file_name".
unsigned short un_short
Abbreviated name for unsigned short integers.