Programming with Managed Extensions for Microsoft Visual C++ .Net Version 2003

Programming with Managed Extensions for Microsoft Visual C++ .Net Version 2003

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 583 p.
  • 言語 ENG
  • 商品コード 9780735617827
  • DDC分類 005.268

Full Description


The compiler and linker extensions in Microsoft Visual C++ .NET provide specific capabilities that programmers can't get using Microsoft Visual C#. Programmers learn how to make the most of these extensions with this enlightening guide-updated for Visual C++ .NET 2003 and written by an authority on the subject. The book reveals the special programming rules for Managed Extensions and shows how to use them to write .NET libraries and applications. It also discusses the many features that are new to Visual C++ .NET 2003. This guide is ideal for developers who use Visual C#, but want to make the most of the unique facilities in Visual C++ .NET.

Contents

Acknowledgments xiii Introduction xv 1 Managed Types 1 New Keywords in Visual C++ .NET 1 MSIL and Native Code 4 C++ Primitive Types 7 Managed Types and Value Types 9 Managed Objects 11 Value Types 18 Managed Pointers 24 Managed References 29 Passing by Reference and by Value 30 Properties 31 Delegates and Events 38 Attributes 43 Managed Interfaces 50 Managed Strings 57 Managed Arrays 61 Exceptions and Managed Code 70 Implementing .NET Types 76 Namespaces 77 Inheritance 79 Exporting and Importing Types 82 Casts and Conversions 88 Managed Operators 92 Creating and Destroying Objects 95 Entry Points 98 2 Interop 101 It Just Works! 103 Native C++ Classes 103 CRT and Static-Link Libraries 117 C++ Standard Library 119 Managed Pointers in Unmanaged Types 119 Global Methods 123 Platform Invoke 126 DllImport 127 Platform Invoke Under the Covers 131 Platform Invoke and Parameters 132 Calling Win32 APIs Using IJW 140 Marshaling 145 Exceptions 149 COM Interop 151 .NET and COM Objects 152 Tools 157 .NET COM Attributes 162 Activating COM Objects 165 Method Parameters 166 Using COM Types in .NET 167 Using .NET Types from COM 169 Exceptions 171 Marshaling .NET Objects 171 Threading 172 3 Delegates and Events 175 Delegates as Type-Safe Function Pointers 175 Function Pointers with Unmanaged Code 176 Function Pointers and Global Functions 179 Delegates 180 Delegate Parameters 183 Multicast Delegates 184 Delegates as Smart Function Pointers 187 Exceptions and Delegates 188 Delegates and Interop 190 Marshaling Delegates 193 Asynchronous Programming 195 Parameters and Asynchronous Delegates 195 Calling Delegates Asynchronously 197 Asynchronous Calls and Exceptions 204 Asynchronous Calls and the .NET Framework Class Library 205 Managed Events 207 The .NET Framework and Events 211 Unified Event Model 212 COM Events 216 Writing Multithreaded Code 224 Managed Threads 224 Thread States 230 Foreground and Background Threads 231 Thread Local Data 232 Threads and Exceptions 235 Synchronization Objects 237 Thread Pool 241 Synchronized Contexts 243 4 User Interface Development 247 Developing Windows Forms with C++ 247 Components and Containers 248 Building GUI Applications 263 Visual Studio Designers 265 Toolbox 267 Server Explorer 268 Component Designer 269 Windows Forms Designer 274 Referencing Assemblies 277 Components and Events 278 Using GDI+ 279 Graphics Class 281 Coordinate Structures 284 Coordinate Transforms 285 Clipping Regions 288 Colors 290 Pens 290 Brushes 292 Bitmaps 293 Cursors 295 Icons 297 Text and Fonts 297 Graphics Paths 299 Regions 299 Controls and Forms 300 Where s the WndProc? 301 Standard Windows Controls 306 Exceptions 307 Events, Properties, and Status 308 Controls and ActiveX Interfaces 310 Control Handles 313 Drag and Drop 315 Superclassing 317 Standard Forms 318 Event Handling Strategies 319 Using Windows Header Files 321 Using Managed Resources 322 Assemblies and Win32 Resources 323 Managed Resources 324 Compiled Managed Resources 325 Localization 330 Localization with Visual Studio .NET 333 5 Systems Programming 335 Assemblies 335 Portable Executable Files 336 Metadata Directory 339 Reading Metadata 341 Assembly Format 346 Assembly Configuration 351 Versioning and Fusion 372 Security 379 Assembly Validity and Verification Checks 380 Code Access Security 381 Role-Based Security 384 Verifiable Code 386 Unmanaged .NET Services API 388 Enumerating Managed Processes 388 Getting Information About the Garbage Collector 390 Validation and Verification 391 Managed Thread Pool 393 Strong Names and Crypto Keys 394 Hosting the .NET Runtime 396 6 Building Code with Visual C++ .NET 401 Visual Studio .NET IDE 401 Commands 402 Projects, Solutions, and Configurations 405 Visual Studio .NET Options 423 Editing Code 424 Visual Studio .NET Command Line 432 The DTE Object 435 The Visual C++ 7 Libraries 437 Project Types 438 Console Application 440 Windows Forms Application 442 Windows Control Library 444 Managed Class Libraries 444 Windows Service 445 ASP.NET Web Service 450 Web Service Clients 454 Managed Object Files and Modules 456 Compiling Code 457 Compiler Switches 457 Linker Switches 461 Optimization 463 Build Steps 464 Examples of Common Solutions 465 Multiassembly Solutions 465 Multimodule Solutions 467 Projects That Use Resources 467 Solutions That Have Satellite Assemblies 469 7 Debugging 471 Writing Code for Debugging 472 Debuggable Code 472 .NET Conditional Code 475 Tracing Code 476 Assertions 491 Symbol Files and Managed Code 501 Making Code Easier to Debug 506 Using the Visual Studio .NET Debugger 507 Locating Assemblies 508 Starting the Debugger 508 Debugging Processes 515 Debugging Mixed Code 528 Debugging Multithreaded Code 529 Debugging Across Application Domains 531 Windows Forms Debugging 532 Remote Debugging 533 Profiling 536 A .NET Framework Libraries 543 Strings 543 Character Characterization 543 String Routines 544 Data Conversion 545 Files and I/O 545 Stream I/O 545 Console I/O 546 Formatted Output 546 File Handling 547 Directory Routines 548 Process and Environment Control 548 Time 549 Containers 549 B Further Resources 551 Tools 551 ILDASM 551 Anakrino 552 Reflector 552 MetaInfo 552 Rotor 552 DUMPBIN 553 PEDump 553 DbgView 553 RegMon 553 Tools Supplied with This Book 554 Profiler 554 HexDump 554 DumpInterfaces 554 DumpDotNet.scr 554 Books 555 INDEX 557