Class Bit7zLibrary

Synopsis

#include <include/bit7zlibrary.hpp>

class Bit7zLibrary

Description

The Bit7zLibrary class allows the access to the basic functionalities provided by the 7z DLLs.

Mentioned in

Methods

Bit7zLibrary OverloadConstructs a Bit7zLibrary object using the path of the wanted 7zip DLL.
~Bit7zLibraryDestructs the Bit7zLibrary object, freeing the loaded dynamic-link library (DLL) module.
createArchiveObjectInitiates the object needed to create a new archive or use an old one.
setLargePageModeSet the 7-zip dll to use large memory pages.

Source

Lines 40-81 in include/bit7zlibrary.hpp.

class Bit7zLibrary {
    public:
        /**
         * @brief Constructs a Bit7zLibrary object using the path of the wanted 7zip DLL.
         *
         * By default, it searches a 7z.dll in the same path of the application.
         *
         * @param dll_path  the path to the dll wanted
         */
        explicit Bit7zLibrary( const std::wstring& dll_path = DEFAULT_DLL );
        /**
         * @brief Destructs the Bit7zLibrary object, freeing the loaded dynamic-link library (DLL) module.
         */
        virtual ~Bit7zLibrary();
        /**
         * @brief Initiates the object needed to create a new archive or use an old one.
         *
         * @note Usually this method should not be called directly by users of the bit7z library.
         *
         * @param format_ID     GUID of the archive format (see BitInFormat's guid() method)
         * @param interface_ID  ID of the archive interface to be requested (IID_IInArchive or IID_IOutArchive)
         * @param out_object    Pointer to a CMyComPtr of an object wich implements the interface requested
         */
        void createArchiveObject( const GUID* format_ID, const GUID* interface_ID, void** out_object ) const;
        /**
         * @brief Set the 7-zip dll to use large memory pages.
         */
        void setLargePageMode();
    private:
        typedef UINT32 ( WINAPI* CreateObjectFunc )( const GUID* clsID, const GUID* interfaceID, void** out );
        typedef HRESULT ( WINAPI* SetLargePageMode )();
        HMODULE mLibrary;
        CreateObjectFunc mCreateObjectFunc;
        Bit7zLibrary( const Bit7zLibrary& ); // not copyable!
        Bit7zLibrary& operator=( const Bit7zLibrary& ); // not assignable!
};





Add Discussion as Guest

Log in