// NameWnd.cpp : implementation file
//

#include "stdafx.h"
#include "client.h"
#include <occimpl.h>
#include "NameWnd.h"
//ndef _AFX_NO_OCC_SUPPORT

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CNameWnd

CNameWnd::CNameWnd()
{
}

CNameWnd::~CNameWnd()
{
}

HRESULT CNameWnd::GetIDOfName (CString &Name, DISPID *pDispIdOut) 
{
	DISPID id ;

	WCHAR wName [256], *pNames ;

	MultiByteToWideChar (CP_ACP, 0, (LPCTSTR)Name, -1,
		wName, sizeof(wName)/sizeof(WCHAR)) ;

	pNames = wName ;

	HRESULT hr = m_pCtrlSite->m_dispDriver.m_lpDispatch->GetIDsOfNames(
		IID_NULL, &pNames, 1, LOCALE_SYSTEM_DEFAULT, &id) ;
	
	*pDispIdOut = id ;
	return hr ;
}


BEGIN_MESSAGE_MAP(CNameWnd, CWnd)
	//{{AFX_MSG_MAP(CNameWnd)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CNameWnd message handlers
