Welcome to MSDN Blogs Sign in | Join | Help

Richard Cook

How VSTO will change your life (for the better, that is)

Browse by Tags

All Tags » C++   (RSS)
STL functors, scoped handles and how we can use them in Windows programming - example of usage
#include "stdafx.h" #include <iostream> #include "scoped_handle.h" using namespace std; // Implementation of "countof" obtained from http://blogs.msdn.com/the1/archive/2004/05/07/128242.aspx template < typename T, size_t N> char (&_ArraySizeHelper(T Read More...
STL functors, scoped handles and how we can use them in Windows programming - scoped_handle
#pragma once #include <memory> #include <cassert> template < typename HANDLE_TYPE, HANDLE_TYPE UNDEFINED_VALUE> class scoped_handle { private : class invoker_base { public : virtual ~invoker_base() {} public : virtual void invoke(HANDLE_TYPE Read More...
STL functors, scoped handles and how we can use them in Windows programming
Firstly, it's election day so get out there and vote! Secondly, I went to bed last night and dreamt about functors! Last Friday I code-reviewed some changes made by one of my colleagues and his code just happened to use some STL containers and all sorts Read More...
Page view tracker