Distributed Applications with Microsoft Visual C++ 6.0: MCSD Training Kit: For Exam 70-015 with CD-ROM

Distributed Applications with Microsoft Visual C++ 6.0: MCSD Training Kit: For Exam 70-015 with CD-ROM

by Microsoft Corporation

Paperback(BK&CD ROM)

$62.54 $69.99 Save 11% Current price is $62.54, Original price is $69.99. You Save 11%.

Product Details

ISBN-13: 9780735609266
Publisher: Microsoft Press
Publication date: 03/01/2000
Series: Microsoft Training Kits Series
Edition description: BK&CD ROM
Pages: 600
Product dimensions: 7.63(w) x 9.56(h) x 2.34(d)

About the Author

Founded in 1975, Microsoft (Nasdaq 'MSFT') is the worldwide leader in software for personal and business computing. The company offers a wide range of products and services designed to empower people through great software-any time, any place and on any device.

Read an Excerpt

Chapter 1: Designing the Application

Lesson 1: Architecture-First Design 2

Lesson 2: Distributed Application Design 10

Review 36

About This Chapter

In this chapter, you will learn about a distributed application design approach that you can use to identify and separate the layers of an application architecture. This approach, based on the Microsoft Solutions Framework (MSF) application model, can provide your development team with a means to identify and design the application's classes and components. We discuss applications in terms of five layers: the user interface (UI), user services, business services, data services and a data store. Some information provided about the Application Model is taken from the Microsoft Developers' Network (MSDN) group's 1608: Designing Business Solutions Course, thus it also serves as an excellent source for additional information on designing distributed applications.

Before You Begin

To complete the lessons in this chapter, you must have:

  • A basic understanding of the application development life cycle

Lesson 1: Architecture-First Design

Most successful distributed application projects begin with solid application designs. In this lesson, you will learn the value of making a commitment to an architecture-first project life cycle, and learn what such a commitment entails. In addition, you will learn about the fundamental goal, and also the components, of good architecture-based design.

A true architecture-first design is based on certain principles, including important concepts such as alignment with business goals and the importance of risk management. This lesson takes a look at these principles and their impacts on the design process.


After this lesson, you will be able to:

  • Explain an architecture-based application design approach

  • Describe key principles of an application design

Estimated lesson time: 30 minutes


Architecture-First Design

For the purposes of this book, application architecture is defined as a clear plan for creating an application that achieves business goals and objectives. Such an architecture emphasizes a holistic framework of process, interactivity, and technology, and it is intensely focused on achieving business goals and objectives. An application architect is a person who designs and guides an application architecture. Both architecture and architect provide direction for an application's creation.

By concentrating on the essentials of application architecture, an architecture first approach endeavors to achieve results that can be implemented effectively while minimizing complexity. A common example of the need for this type of approach is articulated in a scene from The Wizard of Oz:

"Follow the yellow brick road!" said the Mayor of Munchkin land.

Not only did Dorothy and Toto need to know where they were going-to the Emerald City-but they needed a specific path to guide them on their journey. In other words, they needed a plan. Similarly, application developers need to know ahead of time not only what the end product should look like but also the steps involved in creating that product. It is no longer possible to create applications by simply sitting down and writing code.

This example speaks directly to the need for an architecture-first approach to planning, building, and managing almost any business activity. At the heart of an architecture-first approach are simple questions you can ask regarding any project:

  • What are the goals for this project?

  • Why are those the goals?

  • What tasks are necessary to achieve those goals?

  • In what order should those tasks be performed?

  • How will the team know when those goals have been reached?

  • What additional factors need to be considered?

An architecture-first approach strives to answer these questions early in the life cycle of a project, and to continually provide a road map and reference guide throughout the project. Unfortunately, many organizations honor architecture and project planning in word but not in deed. Instead of developing a clear vision of their goals and outlining the tasks needed to achieve them, many organizations simply take any route to project completion, hoping that their eventual destination will be an improvement over where they are now. In addition, many managers feel that they won't be able to finish a project if they take the time to plan ahead. On the contrary, however, time allotted in a project life cycle for planning actually saves time during an application's development, implementation, and deployment.

Note This commitment to planning does not mean that work should not begin until the architecture is established. This book advocates a plan-while-building approach. In other words, planning, building, and managing follow one another in an iterative fashion, often overlapping.

Being committed to architecture-first design and practice means that all application development work is based on a coherent, high-level architecture; that the architecture has been worked out before coding work has started; and that the architecture drives the work. When you seriously examine what is involved in a commitment to architecture-first design, you might have second thoughts about your project, which can begin to appear more and more daunting. You might start asking, "Is there any way we can get a handle on this project? And considering the work involved, why should we even try?"

The answer is simple: Every application has its own architecture, whether planned or not. You can assess and plan as needed or fall prey to a random architecture that doesn't necessarily meet your business needs. Only by doing the work involved in planning and building an application architecture can you really gain some control over your projects.

Goal of Architecture-First Design

As noted earlier, providing a direction or goal is an important function of an application architecture. The fundamental goal when developing any architecture is: To provide a logically consistent plan of activities and coordinated projects that guides the progression of an organization's application systems and infrastructure. The plan should move incrementally from the current state to a desired future state based on current and projected business objectives and processes.

Let's examine the elements of this goal in more detail:

  • Logical consistency Any two or more elements of a sound architecture can always fit together logically.

  • Activities and coordinated projects An architecture addresses both ongoing activities and future activities. By coordinating the goals and execution of these activities, the implementation time can be decreased and duplicated effort eliminated. Additionally, each system that is developed can be designed to integrate with current and future systems.

  • Progression from current state to desired future state An architecture does more than simply describe the current project state; it also offers a vision of the desired future state of a project when it is completed or is nearing completion. Most important, the architecture articulates a clear path to move from the current situation to the desired project solution through versioned application releases.

  • Current and projected business objectives and processes An enterprise architecture plan is ultimately worthless if it is not built upon both current business needs and the projected business plan and processes for a solution to meet such needs.

You should keep these points in mind while considering the details of architecture based design throughout the rest of this chapter. You should also use these points to analyze the completeness of any architecture plan.

Application Design Principles

The practice of developing software has changed dramatically over the last 20 years. Many traditional management techniques have been updated to reflect recent management experience in developing software. The driving force behind this shift in the software development process has been the desire to develop more features over less time, and as a result, increasing the complexity of software products. Competitive pressures, growing customer influence, constant increases in Information Technology (IT) companies' stock values, and constantly evolving technology have all motivated organizations to streamline their development processes.

Above all, however, the crucial factor behind streamlining development processes is that too many projects have failed. Increasingly, software developers strive to build optimal software-on time and with fewer financial setbacks-that succeeds. The new mantra of developers in the IT industry is "Ship the right product at the right time:"

Following this section are application design principles on which to base the development of application's architectures. All of these principles are important to achieve a successful application development process.

Architecture-First

We've already talked about the importance of an architecture-first approach to application development. In Software Project Management: A Unified Frame-work (Addison-Wesley, 1998), Walker Royce states that "architecture-first is a critical theme underlying a successful iterative development process:" Using an architecture-first approach achieves a demonstrable balance between the business requirements, architecturally significant design decisions, expected ship dates, and life cycle plans for the product-before resources are committed for full-scale development.

When implementing an architecture-first approach, the team can use prototypes and proof-of-concept systems to help determine suitable design decisions. The team must make appropriate tradeoff decisions between resources, ship dates, and features, as well as create a product vision and road map acceptable by all project stakeholders.

Alignment with Organization's Business Goals

Every project must justify its capital resource requirements, and an organization's business goals form the basis of this justification. Thus, the business needs of a project's stakeholders drive the vision and plan for any development project.

A project's return on investment is not always measured in strict financial terms; the project can provide strategic value to an organization, which is difficult to quantify monetarily. However, business values that the project addresses must align with the stated goals of the entire organization hosting the project. As the organization's goals change, the project team must reassess the underlying business goals to confirm that the project is still in alignment with the organization's goals. At the least, the project must not conflict with any new goals that the organization might have developed since the project's inception.

Because business goals are critical to any project's success, the project team should be competent not only in software development, but also in adherence to the organization's goals as a business. Many products have been shelved because they did not meet the organization's business goals, even though they were well written and technically sound. To prevent such disconnection between products and goals, a project team needs to clearly understand the business problem the team is trying to solve...

Table of Contents


A
abstract base class, 565
abstract classes, 251, 255
abstraction, level of, 738
access, 19
    permissions, setting, 644
ACID rules, 351
ACL, 229
activation security, 229
Active Directory Services Interface. See ADSI
active documents, 333-35
Active Server Pages. See ASP
Active Template Library. See ATL
ActiveX
    COM and, 218
    control, Message, 618
    MFC and, 86
ActiveX controls, 21, 109, 176, 196, 210, 575
    adding custom property pages to, 193
    adding to property pages, 191
    adding support to, 185
    advanced features of, 188
    COleControl class, 189
    Component Gallery and, 176
    containers, 190
    creating, 180-84
    data exchange with property pages, 191
    debugging, 615
    DLLs, 178
    downloading to a UI, 195
    events, 190
    HTML Help, 136
    .ocx files, 178
    property pages, 191
    registry entries for, 682
    signing, 194
    subclassing, 188
    using event handlers, 179
    worker threads and, 575
ActiveX Control Test Container, 615, 616
ActiveX Data Objects. See ADO
ActiveX DLLs, COM DLLs as, 304
activities, 360
activity diagrams, 739
activity models, 738
actors, 729, 736
AddRef function, 262, 326
administration, remote, 390
administration objects in MTS, 365
Administrator tool in VSS, 49
ADO, 27, 31, 592
    applications, creating, 551
    architecture, 501
    command type property values, 506
    Connection Object, 502
    as data access technology, 502
    data-bound dialog box, creating, 508
    error handling and, 579, 588
    Errors collection, 589
    exception handling, 589
    executing parameterized queries with, 519
    features, 500
    Recordset object, 502
    when to use, 496
    working with, 503
ADSI, 26
AfxBeginThread function, parameters, 312
AfxEndThread, 314
aggregate functions, 466
aggregation, 326, 620
allocation of memory, 122-24
alpha product releases, 7
American National Standards Institute. See ANSI
ampersand symbol, 150
Analysis Workflow, 719
ANSI, MFC and, 88
antipatterns, 717, 732
apartment-model objects, 109
apartments, 114
APIs, 6, 26
    MSMQ and, 412
    OutputDebugString function, 582
    RegisterTypeLib API, 233
    vendor-neutral, 26
AppendMenu function, 152
AppIDs, 231, 624
application architecture, n-tier, 34
application development
    ADO and, 27
    architecture-first, 2, 4
    parallelism, 13
    plan-while-building, 3
    Web browser considerations, 20
application model, 10
application programming interfaces. See APIs
applications
    architecture, 2
    benign exceptions and, 563
    Calendar control, adding, 178
    COM errors, 569
    component-based, 6, 216
    context-sensitive help for MFC, implementing 139
    DCOMCNFG, 69
    debug version, 601
    design, 4, 6, 10
    development. See application development
    dialog box-based, 96
    dialog boxes, implementing, 206
    distributed. See distributed applications
    distribution flexibility, 13
    dockable toolbars and, 155
    enterprise, data access and, 30
    exception and error handling, 565
    exception handler code and, 562
    exception handling in ADO, 589
    exceptions and, 558
    features, implementing, 96
    framework, 86
    HTML Help file links, adding to the Web, 141
    Internet-based, 17
    interoperable, 10, 13
    logic, 34
    MFC and error handling, 566
    MFC Help, 137
    MTS-based, creating 386
    multithreaded, 113
    multitier, designing, 12
    n-tier, 223
    native, 15, 16
    in OLE DB, 537
    operating system client support, requiring, 15
    porting between platforms, 88
    release version, 601
    requirements, 18
    reusability, 13
    robust code, 559
    scalable, 34
    scaling with MTS, 389
    SEH and, 560
    service-layered, 223
    services, 11
    sharing of classes, 235
    three-tier, 10
    uninstalling, 657
    user interface, 14
    using CNTService in, 321
    Web-based, advantages, 18, 19
    wizards, 133
    WYSIWYG, 105
AppWizard, 88
    creating form views, 170
    MFC ActiveX ControlWizard, 184
    toolbar creation and, 154, 155
    WinHelp and, 137
architecture, 712
    application, 2
    document/view, 92-95
    MDI, 142
    messages and commands, 89
    MFC, 89
    ODBC, 524
    OLE DB, 537
    print preview, 107
    SDI, 142
architecture-first design, 2, 4, 5
archiving, in VSS, 51
arguments, 247
array of bytes, 123
arrays, setting data breakpoints, 607
ASP, 17
    browser capability, 20
ASSERT macro, 602
ASSERT_KINDOF macro, 603
ASSERT_VALID macro, 603
AssertValid member function, 603
associations of classes, multiplicity, 751
asynchronous
    communication, applied to MSMQ, 404
    error notifications, 575
    messages, receiving with ATL Object Wizard, 424
ATL, 86, 109, 270, 290
    advantages, 111
    aggregation, implementing, 327
    AppWizard, 182
    AtlTrace function, 582
    ATLTRACE macro, 582
    creating a DLL in-process server, 270
    creating ActiveX controls, 180
    creating multithreaded components, 318
    creating out-of-process components, 304
    creating persistable objects, 434
    declarative security, 306
    error logs and, 582
    features, 110
    global threading model, 319
    interfaces, 180
    limitations, 110
    vs. MFC, when to use, 110
    properties and methods, adding to objects, 276
    support of STA and MTA threading models, 318
ATL COM AppWizard, 272
ATL Object Wizard
    receiving messages asynchronously, 424
    replicating features, 369
ATLTRACE macro, 582
atomic, 351
Attach function, 151
Attach to Process command, 621
attributes, 60. See also individual attributes.
authentication, 306-8
Authoring Guide, HTML Help, 136
authorization, 307, 308
Automation
    IDispatch and, 227
    MFC and, 87
    oleautomation attribute and, 258
    parameter types, 258

B
backup site controllers. See BSCs
balancing loads, 384
base classes, 240
    inheritance and, 250
base clients, 360
BaseCtl framework, 183
baseline, 44
Beeper component, 695, 696, 706, 707
Beeper.dll, adding to setup project, 700
BEGIN_INTERFACE_MAP macro, 284
BEGIN_INTERFACE_PART macro, 283
BEGIN TRANSACTION statements, 461
benign exceptions, 563
beta product releases, 7
Beta testing, 636
big-endian byte ordering, 490
binary standard, 215, 218, 233
bitmap files, 135
blocks. See individual blocks
.bmp files, 135
branching, in VSS, 48
Break At control, 607
breakpoints, 605-8
BSCs, 405
bugs, 600
    fixing in debugger's source window, 612
    indicated in debugger windows, 609
    removing from programs, 599
    removing using MFC debug macros, 602
business
    code, 235
    components, building, 255
    goals, alignment with, 5
    objects, 744-45
    rules for data access, 28
    services, 11, 22-24
business service layer, 22, 23

C
C Point class, 100
C run-time library, 87
C++, 7, 27
    compilers, sharing and, 236
    easier integration with other languages, 235
    exception handling, 560-64
    interfaces, 221
    libraries, 86, 109
    objects, 220
C++ classes, 215
    binding to a recordset, 512
    template-based, 109
cabinet files, 659, 660
Call mtstran1::Begin button, 400
call security, 229
call stacks, 611
Call Stack window, 610, 611
CancelDisplay parameter, 576
candidate
    classes, 735
    components, packaging, 762
    technologies, 757, 758
CArchive, 493, 494
cardinality of entities, 60, 61
cascading menus, 146
cascading style sheets, 17
catch keyword, 562, 563, 566, 568
CBitmap class, 100
CBrush class, 100
CChildView class, 96
CClientDC class, 99
CCmdTarget class, 91, 97, 284
CCmdUI, 149
CColorDialog class, 100
CComClassFactory, 276
CComCoClass, 276
CComGlobalsThreadModel, 319
CComModule, 273
CComModule class, 272
CComObjectThreadModel, 319
CDaoException object, 568
CDaoRecordset, 565
CDAORecordset function, 568
CDatabase in MFC ODBC, 527
CDataExchange, 172
CDBException, 530
CDC class, 99, 565
CDC objects, 101
CDialog class, 87, 90, 163, 166
CDocTemplate class, 93
CDocument class, 93
CDocument object, 97
CDocument::UpdateAllViews function, 95
CDumpContext class, 580
CDumpContext object, 581
CDynamicAccessor class, 545
CDynamicParameter Accessor, creating queries with, 547
central administration, 691
certificate authority, 688
certification, 40
CException, exception handling and, 565
CFieldExchange, 529
CFile class, 565-67
CFileException object, 566
CFile function, 566, 567
CFile object, 580
CFont class, 100
CFontDialog class, 100
CFormView class, 169-70, 529
CFrameWnd class, 90, 93
CGdiObject class, 100
CGI, ISAPI and, 336
change control, 38, 43-45
check marks, setting and clearing, 149
CHtmlStream, 337, 338
CHttpFilter, 337
CHttpFilterContext, 337, 338
CHttpServer, 337
CHttpServerContext, 337, 338
classes, 247, 255, 735. See also individual class names
    abstract, 251
    abstract base, 565
    associating with a dialog template, 166
    association, 751
    attributes, 735
    base, 240
    business code, 235
    C++, 215
    candidate, 735
    characteristics, 250
    _com_error, 572
    consumer, 541
    derived, 240
    diagrams, 62, 735, 749
    document, programmer-defined, 93
    document/view, 93
    exported, 243, 246
    factories, 263
    graphic-object, 98
    implementation, 254
    implementation inheritance and, 240
    interfaces, 250
    MFC, 88, 99, 100
    operations, 735, 749
    parent, 280
    pure virtual functions, 250
    shared, 235, 236
    template, 252
    view, programmer-defined, 93
ClassFactory, 268
class model, 735, 749
ClassWizard
    associating a dialog template with a class, 166
    event handlers, adding, 179
    handler functions, adding to menu commands, 147
    property pages, adding, 191
    DDV and, 171, 173
    DDX and, 171
Client2, building release versions, 695
client programs, 236, 247
    creating, 241
    ensuring same directory as DLL, 243
    modifying to use COM, 268
clients
    access to HRESULT codes, 572
    base, 360
    configuration, 677-79
    creating, 329
    dependent, 406
    fat, 352
    independent, 406
    project, debugging and, 617
client-side COM components, 21
client-side cursors, 486
client-side objects, 19
CLSIDs, 219, 222, 266
CMDIChildWnd class, 90
CMDIFrameWnd class, 90
CMemoryException class, 565
CMemoryException error, 569
CMemoryException object, 562, 568
CMemoryState, 604
CMenu class, 151, 162
CMetaFileDC class, 99
CMultiDocTemplate class, 93
CMyService class, 322
CNs, MQIS and, 406
.cnt files, 135
CNTService class, 321-25
CoADO Command object, 502
CObject class, 97, 603
    CDumpContext and, 580
CObject function, 580
coclasses, 219, 233, 266, 358
    CLSIDs and, 219
    enhancing type library, 259
    functions, 259
    GUIDs and, 219
    vs. language-based classes, 219
    in type libraries, 368
CoCreateInstance function, 327, 358
CoCreateInstanceEx function, 219
codes
    exception handler, 562
    HRESULT, 570
    MFC, writing, 492
    shared classes, 235
    stepping through, 611
code segments, COM, 216
coding, manual, advantages/disadvantages, 110
CoCreateFreeUnusedLibraries function, 267
CoGetClassObject function, 219, 358
cohesion, 765, 766
COINIT_APARTMENT-THREADED, 115
CoInitialize, 115, 116
CoInitializeEx, 115, 116
COINIT_MULTI-THREADED, 115
COleControl class, 189, 190, 575
COleControl function, 576
COleDocObjectItem class, 333
COleDocument class, 93
COleException class, 565
collections, Errors, 588
COM, 15, 215
    ActiveX and, 218
    ActiveX controls, 176
    business server layer and, 23
    APIs, 262
    authorization, 307
    availability, 19
    basics, 216
    as binary standard, 215, 218
    calls, remote, 22
    call security, 229
    classes, 23
    clients, creating, 305, 346
    coclasses, 219
    _com_error class, 572
    COM errors, 569-78
    components, 216, 222, 674, 682
    creating ActiveX controls with ATL, 180
    DLL component structure, 223
    DLL entry points, 265
    exceptions, 573
    executables, 304
    facility codes, 571
    functions, 267
    HRESULT, 570-73
    identifiers, 223, 224
    IDL and, 218
    interface pointers, 220
    interfaces, 23, 109, 225-28, 412
    IUnknown and, 278
    language independence, 217
    marshaling, 232
    MSMQ APIs, 412
    object lifetime management, 221
    object reuse with containment, 329
    objects, 109, 614
    OLE and, 218
    SCODE, 570
    security, 229, 306
    server types, 304
    settings, configuring, 64
    specifications, 216
    support in distributed environments, 232
    transactions and, 352
COM API functions, 266
COM components, 24
    building with ATL, 270
    building with IUnknown, 226
    client-side, 21
    COM objects and, 222
    COM support in distributed environments, 232
    creating using ATL, 304
    DLL entry points, 223
    as DLLs, 223
    DLL structure of, 223
    errors and, 575
    extending existing, 326
    packaging methods, 24, 222
    registry settings, 231
    self-registering, 21
COM DLLs, 304
_com_error class, 572, 578
_com_error object, 589, 592
    passing to a catch block, 573
COM in-process server, converting components, 256
COM objects, 23, 219, 290
    AddRef method, 226
    coclasses, 219
    COM components and, 222
    debugging, 640
    lifetime management, 221
    location transparency and, 228
    pointers and, 220
    QueryInterface method, 226
    Release method, 226
    sending messages and, 420
    troubleshooting, 625
COM programming model, 23
COM reliance on the registry, 230
COM security, 229-34
COM servers, 291
    compiling, 277
    creating, 277, 286, 304, 344
    registering, 308, 309
    registering a DCOM component, 308
    self-registering, 682
    types, 304
command line switches, 563
Command objects, 502, 506, 539
Command properties, setting, 506
commands
    adding to the Programs menu, 662
    executing, 507
    handlers, 90
    IDs, 91
    messages, 89, 90
    objects and, relationships, 91
    targets, 92
    text, 512
    UI handler functions, 148, 150
    update handlers, creating, 160
commits, two-phase, 351
Common Gateway Interface. See CGI
Common Object Request Broker Architecture. See CORBA
compiled programs, problems with large size, 235
compiling
    debug errors, 245
    IDL files, 260
component-based approach, 6
component development, middle-tier, 235
Component Gallery, 176, 178
component interfaces in type libraries, 368
components, 6
    as objects, 217
    assigning roles to, 382
    categories, 24
    in applications, challenges 216
    COM, 24, 216
    building, goals, 236
    data access, 30
    DCOM, accessing, 22
    debugging, 621, 642
    distributing, 762
    executing, debugging, 621
    existing, 326
    in-process, interactions among, 117
    in-process, specifying the surrogate, 624
    interface, 767
    making security available, 380
    of MTS, deploying, 675
    multithreaded, creating, 311
    packaging, 762
    remote, installing/registering, 623
    self-registering, 682
    services, 6
    sharing by compiled programs, 236
    switching between local and remote, 624
component topology, 761
computer inventory, SMS, 692
Conceptual Design, 726-33, 742
conceptual design phase, 724
conditional breakpoints, 606, 608
connected networks. See CNs
Connect function, 493
connection
    to data source, 505, 506
    information, specifying, 504
    points, 109
    string, 511
    types, 22
Connector Server, MSMQ, 404
consistent transactions, 351
constants, _DEBUG, 580
constraints, 478-80
Construction Phase, 720
constructors, 120
ConstructStream function, 338
consumer classes, 541
consumers, 537
containers, 190
    active documents, 333
containment, 329-33
context, MTS components and, 359
context wrapper, 359
context-sensitive help, 132, 139
controlling unknown, IUnknown as, 327
control notifications, 90
controls, 21, 747
ControlService function, communicating with services, 324
ControlWizard, 184
coordinating transactions, 351
CORBA, 23
core processes, 728
COSERVERINFO structure, 624
costs
    of changing requirements, 34
    reducing, 690
coupling, 765, 766
coverage testing, 40
CPaintDC class, 99
CPaintDC objects, 101
CPalette class, 100
CPen class, 100
CPreviewDC class, 107
CPreviewDC object, 108
CPrintDialog class, 100
CPrintInfo structure, 103
CPropertySheet, 168
CreateAndDestroy method, 394
Create function, 165
CreateInstance function, 219, 360, 386
Create member, 492
CreateMenu function, 151
Create mtstran1 button, 400
CreateMutex function, 316
Create, Retrieve, Update, Delete. See CRUD
CREATE TRIGGER function, 462
CREATE TRIGGER statements, 462
creating an in-process COM server, 286
creating in-process COM servers, 269
CRecordset, 527
CRecordView, 529
CRect class, 100
CRectTracker class, 100
CRgn class, 100
CRUD, 28
CSingleDocTemplate class, 93
CSize class, 100
CSocket, 489, 491
CSocketFile, 493
CStatusBar class, 161, 162
CString class, 173
CTestCtrl class, 186
CTestPropPage class, 186
CToolBar class, 154, 162
current-state scenarios, 731
cursors, 423, 485-86, 510
custom events, 190
custom property pages, adding, 193
CView class, 90, 93, 100, 102, 171, 580
CWinApp class, 89, 97
CWindowCD class, 99
CWinThread, 314
CWnd class, 87, 90, 151, 565

D
DA, 27-30, 483
    for enterprise applications, 30
    fundamental terms of, 485
    strategies, 483, 498
    technology, choosing, 32, 496, 502
DAO, 27, 31
    MFC and, 86
    when to use, 497
data
    access. See DA
    breakpoints, 605, 607
    deleting, 454
    display, 93
    document, accessing, 94
    duplicate, eliminating from database, 62
    exchange, 171-72
    integrity, 29, 478
    modeling, 59, 62
    modifying, 453
    processing, 171
    providers, 537
    retrieving, 450
    rules, 28
    services. See DS
    sources, 506, 543
    storing, 26, 481
    structures, memory allocation, 124
    summarizing, 465
    topologies, 760
    types, relationship to functions, 466
    validation, 171-75
    writing to persistent storage, 93
data access. See DA
database management systems. See DBMSs
database objects, 470
databases
    components of, 485
    connecting to, 503
    duplicate data, eliminating, 62
    in VSS, archiving, 51
    in VSS, logging in to new, 51
    incorporating in applications, 487
    MQIS, 405
DataGrid control, binding to recordsets, 513
data service design, 25
data service layer, 25
data source objects, 538
DBMSs, 25
DCE-RPC, 23, 257
DCL statements, 449
DCOM, 19, 215, 302, 310, 620
    availability, 19
    components, accessing, 22
    COM support in distributed environments, 232
    configuring, 302
    registering a component in, 308
    security, 306
    Windows and, 302, 303
DCOMCNFG, 64-67
Dcomcnfg.exe, 230-31, 303, 307-8, 310
DCs, 97, 99
DDL statements, 449
DDV, 163, 171-75
DDV_ValidateAge function, 175
DDX, 163, 171-75, 191
DDX_Text function, 172
dead letters queues, 422
deallocation of memory, 123, 244, 255
DebugBreak function, 322
_DEBUG constant, 580
debuggers, 245
    integrated, Visual C++, 600
    monitoring a range of variables, 607
    running, 609
    windows, 609, 610, 612
debugging, 599-601
    ActiveX controls, 615
    in the client project, 617
    COM objects, 614, 640
    components, on a single computer, 642
    in debugger's source window, 612
    errors while compiling, 245
    executing components, 621
    file-locked server modules, 625
    in-process servers, 615
    local objects, 614, 615, 640
    Message ActiveX Control, 618
    in ODBC applications, 532
    out-of-process servers, 617
    remote objects, 614, 620, 621, 643
    surrogate hosts and, 621
    using MFC debug macros, 602
    with Visual C++ integrated debugger, 605
    without adding permanent code, 602
DEBUG_NEW macro, 602, 603
DEC Alpha, 88
declarative programming, 354
declarative security, 306
default
    handlers, MFC, 576
    printing, 101
    properties, DCOMCNFG, 66
    security, DCOMCNFG, 65
degrading gracefully, 21
delete operator, 120, 121, 125
DELETE statements, 454
dependencies, 628
Dependency Walker, 628, 629
dependent clients in MSMQ, 406
Depends.exe. See Dependency Walker
deployment, 686-88, 706
derived classes, 240, 250
design, 4
    architecture-first, 2, 4
    business server, 23
    data service, 25
    modeling, 734
    multilayer, 10, 34
    multitier, 12, 13
    patterns/antipatterns, 715-17, 732
    phases, 724. See also individual phases
    process, 724
    user service, 15
    within context of enterprise, 6
Design Workflow, 719
desktop operating system, constraints, 19
destructors, 121, 250
Detach member function, 98, 151
developers, necessary skills, 37
development
    changes, on development computers, 39
    environment, 37, 38
    essentials, 85
    parallelism, 13
    process, software, 4
    stage, 39
    tools, 57
device contexts. See DCs
device-independent bitmap. See DIB
DHTML, Web-based interfaces, 17
diagnostic information, retrieving, 533
diagrams, 734
    activity, 739
    UML, 713
dialog box in ADO, data-bound, 508
dialog box-based applications, 96
dialog boxes, 163-68, 175
    creating property page resources, 193
    Help Topics, 133
    implementing into an application, 206
Dialog Data Exchange. See DDX
Dialog Data Validation. See DDV
dialog template, 165, 166, 201-3
DIB, 210
digital signatures, 688
direct caller vs. original caller, 383
DirectX multimedia, 15
DisableCommit method, 387
Disassembly window, 610, 611
disconnected recordset, creating, 518
disks, use in deployment, 686
DISPID_ERROREVENT, 575
distributed applications
    designing, 62
    exceptions and, 577
    installing, 684
    packaging and deploying, 694
    testing, 636
Distributed COM. See DCOM
Distributed Computing Environment, Remote Procedure. See DCE-RPC
distributed design application, 10
distribution flexibility, 13
DllCanUnloadNow function, 267, 273
DllGetClassObject class, 368
DllGetClassObject function, 266, 273, 358
DllRegisterServer function, 265, 272, 682
DLLs, 24, 110, 340
    ActiveX controls as, 178
    allocating and destroying exported classes, 246
    as COM components, 223
    COM, 265, 304
    component structure in COM, 223
    debugging, 615
    ensuring same directory as client programs, 243
    entry functions, 254
    inheritance and, 250
    ISAPI, 336
    location, 368
    memory, 244
    MFC, 340
    middle-tier, 255
    proxy/stub, 260
    recompiling, 245
    registering, 178
    regular, MFC, 340
    sharing source files and, 235
    unloading, 267
DllSurrogate, 624
DllUnregisterServer function, 265, 272
DML statements, 450
dockable toolbars, 155
documentation of changes, 44
documents
    active, 333-35
    classes, programmer-defined, 93
    data, accessing, 94
    pages, vs. printer pages, 105
    templates, 94
    views and, relationship, 93
document/view architecture, 92-95
DoDataExchange function, 172, 175, 192
domain controller, authentication, 307
domains, 734
DoModal function, 164
DoPreparePrinting function, 104
drawing, 99
DS, 11, 28
DTC Client Configuration, 625
dual interfaces, 109
durable transactions, 351
dynamic
    changes to menu text, 150
    cursors, 510
    load balancing, 384, 680
dynamic HTML. See DHTML
Dynamically Linked Library. See DLLs

E
early-binding, 227
ECMA, 20
Edit and Continue, 612
editing
    records, 517
    recordsets, 530
editor, programming, 57
Elaboration Phase, 720
EnableCommit method, 387
Enable function, 149
encapsulation, 87
encryption, 19
end_INTERFACE_MAP macro, 284
end_INTERFACE_PART macro, 283
EndDoc member function, 102
EndPage member function, 102
enterprise applications, and data access, 30
enterprise development teams, 235
entities, 59-61
entity-relationship diagram. See E/R diagram
enumerators, 538
E_OUTOFMEMORY, 570, 573, 593
E/R diagram, 59, 61
error codes, 533
    E_OUTOFMEMORY, 573
error events, 574-78
error handling
    ADO and, 588
    COM programs and, 565
    failfast and, 583
    MFC applications and, 566
    strategies, overview, 579
error logs, 579, 582-83, 592
error notifications, 574-75
Error object, properties exposed by, 588
errors, 540
    ADO and, 579, 588
    anticipating, 558
    applications and, 565
    CMemoryException, 569
    COM, 569
    COM components and, 575
    debug, 245
    exception handling and, 559
    exceptions, 558
    MTS error handling, 583
    networks and, 577
    in ODBC and OLE DB, 589
    in programs, finding, 599
    remote modules and, 577
    retrieving information, 532
    root objects and, 582
    types of, in ODBC, 532
    Windows NT Event Viewer and, 626
    Windows NT Event Viewer Application Log, 583
Errors collection, 588, 589, 592
Errors object, 588
Escape member function, 102
European Computer Manufacturers Association. See ECMA
evaluation software, 687
event handlers, 179
events, 190, 575
EXCEPTION_CONTINUE_EXECUTION filter, 561
exception handling, 559-566
exception macros, 569
exceptions, 557, 558, 578
    ADO and, 579
    applications and, 565
    benign, 563
    CException, 565
    COM, 573
    distributed applications and, 577
    error handling code in networks, 577
    error logs, 579
    fatal, 558
    handling in ADO, 589
    macros, 569
    MFC and, 565, 577
    MTS and, 579, 582, 583
    new operator, 562
    in non-MFC programs, 562
    objects for, 562
    raising, 558
    trapped by ADO, 589
    turning off, 567
__except keyword, 560, 562
ExecQuery method, 584
executables, sharing source files and, 235
executing
    commands, 507, 549
    components, debugging, 621
    parameterized queries in ADO, 519
    stored procedures, 519
export direction, switching, 242
exported classes, allocating and destroying, 246
Export Function List, 629
exporting packages, 377
extended stored procedures, 459
Extensible Markup Language. See XML

F
FACILITY_ITF, 571
FAILED macro, 571, 582
failfast, 583
Fail function, 174
fatal exceptions, 558
fat clients, 352
faults, fatal, 559
file-locked server modules, debugging, 625
file management, in VSS, 46
files
    cabinet, 659
    program, including/removing, 670
    registry, 660
    in VSS, 46-51
filtering records in recordsets, 515
filter objects, HTTP, 337
filters
    creating, 339
    setting, 516
__finally keyword, 560, 561
firewalls, 19
folders in VSS, 47, 51
footers, 106
FOREIGN KEY constraints, 480
form views, creating with AppWizard, 170
forms, 163
forward-only cursors, 510
frame windows, making docking available in, 155
free function, 120, 125
free store. See heaps
free-threaded model objects, 109
functions, 247, 254. See also individual function names
    access, 149
    aggregate, 466
    command UI handler, 148
    handler, 90
    leaving, with Step Out command, 612
    overriding, 248
    relationship to data types, 466
    service callback, 320
    signature in classes, 250
Function Wizard in InstallShield, 704

G
GDI, 89, 97, 98, 107
GDI32, 628
GDPro, 63
generalization, 738
generative patterns, 715
GetControlling Unknown function, 327
GetDocument function, 94
GetExitCodeThread function, 315
GetExtensionVersion function, 337
GetFromPage function, 103
GetMaxPage/SetMaxPage function, 103
GetMessage/DispatchMessage, 116
GetMinPage/SetMinPage function, 103
GetToPage function, 103
global threading model, 319
graphical device interface. See GDI
graphical user interface. See GUI
graphic objects, creating in a DC, 98
GROUP BY clause, 467
GUI, 311
Guidgen.exe, 224
GUIDs, 219
    CLSIDs, 266
    COM identifiers and, 224
    Guidgen.exe, 224
/GX command line switch, 563

H
handler functions, 147, 148, 150, 151
handlers, 90, 160
handles
    hInstance, 272
"happy" flags, 387
HAVING clause, 467
header files, creating, 242
headers and footers, printing, 106
heaps, 119
    insufficient space, 559
help, 132-141,
    adding handler functions to menu commands, 147
    MFC ActiveX ControlWizard, 185
    ToolTips, 156
HelpContext function, 573
HelpFile function, 575
hierarchy, implementation inheritance, 253
hInstance handle, 272
history, viewing, in VSS, 51
HKCR. See HKEY_CLASSES_ROOT
HKEY_CLASSES_ROOT, 624
.hlp files, 135
.hm files, 135
.hpj files, 135
HRESULT value, 261, 269
HRESULT codes, 570-78, 582, 583
HTML, 62, 338
HTML 3.2, 21
HTML Help, 136-141
HTML pages, ActiveX controls and, 218
HTTPExtensionProc function, 337
HTTP filter objects, 337
HTTP servers, 338
HWND handle, 90
Hypertext Markup Language. See HTML
Hypertext Transfer Protocol. See HTTP

I
IClassFactory, 263, 267, 269
IClassFactory2 interface, 109
IClassFactory class, 368
IClassFactory::CreateInstance method, 368
IClassFactory interface, 109, 219, 228, 263
iCount variable, 581
IDE, 57
IDispatch, automation and, 227
IDispatch interface, 109, 227, 572
IDL, 269
    COM and, 218
    compiling an IDL file, 260
    creating an IDL file, 256
IDs, command, 91
IErrorInfo object, HRESULT and, 573
if-else blocks, 559
IIDs, compared to CLSIDs, 219
IIS, 17, 356
    ISAPI and, 336, 338
IIS process isolation, 626
illegal operations. See exceptions
Image Editor, HTML Help, 136
impersonation-level authentication, 307
implementation, 250
implementation inheritance, 240, 252-55
Implementation Workflow, 719
#import directive, 589
importing packages, 378
[in] attribute, function of, 258
in-process components, 24
    interactions among, 117
    specifying the surrogate, 624
in-process COM servers, 269
in-process servers. See DLLs
in-process threads, 116
Inception Phase, 720
includes, 738
independent clients, in MSMQ, 406
Indexed Sequential Access Method. See ISAM
indexes, 137, 481-82
inheritance, 240
    hierarchy, 253
    interface, 247
    primary benefit, 250
    problems, 250
    template classes and, 252
.ini file, 20
InitInstance member function, 97
inner joins, 457
inner objects, implementing, 329
InsertMenu function, 152
INSERT statement, 454
INSERT triggers, 463
installation programs, 654
installations
    automated, 690
    manual tasks, 684
    options for, 655
installer products, new releases, 692
InstallScript, using, 668
InstallShield, 668-70, 683, 709
InstallShield project, 697, 700, 701
integrated development environments. See IDE
integration testing, 636
integrity data, 478
interception, and MTS, 353, 369
INTERFACE_PART macro, 284
interfaces, 250, 259. See also individual interface names
    advantages of using, 254
    assigning roles to, 382
    attribute structure, 257
    COM, 109, 225
    DCE-RPC, 257
    declarations, 256, 260
    dual, 109
    inheritance, 247, 255
    interface pointers, 220, 229
    navigation, 225
    supporting, 279
    tear-off, 109
    template classes and, 252
    versioning, 225, 228
    viewing with OLEView, 69
    Visual Basic, 221
InternalAddRef function, 284
InternalQueryInterface function, 284
InternalRelease function, 284
internal transaction coordinator, 430
Internet
    connection types, 22
    programming, MFC and, 86
    ready-to-use ActiveX controls and, 195
Internet Component Download, 195
Internet Information Server. See IIS
Internet Protocol. See IP
Internet Server Application Program Interface. See ISAPI
interoperable applications, 10, 17, 13
Intranet connections, 22
IObejcetContext interface, 386
IP, 19
ISAM, 32
ISAPI, 336-39
IsCallerInRole method, 382
ISecurityProperty interface, 383
isolated transactions, 351
IsSecurityEnabled method, 382
iteration, 719
IUnknown, 256, 267, 269, 278, 280
    aggregation and, 326
    as controlling unknown, 327
    implementing, 261
IUnknown interface, 23, 109, 180,  225, 226, 233, 256, 280

J
Java, 7
    ease of use in projects, 235
    HTML Help applet, 136
JIT, 355, 601, 617, 621
    in MTS 2, 370
joins, inner/outer, 457
Just-In-Time activation. See JIT
Just-in-Time debugging. See JIT

K
Kernel32, 628
keys, registering a DCOM component, 308
keyset cursors, 510
keywords, 564. See also individual keyword names

L
LAN, 232
language independence, 217
Last-In/First-Out, 119
late-binding, IDispatch and, 227
launch permissions, setting, 644
legacy systems, 35
libraries
    C run-time, 87
    C++, 86
    MFC, 99
    static, 235
    template vs. standard C++, 109
    Visual C++ run-time library, 89
library blocks, 259
library packages, 357, 375
licensing, 185
lifetimes, managing, 221
LIKE search condition, 452
little-endian value, 490
load balancing, 384, 680
LoadMenu function, 151
local
    components, 24
    objects, debugging, 614, 615, 640
    queue storage. See LQS
location breakpoints, 605, 607
location transparency, 228, 302
lock types, 511
log files, 581
logic, application, 34
Logical Design, 742, 743, 747, 753
logical design phase, 724
Logical Model, 761
logical services layers of MSF, 761
LQS, 414

M
macros. See also individual macro entries
    MFC, 283, 569, 602
    switching export direction, 242
main STA, 117
MAKE_HRESULT macro, 571
malloc function, 120, 125
managing
    resources, dynamically, 474
    transactions, 495
Manipulate function, 28
manual merge, 49
MAPI, 26
marshaling, 116, 118, 232-34, 368
m_bContinuePrinting member, 106
MDAC, 27, 487
MDI, 142
Media Build Wizard, creating setup programs, 704
member functions. See individual member function names
member variables, creating, 244
memory
    allocation, 121-24, 244, 245
    areas, 119
    blocks, 125
    leaks, 122-26
    management, 119, 121, 125
    problems, 126
    unowned, 559
Memory window, 610, 611
menu commands, 147, 152
menu resource, creating menus with, 144
menus, 142-152, 162
merge conflicts, resolving, 49
merging files, in VSS, 48, 49
Message ActiveX control, 618, 621
message-handler functions, 90
messages, 89-91, 404
    breakpoints, 606, 608
    handlers, 90
    log, 633, 634
    maps, 89, 91
    purging, 428
    receiving, 422, 443
    sending, 419, 438, 439
    sending/receiving within transactions, 430
    transactional messaging, 429
    transactional queues and, 429
    window, viewing in Spy++, 634
Message log view, in Spy++, 631
Messaging API. See MAPI
METHOD_PROLOGUE macro, 285
methods. See also individual method names
    adding to objects, 276
    determining, 761
MFC, 86, 290
    active document containers and, 333
    active document servers, implementing, 334
    ActiveX ControlWizard, 184
    advantages/disadvantages, 110
    ANSI and, 88
    architecture, 89
    vs. ATL, when to use, 110
    classes, 88, 99, 100, 565, 577. See also individual class names
    creating ActiveX controls, 184
    creating COM servers, 277
    creating ISAPI DLLs, 336
    creating ISAPI server extensions/filters, 339
    creating secondary threads, 311
    DDV/DDX, 171
    debug macros, 602
    default handlers, 576
    error handling in applications, 566
    exception handling and, 565
    exception macros, 569
    exception objects, 562
    exceptions and, 565
    features, 87
    functions, exception support, 565
    libraries, 99
    limitations, 87
    macros, 283
    multithreading and, 311
    platforms, 88
    property page functions, 192
    regular vs. extension DLLs, 340, 341
    serialization and, 489
    stock events, adding, 190
    TRACE macro and, 579
    UI objects, updating 92
    UNIX and, 88
    writing code in, 492
MFC applications
    adding help-file links to the Web, 141
    implementing context-sensitive help in, 139
    toolbars, 155
    types of help in, 137
MFC AppWizard, 97, 334, 563
MFC ClassWizard, 89
MFC library, 86
MFC sockets design, 491
Microsoft ActiveX controls and user service layer, 15
Microsoft ActiveX Data Objects. See ADO
Microsoft Data Access Components. See MDAC
Microsoft Distributed Transaction Coordinator. See MS DTC
Microsoft Exchange, 27
Microsoft Index Server, 27
Microsoft Internet Information Server. See IIS
Microsoft Jet, 32
Microsoft JScript, 20
Microsoft Message Queuing Services. See MSMQ
Microsoft Open Database Connectivity. See ODBC
Microsoft Solutions Framework. See MSF
Microsoft Transaction Services. See MTS
Microsoft Universal Data Architecture. See UDA
Microsoft Visual Basic, 7, 16, 235
Microsoft Visual Component Manager, 62
Microsoft Visual J++, 16
Microsoft Visual Modeler, 59, 62-64
Microsoft Windows, 27
Microsoft Windows DNA, 15
Microsoft Windows Graphics Device Interface. See GDI
Microsoft Windows Sockets, MFC and, 86
middle-tier component development, 235
MIDL
    compiler, 233, 257
    interface declarations, 260
m_nCurPage function, 103
modal dialog boxes, 163, 164
modeless dialog boxes, 164
modeling
    data, 59
    as part of design, 734
    UML, 719
models, 63, 734
    activity, 738
    class, 749
    programming, 767
    state, 752
    thread, combinations, 115
    UI threading, 114
    use case, 736
ModifyMenu function, 152
Module Dependency Tree, 629
Module List, 629
modules, 628, 743
most-recently used, 96
m_pErrorInfo member, 569
MQIS, 405, 406, 411-16
m_rectDraw member, headers and footers and, 107
MS DTC, 430-32, 583, 625
MSF, 712, 720, 722, 761
MSF Application Model, 11, 722
MSF Design Process Model, 722
MSF Enterprise Architecture Model, 721
MSF Process Model for Application Development, 721
MSF Risk Management Model, 721
MSF Team Model for Application Development, 721
MSMQ, 356, 404, 410, 679
    APIs and, 412
    architecture, 405
    asynchronous communication and, 404
    client computers, types, 406
    clients, dependent/independent, 406
    Connector Server, 404
    cursors, creating, 423
    enhanced, 404
    enterprise, 405
    Explorer, 410
    Information Store. See MQIS
    installing, 406
    interfaces for writing applications, 412
    internal transaction coordinator, 430
    LQS and, 414
    messages, receiving, 422
    messages, sending, 419
    peeking, 422
    private queues and, 414
    queues, creating, 413
    queues, deleting, 427
    queues, locating, 416
    queues, opening, 418
    Rel parameters and their values, 417
    sites, 405
    standard, 404
    transactional queues and, 429
    transaction coordinators, 429, 432
    versions, 404
MSVCRT, 628
MTA, 115
MTA model, 116
MTA threading model, ATL support in, 318
MTS, 17, 349, 625, 747
    activities/transactions, understanding, 392
    administering server programmatically, 365
    administration objects, 365
    advanced techniques, 380
    benefits of using, 353
    client configuration utility, 677
    components, 359, 675
    configuring, 362, 363
    defined, 353
    designating objects for, 367
    designing with, 389
    developing objects for, 367
    DLLs and, 620
    error handling and, 579, 583
    exceptions and, 582
    failfast and, 583
    forbidding exceptions, 583
    interception and, 353, 369
    managing activities, 395
    negative HRESULT codes and, 583
    objects, 367, 376, 648
    operation, 392
    packages, 676
    packaging objects for, 371
    scaling applications, 389
    sending messages with transactions, 432
    structures, 357, 361
    as surrogate host, 620
    techniques, advanced, 380
    transactional messages and, 430
    transactions and, 350
MTS-based applications, creating, 386
MTS Explorer, 355, 583, 592
MTS Spy, 392
multilayer design, 10, 34
multiple
    do cument types, 93
    page, printing/previewing, 101
    tables, querying, 456
    views, 93, 95
multiple-document interface. See MDI
multiple-file change control systems, 45
multiplicity of class associations, 751
multithreaded, 113
    applications, 113
    components, 311, 318
multithreading, 311, 319
multitier design, 12, 13
multitiered programs, error handling in. See distributed applications
mutexes, 316, 317

N
n-tier
    application architecture, 34
    applications, 223
    design, 28
    distributed applications, designing, 62
native applications, 15, 16
navigation, 142, 161
networks, handling exceptions in, 577
network topology, 759
new
    files, opening, 489
    operator, 120, 121, 125, 558, 562
    statements, tracking, 604
nongenerative patterns, 715
nonsignaled mutexes, 317
normalization of data model, 62
Notepad, 669

O
object identity, 225
object lifetime management, 221, 225
Object Management Group. See OMG
object-oriented frameworks, 6
object request broker. See ORB
objects, 109. See also individual object names
    activating, 229
    adding, 372
    COM, 219
    COM vs. MSF, 744
    Command, 506, 539
    commands and, 91
    as components, 217
    constructor, 120
    for control, 747
    data source, 538
    database, 470
    destructor, 121
    graphic, creating in a DC, 98
    identity, 225
    implied, 747
    inner, 329
    inviting into same activity, 387
    iterating, 748
    life of, 120
    lifetime management, 221, 225
    memory allocation, 124
    MTS and, 367, 371, 376
    outer, 327, 330
    pooling, 371
    properties and methods, adding, 276
    properties of, 375
    refining, 748
    reusing with containment, 329
    rowset, 539
    surrogate hosts and, 620
    UI, 91, 92
    viewing, with OLEView, 69
.ocx files, 178
ODBC, 15, 26, 31, 525-532, 625
    API, 497
    errors, 589
    MFC and, 86
    when to use, 497
ODBCDirect, 31, 497
ODL, 260
OLE
    COM and, 218
    MFC and, 86, 87
oleautomation, 258
OLE DB, 27, 31, 536-543, 589
OLE DB for Data Access, 15
OLE RPC Debugging, 617
OLEView, 68-69
OMG, 713
OnBeginPrinting function, 102
OnColors function, implementing, 199
OnDraw member function, 100
OnDraw methods, 184
OnEditClearAll function, 91
OnEndPrinting function, 102
online help, HTML Help, 136
OnOptionsStdcolors function, 199
OnPrepareDC function, 102
OnPrepareDC member function, 104
OnPreparePrinting function, 102, 109
OnPreparePrinting member function, 104
OnPrint function, 102
OnPrint member function, 104, 106
OnUpdateEditClearAll command handler, 92
OnUpdateItem function, 150
Open Database Connectivity. See ODBC
open windows in Spy++, listing, 632
operating systems, exception handling and, 558
operations, class, 735, 749
operators, new, 558, 562
ORB, 353
original caller vs. direct caller, 383
[out] attribute, function of, 258
outer joins, 457
outer objects, 327, 330
out-of-process components, creating using ATL, 304
out-of-process servers, 304, 344
out-of-process threads, 117
OutputDebugString function, 582
output parameters, handling, 521

P
packages
    adding objects to, 372
    creating roles for, 381
    exporting, 377
    importing, 378, 393
    library, 357, 375
    load balancing, 384
    in MTS, 357, 676
    properties, 374
    security, making available, 380
    server, 357, 375
packaging COM components, 674
packaging and deploying, distributed applications, 694
pages, printer vs. document, 105
pagination, 103, 106
parallel deployment, 680
parallelism in application development, 13
parameterized information, setting, 547
parameterized queries
    creating with CDynamicParameter Accessor, 547
    executing with ADO, 519
parameters
    attributes of, 258
    CancelDisplay, 576
    filter, 560
    passing to a stored procedure, 520
    TRUE/FALSE, 423
    types, limiting to Automation, 258
    values, setting, 549
parent classes, 280
Parent Import Function List, 629
ParseStandardArgs function, 322
PATHs, 658
patterns, 715, 716
PECs, 405
peeking, 422
performance testing, 40
permissions
    access/launch, setting, 644
    security, 307
    specifying for launching a server, 308
persistable objects, creating, 434
persistence, implementing, 487
persistent caching, and ZAW, 691
phases of UP, 720
Physical Design, 753
    analysis, 754, 757
    completing, 769
    implementation, 755, 766
    output, 769
    rationalization, 755, 762
    relationship to Logical Design, 742
    research, 754, 755
    steps, 754
physical design phase, 724
Ping utility, 625
plan-while-building approach, 3
platform-neutral UI framework, 20
platforms, 88
Platform SDK, 269, 277, 291
    building COM servers with, 268
    Guidgen.exe, 224
pointers. See individual pointer names
pooling objects, 371
pop-up help windows, 134
portability, 88
primary enterprise controllers. See PECs
PRIMARY KEY constraints, 480
primary site controllers. See PSCs
primary threads, 311
printer pages, vs. document pages, 105
printf statement, 579
printing, 99-101
    allocating GDI resources and, 107
    headers and footers, 106
print preview, 99-101, 107-8
print-time pagination, 106
private queues, 414
process isolation. See IIS processisolation
processes, 43
    core, 728
    priority values, 313
processors, 88
Processes view in Spy++, 631, 633
product evaluations, 7
production, 39-43
production stage, 41
product mindset, 6
ProgIDs, 219, 266
program errors, 558
programmatic security, 306
programming
    declarative, 354
    editor, 57
    model, 767
programs
    client, creating, 241
    debugging, 599, 609, 621
    errors, 599, 602, 626
    evaluation, 639
    files, including/removing, 670
    stepping through, 611
    testing, 599
    uninstall, 657
Programs menu, 662, 663
project-based security, 50
projects, 46
    aligning with business goals, 5
    phases, languages for, 6
    in VSS, 46, 51
project settings, resetting, 311
proof-of-concept, 7, 17, 733
properties
    adding to objects, 276
    default, DCOMCNFG, 66
    determining, 761
    of objects, 375
    of packages, 374
property pages, 168, 191-93
property sheets, 168, 169
[propget], 258
[propput], 258
prototypes, 7
provider classes, 541
providers, 537
proxy/stub DLLs, 233, 260
proxy/stub technology, 232
PSCs, 404
pure virtual classes, 255
pure virtual functions, 250
purging messages, 428

Q
QueryInterface, 261
QueryInterface function, 261, 262, 267, 278, 326
queues
    creating, 413, 679
    dead letters, 422
    defined, 404
    deleting, 427
    local, 406
    locating, 416
    LQS, 414
    opening, 418
    private, 414
    transactional, 429
QuickWatch tool, 610

R
rationalization
    of Logical Design, 747
    in use case model, 738
Rational Rose, 63
RDO, 27, 31, 496
realloc function, 125
rebars, 157
records, 514-17, 531
Recordset objects
    in ADO, 502
    creating, 508
recordsets, 509-518, 530, 531
reference counting, 221
reference help, 133
referential integrity, 29
Regedit utility, 661
Regedit.exe, 308, 310
RegisterServer function, 272
Registers window, 610, 611
RegisterTypeLib API, 233
RegisterTypeLib function, 266
registry
    COM, 230
    files, 660
    information, 473, 657
    RegisterTypeLib API, 233
    settings, configuring, 64
    settings, in COM, 231
regression testing, 636
Release function, 262, 326
Release mtstran1 button, 400
ReleaseMutex function, 317
release versions, 601, 695
Rel parameters, values, 417
remote
    access, 308
    administration, 390
    COM calls, 22
    components, 24, 623
    computer, specifying for an out-of-process component, 624
    COM servers, registering, 684
    modules, errors and, 577
    objects, 614, 620, 621, 643
    process, attaching debugger to, 621
    remote server names, determining, 674
    servers, usage, 302
    stored procedures, 459
Remote Data Objects. See RDO
Remote Procedure Calls. See RPC
RemoteServerName key, 624
RemoteServerName value, setting in registry with Dcomcnfg.exe, 231
RemoveMenu function, 152
requirements, changes, 34
Requirements Workflow, 719
resource manager. See RM
resource pooling, 538
resources, adding to menus, 142
result sets, cursors and, 485
retrieving, guidelines, 451
return codes, handling, 521
return on investment. See ROI
return value testing, 559, 563
[retval] attribute, function of, 258
reusability in application development, 13
rich-text format files, 135
risk management, 7, 756
RM, 352
robust code, 559
ROI, 5, 13, 43
role-based security, 354, 380
roles, 361, 381, 382
ROLLBACK TRANSACTION statement, 461
root objects, 582, 583
routing servers, 405
rowsets, 539-544
RPC, 22
.rtf files, 135
rule of three, 715
rules, business, for data access, 28
Run member function, 89, 324
Run to Cursor command, 611

S
SaveStatus function, 322
SayHello method, 394, 398
scalable applications, 34
scenarios, 730, 731
SCM, 229, 263, 266
SCODE, 570
SDI, 142
SDK, 183, 490
secondary help windows, 134
secondary threads, 311
security, 19
    activation, 229
    affecting programmatically, 382
    authentication, 307
    call, 229
    COM, 229, 306
    data access, 29
    DCOM, 306
    declarative, 306
    default, DCOMCNFG, 65
    options, configuring, 68
    packages and component, 380
    permissions, 307
    programmatic, 306
    project-based, 50
    protection, 302
    role-based, 354, 380
    testing for, at method level, 382
    in VSS, 50
SEH, 560, 562, 564
SELECT statement, 450
self-registering components, 682, 683
serialization, 487, 489
Serialize function, 488
server packages, 357, 358, 375
servers
    active documents, 333, 334
    COM types, 304
    extensions, creating, 339
    in-process, debugging, 615
    out-of-process, debugging, 617
    registering, 473
    specifying permissions for launching, 308
server-side cursors, 486
service-layered applications, 223
service layers of MSF, 761
service providers, 537
services, 743
    16-bit programming, MFC and, 88
    business, 22
    callback functions, 320
    communicating with, 324
    component, 6
    for control, 747
    ControlService function and, 324
    creating, 320
    data, 25, 28
    implied, 747
    initializing, 323
    installing/removing, 325
    main function, implementing, 322
    major functions of, 320
    managing, 325
    of MSF Application Model, 11
    running, 324
    writing code, 323
services-based approach, 10
sessions, 538
SetAbort method, 388, 584
SetCheck function, 150, 583, 584
SetComplete method, 388
SetHeight function, 155
SetMaxPage, 104
_set_new_handler function, 593
SetPad, 663, 665
setting
    Command properties, 506
    parameterized information, 547
    parameter values, 549
    recordset properties, 509
Setup.exe program, creating, 671
setup programs, 654-56, 666, 704, 706
shared classes, 236
shared modules, usage counts for, 659
sharing, 235, 236
    violations, 625
    in VSS, 48, 51
shortcut menus, 150, 151
shortcuts, 147
signaled mutexes, 317
single-document interface. See SDI
single-file change control system, 45
single-threaded, 113
single-threaded objects, 109
site licenses, 687
sites, MSMQ, 405
SMS, computer inventory, 692
sockets, closing without notifying server, 494
software
    development process, shifting, 4
    installation and maintenance, 690
    licensing, 687
    deployment, 692
software development kit. See SDK
source files, sharing among projects, 235
splitter windows, 93
Spy++, 631-34
SQL, 448, 625
SQLConnect, 625
SQL queries, 519
SQL Server, 405, 469-476
SQL Server Enterprise Manager, 472
STA, 115, 117
STA threading model, ATL support in, 318
stacks, 119
stack unwinding, 120
standard marshaling, 368
Standard Template Library. See STL
StartDoc member function, 102
StartPage member function, 102
StartService function, 322
statements. See individual statement names
state model, 752
static cursors, 510
static libraries, solving sharing problems, 235
static load balancing, 384
status bars, 158-160
StdAfx.h, global threading model, 319
Step Into command, 611, 612
Step Out command, 611, 612
Step Over command, 611, 612
stepping through code, 611
Step tools, 611
STL, 111
stock events, 190
stock property pages, 193
stored procedures, 458-460, 519, 520
storing data, 481
strategic value, 5
strategies, data access, choosing, 498
stress testing, 636
structure definitions, VARIANT, 258
structured exception handling. See SEH
Structured Query Language. See SQL
structures. See also individual structure names
    of MTS, 357
    setting data breakpoints for, 607
stub and proxy system, 232
subkeys, AppID, 309
submenu commands, inserting, 146
SUCCEEDED macro, 571, 582
Summarize function, 28
surrogate process, 24
surrogate processes for components, 354
surrogates, 620, 621, 624
SuspendThread function, 314
switches, 563
synchronization, mutex object, 316
synchronizing threads, 315, 319
synchronous error notifications, 574
systems, 43
    services, 119
    lockdown, 691
    tables, 477
    testing, 636

T
table of contents, 135, 137
tables system, 477
task-oriented help, 132
tear-off interfaces, 109
technology, candidate, 757, 758
templates
    classes, 252, 255
    documents, 94
    libraries, vs. standard C++, 109
temporary stored procedures, 459
terminating threads, 314
test assumptions, without adding permanent code, 602
Test Container. See ActiveX Control Test Container
test harness, 638, 639
testing, 599
    components in separate packages, 396
    distributed applications, 636
    for security, at method level, 382
    HRESULT codes, 571
    methods, 637
    packages in different computers, 397
    return values, 559
    scenarios, 636
    stage, 40
    terminology, 636
Testing Workflow, 719
test plans, 637
test scenarios, 638
text editor, 57
THIS pointer, 262, 278
Threading Model, combinations, 117
threading models, 318, 319
Threading Model value, 116
threads, 113-17, 311-15
Threads view, in Spy++, 631, 633
three-tier applications, 10
throw keyword, 562
time-trial evaluation software, 687
toggle switches, 149
Toolbar Editor, 153
toolbars, 152-57
tools, 57, 62
ToolTips, 156
topologies, 756
    component, 761
    data, 760
    network, 759
TP, 353
TRACE macro, 579-582, 592
TrackPopupMenu function, 150
Transact-SQL, 448
Transaction Statistics, 399
transactional messages, 433
transactional messaging, 429
transactional queues, 429-433
transactions, 350
    activity monitor, 584
    atomic, 351
    COM and, 352
    consistent, 351
    controlling flow of, 386
    coordinators, 429-433
    coordination, 351, 356
    criteria, 351
    determining longevity of, 386
    durable, 351
    handling, 505
    isolated, 351
    managing, 397, 495
    MTS and, 350
    MTS Explorer and, 584
    processing. See TP
    understanding in MTS, 392
Transition Phase, 720
triggers, 461
troubleshooting COM objects, 625
TRUE, returning, 239
TRUE/FALSE parameters, 423
TRUNCATE TABLE statement, 455
try block, 574
try C++ keyword, 562, 567
try-catch blocks, 572
__try keyword, 560, 562
try keyword, 562, 567
two-phase commits, 351
type libraries, 259, 266
type library marshaler, 258, 260
type library marshaling, 368

U
UDA, 27, 483, 484
UIs, 14
    command handler functions, 148
    creating, 197
    design, 753
    framework, platform-neutral, 20
    native and Web-based, 18
    navigation in, 142
    objects, 89-92
    threading model, 114
    threads, 114
    ToolTips, 156
    Web-based, 16
UML, 6, 63, 712, 722, 728
    activity diagram, 739
    diagrams, 713, 734
    includes, 738
    Visual Modeler and, 62
"unhappy" flags, 387
Unified Modeling Language. See UML
Unified Process, 712, 719, 720, 722, 728
Unified Software Development Process. See Unified Process
uninstall programs, 657
unit testing, 636
universal storage approach, 25, 26
UNIX, MFC and, 88
UpdateAllViews member function, 95
UPDATE statements, 455, 464
UPDATE triggers, 464
upgradability, 250
UnregisterServer function, 272
UpdateData function, 173
usage
    counts for shared modules, 659
    scenario, 41
    testing, 40
use case models, 41, 736, 738
use cases, 41, 729, 738, 743
user interface. See UIs
user service design, 15
user service layer, 15, 16, 18
user services, 11
users, input, 94
UUIDs, 257

V
validation, 171-75
VALUES clause, 454
variables, member, creating, 244
Variables window, 610
VARIANT, 258
verification, 748
VERIFY macro, 602, 603
version control, 45, 47
versioning interfaces, 228
views, 93-95, 632
virtual functions, 255
    and managing document creation, 489
    introduced, 249
    lack of, 238
    pure, 250
    using, 250
virtual storage access method. See VSAM
Visio, 63
visual
    data modeling, 59
    tools, using, 62
Visual Basic, 27
    ActiveX controls and, 218
    interfaces, 221
Visual C++, 16
    integrated debugger, 600, 605, 615, 621, 622
    libraries, 86
    Watcom C++ and, 250
Visual C++ run-time library, 89
visual display, 21
visual merge, 49
Visual SourceSafe. See VSS
Visual Studio, dialog template in, 165
VSAM, 29
VSS, 45-51
vtables, 220, 249, 255

W
WaitForSingleObject function, 317
WAN, 19
Watch window, 610
Watcom C++, Visual C++ and, 250
Web
    adding HTML Help file links for applications, 141
    browsers, 20, 21
    deployment over, 687
    development, 38
    distributing application updates, 688
    pages, visual display, 21
    servers, 336, 337
    sites, HTML Help, 136
Web-based applications, 18, 19
Web-based deployment, 687
Web-based interfaces, with dynamic HTML, 17
Web-based user service layer, 16
what you see is what you get. See WYSIWYG
WHERE clause, 451, 452
wide area network. See WAN
wildcard characrters, 452
Win32 API, 15
Window Finder Tool, 632, 633
Windows
    applications, MFC classes and, 88
    help systems, 133
    HTML Help, 136
    messages, 90
windows
    messages, viewing in Spy++, 634
    splitter, 93
Windows 2000, authentication in, 306
Windows 95, 303
Windows 98, DCOM support for, 302
Windows Distributed interNet Application. See Windows DNA
Windows DNA, 10, 24
Windows Installer, ZAW, 691
Windows NT, 306, 320-25, 583
Windows NT 4
    testing DCOM with, 303
    installing ZAW, 692
Windows NT Directory Service API, 26
Windows NT Directory Services, 27
Windows NT Event Viewer, 626
Windows NT Event Viewer Application Log, errors and, 583
Windows program deployment, 686
Windows Scripting Host. See WSH
Windows view, in Spy++, 631, 632
WinError.h file, 571
WinError.h header file, 572
WinHelp, 137, 141
WinHelp files, 135, 138
WizardBar, 89
wizards, 133
WM_COMMAND messages, 89, 90
WM_PAINT message, 101, 108
WordPad, 158, 666
worker threads, 114, 575
workflows, 719
working folders in VSS, 47, 51
World Wide Web. See Web
WSH, 363
WYSIWYG, 142
WYSIWYG applications, 105

X
XML, 16

Z
ZAW, 690-92
Zero Administration for Windows. See ZAW

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews