Click here to Skip to main content
12,302,764 members (73,750 online)
Click here to Skip to main content

Stats

64.8K views
417 downloads
40 bookmarked
Posted

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

, 17 Apr 2006 CPOL
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="StarGate"
	ProjectGUID="{2C4557D0-31B9-438A-9CEA-4AD0F97FFFA5}"
	RootNamespace="StarGate"
	Keyword="AtlProj"
	>
	<Platforms>
		<Platform
			Name="DSM52 (x86)"
		/>
	</Platforms>
	<ToolFiles>
	</ToolFiles>
	<Configurations>
		<Configuration
			Name="Debug|DSM52 (x86)"
			OutputDirectory="Debug"
			IntermediateDirectory="Debug"
			ConfigurationType="1"
			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="CEStarGate.tlb"
				OutputDirectory="Generated"
				HeaderFileName="StarGate.h"
				DLLDataFileName=""
				InterfaceIdentifierFileName="StarGate_i.c"
				ProxyFileName="StarGate_p.c"
			/>
			<Tool
				Name="VCCLCompilerTool"
				ExecutionBucket="7"
				Optimization="0"
				AdditionalIncludeDirectories=".\Generated"
				PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;_CE_DCOM;DEBUG;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;STANDARDSHELL_UI_MODEL"
				MinimalRebuild="true"
				RuntimeLibrary="1"
				UsePrecompiledHeader="2"
				WarningLevel="3"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE"
				Culture="1033"
				AdditionalIncludeDirectories="Generated"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				RegisterOutput="false"
				IgnoreImportLibrary="true"
				AdditionalOptions=" /subsystem:windowsce,5.00"
				OutputFile="$(OutDir)/StarGate.exe"
				LinkIncremental="2"
				GenerateDebugInformation="true"
				SubSystem="0"
				ImportLibrary="$(OutDir)/StarGate.lib"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCCodeSignTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Create desktop (XP) and CE type library for use in C#"
				CommandLine="MIDL .\src\$(TargetName).idl /D &quot;NDEBUG&quot;                           /nologo /char signed /env win32 /Oicf  /tlb &quot;XPStarGate.tlb&quot; /out &quot;Generated&quot;&#x0D;&#x0A;MIDL .\src\$(TargetName).idl /D &quot;NDEBUG&quot; /D &quot;UNDER_CE&quot; /nologo /char signed /env win32 /Oicf  /tlb &quot;CEStarGate.tlb&quot; /out &quot;Generated&quot;"
			/>
			<DeploymentTool
				ForceDirty="-1"
				RemoteDirectory="\"
				RegisterOutput="0"
				AdditionalFiles=""
			/>
			<DebuggerTool
			/>
		</Configuration>
		<Configuration
			Name="Release|DSM52 (x86)"
			OutputDirectory="Release"
			IntermediateDirectory="Release"
			ConfigurationType="1"
			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="CEStarGate.tlb"
				OutputDirectory="Generated"
				HeaderFileName="StarGate.h"
				DLLDataFileName=""
				InterfaceIdentifierFileName="StarGate_i.c"
				ProxyFileName="StarGate_p.c"
			/>
			<Tool
				Name="VCCLCompilerTool"
				ExecutionBucket="7"
				Optimization="2"
				AdditionalIncludeDirectories=".\Generated"
				PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;_CE_DCOM;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;STANDARDSHELL_UI_MODEL"
				RuntimeLibrary="0"
				UsePrecompiledHeader="2"
				WarningLevel="3"
				DebugInformationFormat="3"
			/>
			<Tool
				Name="VCManagedResourceCompilerTool"
			/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE"
				Culture="1033"
				AdditionalIncludeDirectories="Generated"
			/>
			<Tool
				Name="VCPreLinkEventTool"
			/>
			<Tool
				Name="VCLinkerTool"
				RegisterOutput="false"
				IgnoreImportLibrary="true"
				AdditionalOptions=" /subsystem:windowsce,5.00"
				OutputFile="$(OutDir)/StarGate.exe"
				LinkIncremental="1"
				GenerateDebugInformation="true"
				SubSystem="0"
				OptimizeReferences="2"
				EnableCOMDATFolding="2"
				ImportLibrary="$(OutDir)/StarGate.lib"
			/>
			<Tool
				Name="VCALinkTool"
			/>
			<Tool
				Name="VCXDCMakeTool"
			/>
			<Tool
				Name="VCBscMakeTool"
			/>
			<Tool
				Name="VCCodeSignTool"
			/>
			<Tool
				Name="VCPostBuildEventTool"
				Description="Create desktop (XP) and CE type library for use in C#"
				CommandLine="MIDL .\src\$(TargetName).idl /D &quot;NDEBUG&quot;                           /nologo /char signed /env win32 /Oicf  /tlb &quot;XPStarGate.tlb&quot; /out &quot;Generated&quot;&#x0D;&#x0A;MIDL .\src\$(TargetName).idl /D &quot;NDEBUG&quot; /D &quot;UNDER_CE&quot; /nologo /char signed /env win32 /Oicf  /tlb &quot;CEStarGate.tlb&quot; /out &quot;Generated&quot;"
			/>
			<DeploymentTool
				ForceDirty="-1"
				RemoteDirectory=""
				RegisterOutput="0"
				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\Error.cpp"
				>
			</File>
			<File
				RelativePath=".\Src\Gate.cpp"
				>
			</File>
			<File
				RelativePath=".\Src\ISupportErrorInfo.idl"
				>
				<FileConfiguration
					Name="Debug|DSM52 (x86)"
					>
					<Tool
						Name="VCMIDLTool"
						GenerateTypeLibrary="false"
						TypeLibraryName="ISupportErrorInfo.tlb"
						HeaderFileName="ISupportErrorInfoPS.h"
						InterfaceIdentifierFileName="ISupportErrorInfoPS_i.c"
						ProxyFileName="ISupportErrorInfoPS_p.c"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|DSM52 (x86)"
					>
					<Tool
						Name="VCMIDLTool"
						GenerateTypeLibrary="false"
						TypeLibraryName="ISupportErrorInfo.tlb"
						HeaderFileName="ISupportErrorInfoPS.h"
						InterfaceIdentifierFileName="ISupportErrorInfoPS_i.c"
						ProxyFileName="ISupportErrorInfoPS_p.c"
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath=".\Src\Notifier.cpp"
				>
			</File>
			<File
				RelativePath=".\Src\StarGate.cpp"
				>
			</File>
			<File
				RelativePath=".\Src\StarGate.idl"
				>
				<FileConfiguration
					Name="Debug|DSM52 (x86)"
					>
					<Tool
						Name="VCMIDLTool"
						TypeLibraryName="StarGate.tlb"
						HeaderFileName="StarGatePS.h"
						InterfaceIdentifierFileName="StarGatePS_i.c"
						ProxyFileName="StarGatePS_p.c"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|DSM52 (x86)"
					>
					<Tool
						Name="VCMIDLTool"
						TypeLibraryName="StarGate.tlb"
						HeaderFileName="StarGatePS.h"
						InterfaceIdentifierFileName="StarGatePS_i.c"
						ProxyFileName="StarGatePS_p.c"
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath=".\Src\stdafx.cpp"
				>
				<FileConfiguration
					Name="Debug|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"
					/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|DSM52 (x86)"
					>
					<Tool
						Name="VCCLCompilerTool"
						UsePrecompiledHeader="1"
					/>
				</FileConfiguration>
			</File>
			<File
				RelativePath=".\Src\Workerthread.cpp"
				>
			</File>
		</Filter>
		<Filter
			Name="Header Files"
			Filter="h;hpp;hxx;hm;inl;inc;xsd"
			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
			>
			<File
				RelativePath=".\Src\_IGateEvents_CP.h"
				>
			</File>
			<File
				RelativePath=".\Src\Error.h"
				>
			</File>
			<File
				RelativePath=".\Src\Gate.h"
				>
			</File>
			<File
				RelativePath=".\Src\Message.h"
				>
			</File>
			<File
				RelativePath=".\Src\Notifier.h"
				>
			</File>
			<File
				RelativePath=".\Src\resource.h"
				>
			</File>
			<File
				RelativePath=".\Src\stdafx.h"
				>
			</File>
			<File
				RelativePath=".\Src\Workerthread.h"
				>
			</File>
		</Filter>
		<Filter
			Name="Resource Files"
			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
			>
			<File
				RelativePath=".\Src\GateDCOM.rgs"
				>
			</File>
			<File
				RelativePath=".\Src\StarGate.rc"
				>
			</File>
			<File
				RelativePath=".\Src\StarGatedcom.rgs"
				>
			</File>
		</Filter>
		<Filter
			Name="Generated"
			>
			<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>
		</Filter>
		<File
			RelativePath=".\Src\Memory dumps.txt"
			>
		</File>
		<File
			RelativePath=".\Src\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)

Share

About the Author

Werner Willemsens
Team Leader
Belgium Belgium
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160530.1 | Last Updated 17 Apr 2006
Article Copyright 2006 by Werner Willemsens
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid