Click here to Skip to main content
15,886,806 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 458.6K   4K   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_CPPImplPS"
	ProjectGUID="{6AFB1F98-EDC3-43C6-9D8A-6961D7F6BBC5}"
	Keyword="AtlPSProj">
	<Platforms>
		<Platform
			Name="Win32"/>
	</Platforms>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory="DebugPS"
			IntermediateDirectory="DebugPS"
			ConfigurationType="2">
			<Tool
				Name="VCCLCompilerTool"
				PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0500;REGISTER_PROXY_DLL;_DEBUG"
				RuntimeLibrary="3"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib"
				ModuleDefinitionFile="SimpleCOMObject_CPPImplPS.def"/>
			<Tool
				Name="VCMIDLTool"/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Performing registration"
				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
			<Tool
				Name="VCPreBuildEventTool"
				Description="Checking for required files"
				CommandLine="if exist dlldata.c goto :END
echo Error: MIDL will not generate DLLDATA.C unless you have at least 1 interface in the main project.
Exit 1
:END
"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCXMLDataGeneratorTool"/>
			<Tool
				Name="VCWebDeploymentTool"/>
			<Tool
				Name="VCManagedWrapperGeneratorTool"/>
			<Tool
				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory="ReleasePS"
			IntermediateDirectory="ReleasePS"
			ConfigurationType="2">
			<Tool
				Name="VCCLCompilerTool"
				Optimization="3"
				PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0500;REGISTER_PROXY_DLL;NDEBUG"
				RuntimeLibrary="2"/>
			<Tool
				Name="VCCustomBuildTool"/>
			<Tool
				Name="VCLinkerTool"
				AdditionalDependencies="kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib"
				ModuleDefinitionFile="SimpleCOMObject_CPPImplPS.def"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"/>
			<Tool
				Name="VCMIDLTool"/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Performing registration"
				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
			<Tool
				Name="VCPreBuildEventTool"
				Description="Checking for required files"
				CommandLine="if exist dlldata.c goto :END
echo Error: MIDL will not generate DLLDATA.C unless you have at least 1 interface in the main project.
Exit 1
:END
"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"/>
			<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="">
		</Filter>
		<Filter
			Name="Generated Files"
			SourceControlFiles="FALSE">
			<File
				RelativePath=".\dlldata.c">
			</File>
			<File
				RelativePath=".\SimpleCOMObject_CPPImpl_i.c">
			</File>
			<File
				RelativePath=".\SimpleCOMObject_CPPImpl_p.c">
			</File>
		</Filter>
		<File
			RelativePath=".\SimpleCOMObject_CPPImplps.def">
		</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