Click here to Skip to main content
15,860,844 members
Articles / Mobile Apps / Windows Mobile

Bringing DCOM remoting functionality to Windows CE and .NET CF2.0

Rate me:
Please Sign up or sign in to vote.
4.93/5 (11 votes)
17 Apr 2006CPOL14 min read 96.5K   513   40  
This article shows how to use DCOM on Windows CE 5.0. We will add full DCOM rich error information, and implement a DCOM interface between a Windows XP .NET 2.0 client and Windows CE DCOM server. With this code, it is possible to code .NET remoting alike functionality through DCOM interop.
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="8.00"
	Name="StargatePS"
	ProjectGUID="{865A4D5A-3E30-4291-8CBA-DC464D04F6FD}"
	RootNamespace="StargatePS"
	Keyword="AtlProj"
	>
	<Platforms>
		<Platform
			Name="DSM52 (x86)"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|DSM52 (x86)"
			OutputDirectory="Debug"
			IntermediateDirectory="Debug"
			ConfigurationType="2"
			UseOfATL="1"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE"
				MkTypLibCompatible="false"
				GenerateStublessProxies="true"
				TypeLibraryName="$(IntDir)/StargatePS.tlb"
				HeaderFileName="StargatePS.h"
				DLLDataFileName=""
				InterfaceIdentifierFileName="StargatePS_i.c"
				ProxyFileName="StargatePS_p.c"
			/>
			<Tool
				Name="VCCLCompilerTool"
				ExecutionBucket="7"
				Optimization="0"
				AdditionalUsingDirectories=""
				PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;_CE_DCOM;DEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;STANDARDSHELL_UI_MODEL;WINVER=$(CEVER);REGISTER_PROXY_DLL;WIN32"
				MinimalRebuild="true"
				RuntimeLibrary="1"
				UsePrecompiledHeader="2"
				ProgramDataBaseFileName="$(IntDir)/vc80ps.pdb"
				WarningLevel="3"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE"
				Culture="1033"
				AdditionalIncludeDirectories="$(IntDir)"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				RegisterOutput="false"
				IgnoreImportLibrary="true"
				AdditionalOptions=" /subsystem:windowsce,5.00"
				AdditionalDependencies="rpcrt4.lib comsuppwd.lib libcmtd.lib"
				OutputFile="$(OutDir)/StargatePS.dll"
				LinkIncremental="2"
				IgnoreAllDefaultLibraries="false"
				ModuleDefinitionFile=".\Src\StargatePS.def"
				GenerateDebugInformation="true"
				SubSystem="0"
				EntryPointSymbol="_NewDllMainCRTStartup"
				ImportLibrary="$(OutDir)/StargatePS.lib"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCCodeSignTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
			<DeploymentTool
				ForceDirty="-1"
				RemoteDirectory="\"
				RegisterOutput="-1"
				AdditionalFiles=""
			/>
			<DebuggerTool
			/>
		</Configuration>
		<Configuration
			Name="Release|DSM52 (x86)"
			OutputDirectory="Release"
			IntermediateDirectory="Release"
			ConfigurationType="2"
			UseOfATL="1"
			ATLMinimizesCRunTimeLibraryUsage="false"
			CharacterSet="1"
			>
			<Tool
				Name="VCPreBuildEventTool"
			/>
			<Tool
				Name="VCCustomBuildTool"
			/>
			<Tool
				Name="VCXMLDataGeneratorTool"
			/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"
			/>
			<Tool
				Name="VCMIDLTool"
				PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE"
				MkTypLibCompatible="false"
				GenerateStublessProxies="true"
				TypeLibraryName="$(IntDir)/StargatePS.tlb"
				HeaderFileName="StargatePS.h"
				DLLDataFileName=""
				InterfaceIdentifierFileName="StargatePS_i.c"
				ProxyFileName="StargatePS_p.c"
			/>
			<Tool
				Name="VCCLCompilerTool"
				ExecutionBucket="7"
				Optimization="2"
				PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;_CE_DCOM;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;STANDARDSHELL_UI_MODEL;WINVER=$(CEVER);REGISTER_PROXY_DLL;WIN32"
				RuntimeLibrary="0"
				UsePrecompiledHeader="2"
				ProgramDataBaseFileName="$(IntDir)/vc80ps.pdb"
				WarningLevel="3"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE"
				Culture="1033"
				AdditionalIncludeDirectories="$(IntDir)"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				RegisterOutput="false"
				IgnoreImportLibrary="true"
				AdditionalOptions=" /subsystem:windowsce,5.00"
				AdditionalDependencies="rpcrt4.lib comsuppwd.lib libcmtd.lib"
				OutputFile="$(OutDir)/StargatePS.dll"
				LinkIncremental="1"
				IgnoreAllDefaultLibraries="false"
				ModuleDefinitionFile=".\Src\StargatePS.def"
				GenerateDebugInformation="true"
				SubSystem="0"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"
				EntryPointSymbol="_NewDllMainCRTStartup"
				ImportLibrary="$(OutDir)/StargatePS.lib"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCCodeSignTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
			/>
			<DeploymentTool
				ForceDirty="-1"
				RemoteDirectory=""
				RegisterOutput="-1"
				AdditionalFiles=""
			/>
			<DebuggerTool
			/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
			>
			<File
				RelativePath=".\Src\ChannelHook.cpp"
				>
				<FileConfiguration
					Name="Debug|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath=".\Src\ChannelHook.h"
				>
			</File>
			<File
				RelativePath=".\generated\dlldata.c"
				>
				<FileConfiguration
					Name="Debug|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath=".\generated\ISupportErrorInfoPS.h"
				>
			</File>
			<File
				RelativePath=".\generated\ISupportErrorInfoPS_i.c"
				>
				<FileConfiguration
					Name="Debug|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath=".\generated\ISupportErrorInfoPS_p.c"
				>
				<FileConfiguration
					Name="Debug|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath=".\Src\NewPSEntry.cpp"
				>
				<FileConfiguration
					Name="Debug|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath=".\Src\StarGatePS.def"
				>
			</File>
			<File
				RelativePath=".\generated\StarGatePS.h"
				>
			</File>
			<File
				RelativePath=".\generated\StarGatePS_i.c"
				>
				<FileConfiguration
					Name="Debug|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath=".\generated\StarGatePS_p.c"
				>
				<FileConfiguration
					Name="Debug|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="0"
					/>
				</FileConfiguration>
			</File>
		</Filter>
	</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
Team Leader
Belgium Belgium
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions