Re: Multiple connection points and memory handling

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"arun" <spaace@xxxxxxxxx> wrote in message
news:1120624106.701270.21810@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> My Vairants[in, out] would have arrays in them, which i think would
> qualify as embedded pointers. So when the server calls the clients who
> have implemented the sinks, the embedded memory, would have to be
> freed by the client (right ?)

[in, out] parameters do require special handling - see Alexander's reply
and the article he refers you to. There's also a tricky semantic
question - if you have two event handlers, and the two return different
values through the [out] parameters, you have to figure out how to
process this data.

> I was considering this a bit messy and i was wondering whether its ok
> to assume the luxury of having only 1 client per connection point so
> that i need not handle this mess within a big fat loop.

You can actually enforce "one client" limit if you want. In the
generated proxy code, find where it derives from
IConnectionPointImpl<SomeClass, &DIID>. Add a third template parameter
of CComUnkArray<1> (the default value is CComDynamicUnkArray which can
hold an arbitrary number of pointers). Now a second client calling
Advise would get CONNECT_E_ADVISELIMIT error.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.



Relevant Pages

  • Re: Closing socket without sending FIN?
    ... I'm writing a server program and would ... Linux iptables lets you qualify a rule with --tcp-flags FIN FIN, ... and the IP address of the client. ...
    (comp.unix.programmer)
  • Re: What doesnt lend itself to OO?
    ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
    (comp.object)
  • This is going straight to the pool room
    ... or not the client has privilege to do what they're trying to do, ... The server environment is this: ... 3GL User action Routines that Tier3 will execute on your behalf during the ... Routine Name: USER_INIT ...
    (comp.os.vms)
  • [Full-Disclosure] R: Full-Disclosure Digest, Vol 3, Issue 42
    ... Full-Disclosure Digest, Vol 3, Issue 42 ... SD Server 4.0.70 Directory Traversal Bug ... Arkeia Network Backup Client Remote Access ...
    (Full-Disclosure)
  • Re: What doesnt lend itself to OO?
    ... > rather than client code. ... no way to do that without also touching the object with clock semantics ... will not encapsulate both clock semantics and network semantics. ... The server can do whatever it wants ...
    (comp.object)