Click here to Skip to main content
15,867,488 members
Articles / Programming Languages / C#

Building COM Servers in .NET

Rate me:
Please Sign up or sign in to vote.
4.87/5 (95 votes)
2 Feb 2006CPOL98 min read 456.9K   3.9K   301  
Learn the fundamental principles of building COM DLL and EXE Servers using a .NET language.
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="7.10"
	Name="SimpleCOMObject_CPPImpl"
	ProjectGUID="{A46E15EA-62DD-4D3A-93CC-E80C54913A58}"
	Keyword="AtlProj">
	<Platforms>
		<Platform
			Name="Win32"/>
	</Platforms>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="Debug"
			IntermediateDirectory="Debug"
			ConfigurationType="2"
			UseOfATL="1"
			ATLMinimizesCRunTimeLibraryUsage="FALSE"
			CharacterSet="2">
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="..\..\..\interfaces\SimpleCOMObject"
				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL"
				MinimalRebuild="FALSE"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				RuntimeTypeInfo="TRUE"
				UsePrecompiledHeader="3"
				BrowseInformation="1"
				WarningLevel="3"
				Detect64BitPortabilityProblems="TRUE"
				DebugInformationFormat="3"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLinkerTool"
				IgnoreImportLibrary="TRUE"
				OutputFile="$(OutDir)/SimpleCOMObject_CPPImpl.dll"
				LinkIncremental="1"
				ModuleDefinitionFile=".\SimpleCOMObject_CPPImpl.def"
				GenerateDebugInformation="TRUE"
				GenerateMapFile="TRUE"
				MapExports="TRUE"
				MapLines="TRUE"
				SubSystem="2"
				ImportLibrary="$(OutDir)/SimpleCOMObject_CPPImpl.lib"
				TargetMachine="1"/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="_DEBUG"
				AdditionalIncludeDirectories="..\..\..\interfaces\SimpleCOMObject"
				MkTypLibCompatible="FALSE"
				TargetEnvironment="1"
				GenerateStublessProxies="TRUE"
				TypeLibraryName="$(IntDir)/SimpleCOMObject_CPPImpl.tlb"
				HeaderFileName="SimpleCOMObject_CPPImpl.h"
				DLLDataFileName=""
				InterfaceIdentifierFileName="SimpleCOMObject_CPPImpl_i.c"
				ProxyFileName="SimpleCOMObject_CPPImpl_p.c"/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Performing registration"
				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
			<Tool
				Name="VCPreBuildEventTool"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_DEBUG"
				Culture="1033"
				AdditionalIncludeDirectories="$(IntDir)"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCXMLDataGeneratorTool"/>
			<Tool
				Name="VCWebDeploymentTool"/>
			<Tool
				Name="VCManagedWrapperGeneratorTool"/>
			<Tool
				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="Release"
			IntermediateDirectory="Release"
			ConfigurationType="2"
			UseOfATL="1"
			ATLMinimizesCRunTimeLibraryUsage="FALSE"
			CharacterSet="2">
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="..\..\..\interfaces\SimpleCOMObject"
				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL"
				MinimalRebuild="FALSE"
				RuntimeLibrary="2"
				RuntimeTypeInfo="TRUE"
				UsePrecompiledHeader="3"
				BrowseInformation="1"
				WarningLevel="3"
				Detect64BitPortabilityProblems="TRUE"
				DebugInformationFormat="3"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLinkerTool"
				IgnoreImportLibrary="TRUE"
				OutputFile="$(OutDir)/SimpleCOMObject_CPPImpl.dll"
				LinkIncremental="1"
				ModuleDefinitionFile=".\SimpleCOMObject_CPPImpl.def"
				GenerateDebugInformation="TRUE"
				GenerateMapFile="TRUE"
				MapExports="TRUE"
				MapLines="TRUE"
				SubSystem="2"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"
				ImportLibrary="$(OutDir)/SimpleCOMObject_CPPImpl.lib"
				TargetMachine="1"/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="NDEBUG"
				AdditionalIncludeDirectories="..\..\..\interfaces\SimpleCOMObject"
				MkTypLibCompatible="FALSE"
				TargetEnvironment="1"
				GenerateStublessProxies="TRUE"
				TypeLibraryName="$(IntDir)/SimpleCOMObject_CPPImpl.tlb"
				HeaderFileName="SimpleCOMObject_CPPImpl.h"
				DLLDataFileName=""
				InterfaceIdentifierFileName="SimpleCOMObject_CPPImpl_i.c"
				ProxyFileName="SimpleCOMObject_CPPImpl_p.c"/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Performing registration"
				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
			<Tool
				Name="VCPreBuildEventTool"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="NDEBUG"
				Culture="1033"
				AdditionalIncludeDirectories="$(IntDir)"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCXMLDataGeneratorTool"/>
			<Tool
				Name="VCWebDeploymentTool"/>
			<Tool
				Name="VCManagedWrapperGeneratorTool"/>
			<Tool
				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
			<File
				RelativePath=".\SimpleCOMObject_CPPImpl.cpp">
			</File>
			<File
				RelativePath=".\SimpleCOMObject_CPPImpl.def">
			</File>
			<File
				RelativePath=".\SimpleCOMObject_CPPImpl.idl">
			</File>
			<File
				RelativePath=".\SimpleCOMObject_CPPImpl_.cpp">
			</File>
			<File
				RelativePath=".\stdafx.cpp">
				<FileConfiguration
					Name="Debug|Win32">
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32">
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"/>
				</FileConfiguration>
			</File>
		</Filter>
		<Filter
			Name="Header Files"
			Filter="h;hpp;hxx;hm;inl;inc;xsd"
			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
			<File
				RelativePath=".\_ISimpleCOMObject_CPPImplEvents_CP.h">
			</File>
			<File
				RelativePath=".\Resource.h">
			</File>
			<File
				RelativePath=".\SimpleCOMObject_CPPImpl_.h">
			</File>
			<File
				RelativePath=".\stdafx.h">
			</File>
		</Filter>
		<Filter
			Name="Resource Files"
			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
			<File
				RelativePath=".\SimpleCOMObject_CPPImpl.rc">
			</File>
			<File
				RelativePath=".\SimpleCOMObject_CPPImpl.rgs">
			</File>
			<File
				RelativePath=".\SimpleCOMObject_CPPImpl1.rgs">
			</File>
		</Filter>
		<Filter
			Name="Generated Files"
			SourceControlFiles="FALSE">
			<File
				RelativePath=".\SimpleCOMObject_CPPImpl_i.c">
				<FileConfiguration
					Name="Debug|Win32">
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32">
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"/>
				</FileConfiguration>
			</File>
		</Filter>
		<File
			RelativePath=".\ReadMe.txt">
		</File>
	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>

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
Systems Engineer NEC
Singapore Singapore
Lim Bio Liong is a Specialist at a leading Software House in Singapore.

Bio has been in software development for over 10 years. He specialises in C/C++ programming and Windows software development.

Bio has also done device-driver development and enjoys low-level programming. Bio has recently picked up C# programming and has been researching in this area.

Comments and Discussions