#pragma once

#include "Array.h"
#include "Critical.h"
#include "ReferenceCounter.h"

namespace Framework
{
    struct DLLDatei
    {
        Text *name;
        HINSTANCE handle;
        int ref;
    };

    class DLLRegister : public virtual ReferenceCounter
    {
    private:
        Array< DLLDatei * > *dlls;
        Critical cs;

    public:
        //! Konstruktor
        __declspec(dllexport) DLLRegister();
        //! Destruktor
        DLLEXPORT ~DLLRegister();
        //! nicht constant       
        DLLEXPORT HINSTANCE ladeDLL( char *name, char *pfad );
        DLLEXPORT void releaseDLL( char *name );
    };
}