Marshaling HDC

Any way to marshal handle to the device context to a
remote PC.
And is there any equivalent to CClientDC object of
MFC in ATL.


Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

> Any way to marshal handle to the device context to a

remote PC.

  1. Design a COM interface which will support all GDI drawing functionality.
  2. Design a way of passing GDI bitmaps (HBITMAP) over the network by means
    of DCOM. You will surely need custom by-value marshalling for this -
    “marshal” must extract the bits from GDI internals to the app’s buffer,
    “unmarshal” must build the GDI bitmap and set the bits to it.
  3. Do the same for pens, brushes, fonts and regions.
    Read the COM documentation on how the monikers are marshalled - they use
    by-value marshalling too.
    IIRC there were some MS’s interfaces and proxy/stub pairs to do all of
    this - possibly part of MSIE, possibly undocumented.

Using DCOM to provide the remote display functionality is really exciting
:slight_smile:

Max