描述:
9. You are writing an in-process server object named CMyServer. You have a client application named TestMyServer.exe that uses this object.
Calls to CMyServer::QueryInterface return a pointer to the IUnknown interface for all interface IDs, whether the object supports the requested interface or not. You want to use the Visual C++ debugger to step through the CMyServer::QueryInterface function to find the error. To avoid introducing new behavior, you want to modify the code as little as possible.
Which three things should you do? (choose three)
A. Build the server object. Specify debug options
B. Set a breakpoint on the first line of the CMyServer::QueryInterface function
C. Load and run TestMyServer.exe in Microsoft Visual Studio
D. Build the calling application. Specify debug options
E. Add a call to the DebugBreak function in the CMyServer::QueryInterface function
F. Specify TestMyServer.exe as the Executable for debug session on the Debug tab of the Project Settings dialog box.
Answer:
15. You want to pass object data from a database component on a client computer to a component on a server computer. You want to keep network traffic to a minimum.
Which three methods can you use? (choose three)
A. Write the data as a _variant_t object, and pass the object on the network
B. Write the data as a text in a _bstr_t object, and pass the object on the network
C. Write the data as a disconnect ADO recordset, and pass the recordset on the network
D. Write each property of the server object to be equal to the equivalent property of the client object E, Write the data to the database, and access the data from the server component
E. Write the data by using a dynamic cursor
Answer:
41. You create an in-process COM server component. When the component unloads, it must execute code to release Microsoft Windows resources acquired during its operation.
When you run a test program that repeatedly loads, runs, and unloads the component, you notice that available Windows resources dwindle steadily as the program runs. You suspect a bug in the unload code. You want to test this hypothesis. To avoid introducing new behavior, you want to modify the code as little as possible.
How should you step through the component''s unload routine?
A. Recompile the component as an out-of-process COM server. Run the test program to see it resources are released.
B. Load the component in the Visual C++ IDE, use the IDE to start the test program, and then click the Break Execution button on the Debug toolbar.
C. Add a call to DebugBreak at the beginning of the Release method, and then use the IDE to start the test program.
D. Click the first line of the Release method and set a breakpoint, and then use the IDE to start the test program.
Answer:
50. You will use Visual C++ to create an application to manage a mailing
list for a group of hobbyists. You want to keep mailing-list data as a set of character strings that will represent name, address, telephone number, e-mail address, and other information. The user will enter each field in the mailing list through a standard edit control. To minimize development and debugging labor, you want to use prewritten and wizard-generated code as much as possible.
What should you do?
A. Define a dialog box containing a separate edit control for each data field to be entered. Open this dialog box from an item on the application's File menu. Call the GetDlgItemText function to read strings from each control.
B. Create a separate edit control in your application's main window for each data field to be entered . Call the GetWindowText function to read strings from each control.
C. Use a dialog box as the main window of your application. Use DDX to associate strings from each control.
D. Use a dialog box as the main window of your application. Call the GetDlgItemText function to read strings from each control.
E. Create a Microsoft Excel worksheet for me mailing list. Write an application that contains your worksheet as an active document.
Answer:
84. You are hired by Arbor Shoes to develop a Windows-based application to manage shipping and inventory&nb