Click here to Skip to main content
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
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.
IErrorInfo in C# client "ControlRoom.exe" on CE device
------------------------------------------------------
0x0005DDE0  70 11 8e 03 50 11 8e 03  p.�.P.�.
0x0005DDE8  01 00 00 00 77 a5 3f 24  ....w�?$  0x0005DDE8 = RefCount = 0x01
0x0005DDF0  c3 ce ac 4f a1 11 3f 17  �άO�.?.  0x0005DDEC = IID_IGate = {0x243FA577,0xCEC3,0x4FAC,{0xA1,0x11,0x3F,0x17,0x5B,0xDD,0xEC,0xA1}};
0x0005DDF8  5b dd ec a1 88 de 05 00  [�졈�..  0x0005DDFC = [0x0005DE88] = Source
0x0005DE00  28 de 05 00 c8 de 05 00  (�..��..  0x0005DE00 = [0x0005DE28] = Description
0x0005DE08  34 12 00 00 00 00 00 00  4.......  0x0005DE04 = [0x0005DEC8] = Helpfile
0x0005DE10  00 00 00 00 00 00 00 00  ........  0x0005DE08 = Helpcontext = 0x1234
0x0005DE18  60 00 00 00 30 00 04 14  `...0...
0x0005DE20  72 74 73 62 42 00 00 00  rtsbB...  rtsb -> bstr, 0x42 = 66 = stringlength
0x0005DE28  4d 00 61 00 78 00 69 00  M.a.x.i.
0x0005DE30  6d 00 75 00 6d 00 20 00  m.u.m. .
0x0005DE38  61 00 6c 00 6c 00 6f 00  a.l.l.o.
0x0005DE40  77 00 65 00 64 00 20 00  w.e.d. .
0x0005DE48  63 00 68 00 65 00 76 00  c.h.e.v.
0x0005DE50  72 00 6f 00 6e 00 73 00  r.o.n.s.
0x0005DE58  20 00 65 00 78 00 63 00   .e.x.c.
0x0005DE60  65 00 65 00 64 00 65 00  e.e.d.e.
0x0005DE68  64 00 00 00 00 00 00 00  d.......
0x0005DE70  00 00 00 00 00 00 00 00  ........
0x0005DE78  40 00 00 00 30 00 04 14  @...0...
0x0005DE80  72 74 73 62 1e 00 00 00  rtsb....  rtsb -> bstr, 0x1E = 26 = stringlength
0x0005DE88  53 00 74 00 61 00 72 00  S.t.a.r.
0x0005DE90  47 00 61 00 74 00 65 00  G.a.t.e.
0x0005DE98  2e 00 47 00 61 00 74 00  ..G.a.t.
0x0005DEA0  65 00 2e 00 31 00 00 00  e...1...
0x0005DEA8  00 00 00 00 00 00 00 00  ........
0x0005DEB0  00 00 00 00 00 00 00 00  ........
0x0005DEB8  30 00 00 00 30 00 04 14  0...0...
0x0005DEC0  72 74 73 62 16 00 00 00  rtsb....  rtsb -> bstr, 0x16 = 22 = stringlength
0x0005DEC8  4e 00 6f 00 20 00 68 00  N.o. .h.
0x0005DED0  65 00 6c 00 70 00 66 00  e.l.p.f.
0x0005DED8  69 00 6c 00 65 00 00 00  i.l.e...
0x0005DEE0  00 00 00 00 00 00 00 00  ........
0x0005DEE8  f0 fe ff ff 30 00 04 14  ����0...
0x0005DEF0  00 00 00 00 00 00 00 00  ........
0x0005DEF8  00 00 00 00 00 00 00 00  ........
0x0005DF00  00 00 00 00 00 00 00 00  ........
0x0005DF08  00 00 00 00 00 00 00 00  ........


EtherReal dump with C# client "ControlRoom.exe" on XP
-----------------------------------------------------
0010  01 98 1f 8e 40 00 80 06  53 f1 c0 a8 02 30 c0 a8   ....@... S....0..
0020  02 60 04 03 05 ef 36 ac  fe b8 33 09 69 fd 50 18   .`....6. ..3.i.P.
0030  81 dc ce 5f 00 00 05 00  02 03 10 00 00 00 70 01   ..._.... ......p.
0040  10 00 13 00 00 00 34 01  00 00 04 00 00 00 00 00   ......4. ........
0050  00 00 53 68 64 77 01 00  00 00 00 00 00 00 53 74   ..Shdw.. ......St
0060  72 6d 02 00 00 00 44 4b  61 79 00 00 00 00 f8 00   rm....DK ay......
0070  00 00 1c 03 00 00 00 00  00 00 c0 00 00 00 00 00   ........ ........
0080  00 46 f8 00 00 00 4d 45  4f 57 04 00 00 00 00 00   .F....ME OW......
0090  00 00 00 00 00 00 c0 00  00 00 00 00 00 46 1b 03   ........ .....F..
00a0  00 00 00 00 00 00 c0 00  00 00 00 00 00 46 00 00   ........ .....F..
00b0  00 00 c4 00 00 00 00 00  00 00 34 12 00 00 77 a5   ........ ..4...w.
00c0  3f 24 c3 ce ac 4f a1 11  3f 17 5b dd ec a1 ff ff   ?$...O.. ?.[.....
00d0  ff ff 10 00 00 00 00 00  00 00 10 00 00 00 53 00   ........ ......S.
00e0  74 00 61 00 72 00 47 00  61 00 74 00 65 00 2e 00   t.a.r.G. a.t.e...
00f0  47 00 61 00 74 00 65 00  2e 00 31 00 00 00 ff ff   G.a.t.e. ..1.....
0100  ff ff 22 00 00 00 00 00  00 00 22 00 00 00 4d 00   .."..... .."...M.
0110  61 00 78 00 69 00 6d 00  75 00 6d 00 20 00 61 00   a.x.i.m. u.m. .a.
0120  6c 00 6c 00 6f 00 77 00  65 00 64 00 20 00 63 00   l.l.o.w. e.d. .c.
0130  68 00 65 00 76 00 72 00  6f 00 6e 00 73 00 20 00   h.e.v.r. o.n.s. .
0140  65 00 78 00 63 00 65 00  65 00 64 00 65 00 64 00   e.x.c.e. e.d.e.d.
0150  00 00 ff ff ff ff 0c 00  00 00 00 00 00 00 0c 00   ........ ........
0160  00 00 4e 00 6f 00 20 00  68 00 65 00 6c 00 70 00   ..N.o. . h.e.l.p.
0170  66 00 69 00 6c 00 65 00  00 00 0d f0 ad ba e8 03   f.i.l.e. ........
0180  04 80 00 00 00 00 00 00  00 00 00 00 00 00 0a 02   ........ ........
0190  0c 00 38 f2 1b 00 01 00  00 00 00 00 00 00 00 00   ..8..... ........
01a0  00 00 00 00 00 00                                  ......           

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

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