Click here to Skip to main content
12,504,984 members (66,118 online)
Click here to Skip to main content

Stats

113.2K views
2K downloads
50 bookmarked
Posted

Web Win32/WTL Hybrid

, 22 Dec 2005
How to implement a two-way communication path from IExplorer and WTL code
html
res
toolbar.bmp
WebWin32Sample.exe.manifest
WebWin32Sample.ico
WebWin32SampleDoc.ico
WebWin32EventHandler.rgs
WebWin32HTMLEventHandler.rgs
WebWin32Lib.rgs
WebWin32Sample.rgs
WebWin32Sampleps.def
WebWin32Sampleps.mk
toolbar.bmp
WebWin32Sample.exe.manifest
WebWin32Sample.ico
WebWin32Sampledoc.ico
WebWin32Sampleps.def
WebWin32Sample.dsp
WebWin32Sample.dsw
WebWin32Sampleps.mk
WebWin32Sample.opt
WebWin32Sample.plg
QQQQ.rgs
WebWin32EventHandler.rgs
WebWin32HTMLEventHandler.rgs
WebWin32Lib.rgs
WebWin32Sample.rgs
WebWin32Sample.idl.seg
WebWin32Sample.tlb
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#pragma once

// Change these values to use different versions
#define WINVER		0x0400
#define _WIN32_WINNT	0x0400
#define _WIN32_IE	0x0400
#define _RICHEDIT_VER	0x0100

#define _ATL_APARTMENT_THREADED

#include <atlbase.h>
#include <atlapp.h>
#include <comdef.h>



class CMyServerAppModule : public CServerAppModule 
{ 
	public:
	    CComPtr<IDispatch>		m_LibraryObject;

		CMyServerAppModule() 
		{
		}
		
		HRESULT InitObjectLibray( void )
		{
			HRESULT hr = S_OK;

			hr = m_LibraryObject.CoCreateInstance( _bstr_t("WebWin32Sample.WebWin32Lib.1") );

			if ( FAILED( hr ) )
				 MessageBox( 0, "Can't initialize internal COM Library\n\nNo object will be disponible","Critital", MB_ICONWARNING );

			return hr;
		}

		HRESULT DeInitObjectLibrary( void )
		{
			if ( m_LibraryObject )
				 m_LibraryObject.Release();

			return S_OK;
		}

};

extern CMyServerAppModule _Module;

// This is here only to tell VC7 Class Wizard this is an ATL project
#ifdef ___VC7_CLWIZ_ONLY___
CComModule
CExeModule
#endif

#include <atlcom.h>
#include <atlhost.h>
#include <atlwin.h>
#include <atlctl.h>

#include <atlframe.h>
#include <atlctrls.h>
#include <atldlgs.h>
#include <atlctrlw.h>

#include <atlmisc.h>


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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Jesus Salas
CEO wave-vs.net
Spain Spain
No Biography provided

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160919.1 | Last Updated 22 Dec 2005
Article Copyright 2002 by Jesus Salas
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid