Click here to Skip to main content
15,886,199 members
Articles / Desktop Programming / Win32

Stopwatch

Rate me:
Please Sign up or sign in to vote.
4.97/5 (29 votes)
3 Jan 2015CPOL6 min read 66.1K   1.5K   43  
Benchmark C++ std::vector vs raw arrays, move assignable/constructable & copy assignable/constructable
#include "stdafx.h"

#include "hwincomcontrolsite.h"

namespace harlinn
{
    namespace windows
    {


        HWIN_EXPORT HRESULT ComControlSite::GetWindow(HWND *phwnd)
        {
            *phwnd = nullptr;
            std::shared_ptr<Control> theControl = InternalObject<Control>();
            if(theControl->IsHandleCreated())
            {
                *phwnd = theControl->GetSafeHandle();
                return S_OK;
            }
            return E_FAIL;
        }
        HWIN_EXPORT HRESULT ComControlSite::ContextSensitiveHelp(BOOL fEnterMode)
        {
            return E_NOTIMPL;
        }

        // IOleClientSite
        HWIN_EXPORT HRESULT ComControlSite::SaveObject( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::GetMoniker( DWORD dwAssign,DWORD dwWhichMoniker,IMoniker **ppmk)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::GetContainer( IOleContainer **ppContainer)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::ShowObject( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnShowWindow( BOOL fShow)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::RequestNewObjectLayout( )
        {
            return E_NOTIMPL;
        }

        // IOleControlSite
        HWIN_EXPORT HRESULT ComControlSite::OnControlInfoChanged( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::LockInPlaceActive( BOOL fLock)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::GetExtendedControl( IDispatch **ppDisp)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::TransformCoords( POINTL *pPtlHimetric,POINTF *pPtfContainer, DWORD dwFlags)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::TranslateAccelerator( MSG *pMsg,DWORD grfModifiers)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnFocus( BOOL fGotFocus)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::ShowPropertyFrame( )
        {
            return E_NOTIMPL;
        }

        HWIN_EXPORT HRESULT ComControlSite::CanInPlaceActivate( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnInPlaceActivate( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnUIActivate( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::GetWindowContext( IOleInPlaceFrame **ppFrame,IOleInPlaceUIWindow **ppDoc,LPRECT lprcPosRect,LPRECT lprcClipRect,LPOLEINPLACEFRAMEINFO lpFrameInfo)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::Scroll( SIZE scrollExtant)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnUIDeactivate( BOOL fUndoable)
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnInPlaceDeactivate( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::DiscardUndoState( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::DeactivateAndUndo( )
        {
            return E_NOTIMPL;
        }
        HWIN_EXPORT HRESULT ComControlSite::OnPosRectChange( LPCRECT lprcPosRect)
        {
            return E_NOTIMPL;
        }

        // IAdviseSinkImpl
        HWIN_EXPORT void ComControlSite::OnDataChange( FORMATETC *pFormatetc,STGMEDIUM *pStgmed)
        {
            
        }

        HWIN_EXPORT void ComControlSite::OnViewChange( DWORD dwAspect,LONG lindex)
        {
            
        }

        HWIN_EXPORT void ComControlSite::OnRename( IMoniker *pmk)
        {
            
        }

        HWIN_EXPORT void ComControlSite::OnSave( )
        {
            
        }

        HWIN_EXPORT void ComControlSite::OnClose( )
        {
            
        }


        // IOleUIObjInfo
        HWIN_EXPORT HRESULT ComControlSite::GetObjectInfo(DWORD dwObject,DWORD* lpdwObjSize, LPWSTR * lplpszLabel,LPWSTR FAR* lplpszType, LPWSTR * lplpszShortType,LPWSTR * lplpszLocation)
        {
            return E_NOTIMPL;
        }

        HWIN_EXPORT HRESULT ComControlSite::GetConvertInfo(DWORD dwObject,
                                            CLSID * lpClassID, WORD * lpwFormat,
                                            CLSID * lpConvertDefaultClassID,
                                            LPCLSID * lplpClsidExclude, UINT * lpcClsidExclude)
        {
            return E_NOTIMPL;
        }

        HWIN_EXPORT HRESULT ComControlSite::ConvertObject(DWORD dwObject, REFCLSID clsidNew)
        {
            return E_NOTIMPL;
        }

            
        HWIN_EXPORT HRESULT ComControlSite::GetViewInfo (DWORD dwObject,HGLOBAL * phMetaPict, DWORD* pdvAspect, int* pnCurrentScale)
        {
            return E_NOTIMPL;
        }

        HWIN_EXPORT HRESULT ComControlSite::SetViewInfo (DWORD dwObject,HGLOBAL hMetaPict, DWORD dvAspect,int nCurrentScale, BOOL bRelativeToOrig)
        {
            return E_NOTIMPL;
        }


        // IOleDocumentSite
        HWIN_EXPORT HRESULT ComControlSite::ActivateMe(IOleDocumentView *pViewToActivate)
        {
            return E_NOTIMPL;
        }



    }
}

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Sea Surveillance AS
Norway Norway
Chief Architect - Sea Surveillance AS.

Specializing in integrated operations and high performance computing solutions.

I’ve been fooling around with computers since the early eighties, I’ve even done work on CP/M and MP/M.

Wrote my first “real” program on a BBC micro model B based on a series in a magazine at that time. It was fun and I got hooked on this thing called programming ...

A few Highlights:

  • High performance application server development
  • Model Driven Architecture and Code generators
  • Real-Time Distributed Solutions
  • C, C++, C#, Java, TSQL, PL/SQL, Delphi, ActionScript, Perl, Rexx
  • Microsoft SQL Server, Oracle RDBMS, IBM DB2, PostGreSQL
  • AMQP, Apache qpid, RabbitMQ, Microsoft Message Queuing, IBM WebSphereMQ, Oracle TuxidoMQ
  • Oracle WebLogic, IBM WebSphere
  • Corba, COM, DCE, WCF
  • AspenTech InfoPlus.21(IP21), OsiSoft PI


More information about what I do for a living can be found at: harlinn.com or LinkedIn

You can contact me at espen@harlinn.no

Comments and Discussions