高分大放送,高手请进

fht007 2000-08-01 11:12:00
小弟正在应考mcsd的70-16考试,近日获一bible,可惜没有答案,下面几道COM相关题目,百思不得其解,请高手指点迷津,给出答案.(只给出部分答案也行)
回信地址:fht007@263.net

1. You design a COM component for use by many user interface applications in your company. One of the interface methods for the component defines a parameter for an IP address as s string in the format nnn.nnn.nnn.nnn. The component's type library defines this parameter as both an input and an output parameter.
When the interface method is called,the component validates the IP address. If the current user is forbidden to access that address,then the component should change the parameter to the string 0.0.0.0 and display this string within the application.
Which type of COM component should you design?
A. data-aware class
B. distributed COM server component
C. out-of-process COM server component
D. ActiveX user interface Control

2. You are creating a COM component. Yor are using Platform SDK tools only,because you want to keep the component as small as possible. You have created an interface definition in a file name MyCom.idl. This file contains the component's interface GUIDs and class GUID.
You use the MIDL compiler to compile this file. The MIDL compiler generates one or more header and source files for your use.
Which element or elements must you write yourself?(choose all that apply)
A. constants for the interface GUIDs and class GUID
B. skeleton code for the interface
C. declaration of C++ class interface
D. declaration of the C interface
E. code to register the COM component

3. Yor write a loan processing application for SpringFirst Home Loans. Yor want to reuse two COM components from an existing application: a Customer object that encapsulates a customer's name and address, and a Loan object that encapsulates the principal amount, interest rate,loan period,and payment history.
You create a CustomerLoans object that aggregates the Customer object and maintains a list of Loan objects. A customer may have zero,one or many loans form SpringFirst Home Loans.
Which property or properties should the CustomerLoans object expose?(choose all that apply)
A. database server name
B. name of the control used to display loan amounts
C. customer name
D. number of active loans
E. principal amount of the first loan

4. Your company maintains a library of documents in a proprietary format on an intranet. You write an active document component to edit documents of this format.
To manage these documents, you will run the component in Microsoft Internet Explorer on your company's intranet. When a user clicks link to one of these documents, Internet Explorer will automatically launch your active document to edit it. You want to obtain in the active document the URL of the document that Internet Explorer has activated.
What must you do?
A. Call the IMoniker::RelativePathTo method
B. Implement the IOleLink::GetBoundSource method
C. Call the IMoniker::GetDisplayName method
D. Call the IOleClientSite::GetMoniker method
E. Implement the IOleObject::GetClientSite method

5. You write a COM component by using ATL. You want to add the following capabilities:
* the capability to notify the client application that an error condition has occurred
* the capability to copy trace information about errors to a logging file
* the capability to display information about errors in a message window
* the capability to display information about errors in a message box
* the capability to provide detailed information about an error
* the capability to notify the client application that detailed information is available when an error occurs
You take the following actions:
* Implement the IErrorInfo interface in your component
* Implement the ISupportErrorInfo interface in your component
Which capability or capabilities are added as a result of these actions?(choose all that apply)
A. the capability to notify the client application that an error condition has occurred
B. the capability to copy trace information about errors to a logging file
C. the capability to display information about errors in a message window
D. the capability to display information about errors in a message box
E. the capability to provide detailed information about an error
F. the capability to notify the client application that detailed information is available when an error occurs

6. Yor are implementing a COM component by using ATL. You plan to use ATL features wherever possible. You want to allow other COM components to reuse your component by aggregating it. Which three things must you do?(Choose three)
A. Declare an internal reference count for the component
B. Declare a pointer to the controlling IUnknown interface
C. Add the DECLARE_CLASSFACTROY macro to your calss
D. Override the FinalConstruct method
E. Override the FinalRelease method
F. Override the IClassFactory::CreateInstance method

7. You write a COM component by using Visual C++. The component supports the IManageSales interface, which your company has defined. The component is designed to support aggregation,and it provides a class factory object.
A client object makes a call to the CreateInstance function of the class factory object, requesting an instance of IManageSales interface. The client object passes a non-NULL pointer to the controlling unknown as a parameter of the CreateInstance call.
Which value must your component's QueryInterface function return?
A. a pointer to the IManageSales interface
B. a pointer to the IUnknown interface]
C. a NULL pointer
D. CLASS_E_NOAGGREGATION
E. CLASS_E_CALSSNOTAVAILABLE
F. S_OK

8. You are using Visual C++ to create a component that will provide information to several different client applications. Some of these applications have higher priority than others, and your component must prioritize requests for information.
How should you develop your component?
A. Develop your component to use HTTP to return information to client applications.
Use a persistent property in the HTTP request to set priority.
Pass information to client applications in order of priority
B. Develop your component as an ActiveX user interface control.
Add a Priority property to the control.
Pass information to the client applications in order of priority.
C. Develop your component as in-process COM server component that accepts a reference to a notification object from each client application.
Add a Priority property to this object.
Use asynchronous callbacks to pass information back to the client applications in order of priority.
D. Develop your component as out-of-process COM server component that accepts a reference to a notification object from each client application.
Add a Priority property to this object.
Use asynchronous callbacks to pass information back to the client applications in order of priority.

9. Your company is developing a new product by using the code base of an existing product. You are in charge of setting up Microsoft Visual SourceSafe for the new product's develper team. The previous team labeled their final build and enabled the shadow folder. Another team will continue development of the original product.
Which steps should you take to set up Visual SourceSafe?
A. Create a new project by using sharing.
Have your team use the newly created project.
B. Create a new project by using branching.
Have your team use the newly created project.
C. Back up the Visual sourceSafe data directory, and then restore the project to a new Visual SourceSafe server.
Have your team use the new server.
D. Back up the Visual sourceSafe shadow directory, and then restore the project to a new Visual SourceSafe server.
Have your team use the new server.

10. Yor are creating a multiuser Visual C++ application that interacts with a database. You are using ADO as a data access technology. Users holding a recordset must be able to see changes that other users make to that recordset. You want to minimize traffic between the application and the database when multiple recordsets are updated.
What should you do?
A. Use a dynamic cursor with optimistic batch locking.
B. Use a dynamic cursor with optimistic locking.
C. use a static cursor with optimistic batch locking.
D. Use a keyset cursor with optimistic locking.
E. Use a dynamic cursor with pessimistic locking.
F. Use a keyset cursor with optimistic batch locking.

...全文
221 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhq2000 2000-10-14
  • 打赏
  • 举报
回复
Would you send my a copy of BIBLE to me? I'm going to take MCSD Exams.
zhuiqing@china.com
zhq2000 2000-10-14
  • 打赏
  • 举报
回复
我也正在考MCSD,能把BIBLE E一份给我吗?zhuiqing@china.com
JGTM2000 2000-08-02
  • 打赏
  • 举报
回复
Just have a try for you as a reference. No warranty. hehe...

D,BE,CD,C,BCDE
BDE,BF,C(or D?),?,A

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧