Page #71 (Object Context)

< BACK  NEXT >
[oR]

Call Context

When servicing a method call, the object may want to get more information about its caller. One reason is to check the caller s credentials.

The object context stores information only about the context of the object. It doesn t store the caller s information.

To address this problem, COM+ defines and associates a context to the current method call. A method can obtain this call context by calling the API CoGetCallContext. The following is its prototype:

 WINOLEAPI CoGetCallContext( /*IN*/ REFIID riid,    /*OUT*/ void **ppInterface ); 

A call context supports many interfaces. Parameter riid specifies the IID of the requested interface. The interfaces that are of interest to us are IServerSecurity and ISecurityCallContext. We will cover both these interfaces in detail in Chapter 7.


< BACK  NEXT >


COM+ Programming. A Practical Guide Using Visual C++ and ATL
COM+ Programming. A Practical Guide Using Visual C++ and ATL
ISBN: 130886742
EAN: N/A
Year: 2000
Pages: 129

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net