Docsity

Analyzing Errors & Original Answers for COM & Distributed Objects in CSE 775 Midterm - Pro, Exams of Engineering

Toggle sidebar
bg1
CSE 775 โ€“ Distributed Objects Spring 2009
Midterm Makeup
Discuss each of the questions on the Midterm you took, analyzing the errors you made
and how they should be fixed. Please do not simply feedback the answers I provided
on my solutions, although you may use them to help you with the analysis.
When you have completed those questions, provide original answers to the following
10 questions:
1. Write the Interface Definition Language (IDL) for an interface with a single
function called fillArray that is passed an array reference by the client. Assume
that the client will declare a pointer to an array of doubles, and fillArray will
allocate memory for the array based on a size parameter passed by the client.
The fillArray function then fills the array with values for client use. How it does
that is not relevant to this question. What responsibilities does the client
assume when using this function?
2. Sketch the vtable structure for the interface defined in the previous problem.
3. Describe the steps taken by client, COM, and component when an in-process
component is activated.
4. How does COM ensure that interfaces carry no implementation detail? Why is it
important that COM interfaces are designed that way?
5. What is the importance in COM of the Single Threaded Apartment (STA)?
6. What role does the IUnknown interface play in the implementation of COM
objects?
7. Suppose that a COM component may receive asynchronous requests for service
from many concurrently running clients. Can the component safely use
facilities of a non-thread safe library? Please explain why or why not.
8. What is meant by the term marshaling?
9. What is COM? Describe its purpose, and main architectural features.
10. What classes would be required to build an automation component with the
Active Template Library?

Partial preview of the text

Download Analyzing Errors & Original Answers for COM & Distributed Objects in CSE 775 Midterm - Pro and more Exams Engineering in PDF only on Docsity!

CSE 775 โ€“ Distributed Objects Spring 2009

Midterm Makeup

Discuss each of the questions on the Midterm you took, analyzing the errors you made and how they should be fixed. Please do not simply feedback the answers I provided on my solutions, although you may use them to help you with the analysis. When you have completed those questions, provide original answers to the following 10 questions:

  1. Write the Interface Definition Language (IDL) for an interface with a single function called fillArray that is passed an array reference by the client. Assume that the client will declare a pointer to an array of doubles, and fillArray will allocate memory for the array based on a size parameter passed by the client. The fillArray function then fills the array with values for client use. How it does that is not relevant to this question. What responsibilities does the client assume when using this function?
  2. Sketch the vtable structure for the interface defined in the previous problem.
  3. Describe the steps taken by client, COM, and component when an in-process component is activated.
  4. How does COM ensure that interfaces carry no implementation detail? Why is it important that COM interfaces are designed that way?
  5. What is the importance in COM of the Single Threaded Apartment (STA)?
  6. What role does the IUnknown interface play in the implementation of COM objects?
  7. Suppose that a COM component may receive asynchronous requests for service from many concurrently running clients. Can the component safely use facilities of a non-thread safe library? Please explain why or why not.
  8. What is meant by the term marshaling?
  9. What is COM? Describe its purpose, and main architectural features.
  10. What classes would be required to build an automation component with the Active Template Library?