Click here to Skip to main content
11,633,969 members (72,011 online)
Click here to Skip to main content
Add your own
alternative version

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

, 17 Apr 2006 CPOL 62.6K 400 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.
//  Copyright (C) 2006 Werner Willemsens

// StarGate.cpp : Implementation of WinMain

#include "stdafx.h"

#include "resource.h"

#include "StarGatePS.h"

class CStarGateModule : public CAtlExeModuleT< CStarGateModule >
public :
#ifdef _CE_DCOM

CStarGateModule _AtlModule;
HINSTANCE g_hInstance;

#include "notifier.h"
extern CNotifier *g_TheNotifier;
extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, 
                                LPTSTR /*lpCmdLine*/, int nShowCmd)
	g_hInstance = hInstance;

	// Create the global Notifier (with workerthread) 
	// which we need when events need to be fired back asynchronously to the client
	g_TheNotifier = new CNotifier();

    int Ret = _AtlModule.WinMain(nShowCmd);

	// Delete Notifier (with workerthread)
	delete g_TheNotifier;

	return Ret;

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.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


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.150728.1 | Last Updated 17 Apr 2006
Article Copyright 2006 by Werner Willemsens
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid