Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Creating a host application for the .NET Common Language Runtime.

, 22 Oct 2001
This article explains how easy it is to write custom host applications for the .NET Common Language Runtime to run managed code.
simpleclrhost_demo.zip
Debug
SimpleCLRHost.dsp
SimpleCLRHost.dsw
System Requirements:
Win2k with the .NET Framework Beta2 installed.


Here are some things to note before running the sample:

1. The sample uses the header file mscoree.h  which is located typically in the 
   C:\PROGRAM FILES\MICROSOFT.NET\FRAMEWORKSDK\INCLUDE directory, 
   and so I chose to add that in my list of Include Paths through Tools-Options in Visual Studio.

2. It uses the MsCorLib.Tlb which provided Interface definitions used within the program,, 
   which is located typically in the path 
   C:\WINNT\Microsoft.NET\Framework\v1.0.2914\ for beta2 versions of the CLR. 
   I have hardcoded the path in th source, you may chose to include it in some global path.



========================================================================
       CONSOLE APPLICATION : SimpleCLRHost
========================================================================


AppWizard has created this SimpleCLRHost application for you.  

This file contains a summary of what you will find in each of the files that
make up your SimpleCLRHost application.

SimpleCLRHost.dsp
    This file (the project file) contains information at the project level and
    is used to build a single project or subproject. Other users can share the
    project (.dsp) file, but they should export the makefiles locally.

SimpleCLRHost.cpp
    This is the main application source file.


/////////////////////////////////////////////////////////////////////////////
Other standard files:

StdAfx.h, StdAfx.cpp
    These files are used to build a precompiled header (PCH) file
    named SimpleCLRHost.pch and a precompiled types file named StdAfx.obj.


/////////////////////////////////////////////////////////////////////////////
Other notes:

AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.

/////////////////////////////////////////////////////////////////////////////

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

Ranjeet Chakraborty
Web Developer
United States United States
I am originally from Mumbai, India, Currently living in Los Angeles doing Software Development. If there is something I miss here in LA, its the crazy Mumbai monsoon and delicious "wadapavs".
Apart from spending time writing software, I spend most of my time with XBox riding the Warthog and killing covenants in Halo.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150414.1 | Last Updated 23 Oct 2001
Article Copyright 2001 by Ranjeet Chakraborty
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid