//
//  Copyright (c) 2001, Reson, Inc. All Rights Reserved.
//
//  Filename:   Instance.h
//
//  Project:    6046.
//
//  Author(s):  W. Arcus
//
//  Purpose:    Defines the CInstance class to allow an application to determine
//              whether it has been already instancitated.
//
//  Notes:

#if !defined(AFX_INSTANCE_H__9011C2E9_AA0E_4a93_98B4_90EFFB829379__INCLUDED_)
#define AFX_INSTANCE_H__9011C2E9_AA0E_4a93_98B4_90EFFB829379__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CInstance  
{
public:

                        CInstance   (   void );
                        CInstance   (   LPCTSTR             lpszUniqueName );
                        CInstance   (   const   CInstance  &rRhs );

    virtual            ~CInstance   (   void );

    CInstance &    operator =       (   const   CInstance  &rRhs );

    bool                IsFirst     (   void ) const;

private:

    bool                m_bFirstInstance;
    HANDLE              m_hInstanceMutex;
};

#endif // !defined(AFX_INSTANCE_H__9011C2E9_AA0E_4a93_98B4_90EFFB829379__INCLUDED_)
