Click here to Skip to main content
15,884,099 members
Articles / Programming Languages / C++

Personal Finance Application

Rate me:
Please Sign up or sign in to vote.
4.38/5 (11 votes)
10 Jan 2007CPOL4 min read 87.8K   7.9K   68  
Utility to keep track of personal finances
#include "StdAfx.h"
#include "oleaccproxy.h"

extern "C" LRESULT _stdcall AccessibleObjectFromWindow(HWND hwnd, DWORD dwId, REFIID riid, void **ppvObject)
{
	COleaccProxy::Init();
	return COleaccProxy::m_pfnAccessibleObjectFromWindow ? COleaccProxy::m_pfnAccessibleObjectFromWindow(hwnd, dwId, riid, ppvObject) : 0;
}

extern "C" LRESULT _stdcall CreateStdAccessibleObject(HWND hwnd, LONG idObject, REFIID riid, void** ppvObject)
{
	COleaccProxy::Init();
	return COleaccProxy::m_pfnCreateStdAccessibleObject ? COleaccProxy::m_pfnCreateStdAccessibleObject(hwnd, idObject, riid, ppvObject) : 0;
}

extern "C" LRESULT _stdcall LresultFromObject(REFIID riid, WPARAM wParam, LPUNKNOWN punk)
{
	COleaccProxy::Init();
	return COleaccProxy::m_pfnLresultFromObject ? COleaccProxy::m_pfnLresultFromObject(riid, wParam, punk) : 0;
}

HMODULE COleaccProxy::m_hModule = NULL;
BOOL COleaccProxy::m_bFailed = FALSE;

pfnAccessibleObjectFromWindow COleaccProxy::m_pfnAccessibleObjectFromWindow = NULL;
pfnCreateStdAccessibleObject COleaccProxy::m_pfnCreateStdAccessibleObject = NULL;
pfnLresultFromObject COleaccProxy::m_pfnLresultFromObject = NULL;

COleaccProxy::COleaccProxy(void)
{
}

COleaccProxy::~COleaccProxy(void)
{
}

void COleaccProxy::Init(void)
{
	if (!m_hModule && !m_bFailed)
	{
		m_hModule = ::LoadLibrary(_T("oleacc.dll"));
		if (!m_hModule)
		{
			m_bFailed = TRUE;
			return;
		}

		m_pfnAccessibleObjectFromWindow = (pfnAccessibleObjectFromWindow)::GetProcAddress(m_hModule, _T("AccessibleObjectFromWindow"));
		m_pfnCreateStdAccessibleObject = (pfnCreateStdAccessibleObject)::GetProcAddress(m_hModule, _T("CreateStdAccessibleObject"));
		m_pfnLresultFromObject = (pfnLresultFromObject)::GetProcAddress(m_hModule, _T("LresultFromObject"));
	}
}

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
Software Developer
Argentina Argentina
System developer from Argentina.

Programmed in VB 5,6,.NET, C#, Java, PL-SQL, Transac-SQL, C, C++ and even some "calculator" language.

Love to build small, useful applications.
Usually building big and complicated apps based on solid, reliable components.

Hobbies: reading, photography, chess, paddle, running.

Comments and Discussions