Training
Certifications
Books
Special Offers
Community




 
Programming with Managed Extensions for Microsoft® Visual C++® .NET
Author Richard Grimes
Pages 564
Disk N/A
Level All Levels
Published 07/31/2002
ISBN 9780735617247
Price $49.99
To see this book's discounted price, select a reseller below.
 

More Information

About the Book
Table of Contents
Sample Chapter
Index
Companion Content
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books

 

Index


Symbols and Numbers
& (address-of operator), 13-14, 17, 23, 163
<> (angle brackets), 3
* (asterisk), 320-21
// (comment character), 385, 410
-= (decrement operator), 35, 37, 194
. (dot operator), 22, 43
== (equality operator), 54
> (greater-than symbol), 364
+= (increment operator), 35, 37, 170-71, 194
"" (quotation marks), 3
:: (scope resolution operator), 43, 80-81
+ (scoping operator, metadata), 81
; (semicolon), 379
/ (slash), 81
[] (square brackets), 32-33, 40, 60, 130

A
Abort method, 214
abstract classes, 15-16, 74
_abstract keyword, 15-16, 39 n.5, 74
access checks, 348-52
Activator class, 336-37, 346
active form, 285
Active Template Library (ATL), xix, 75, 128-29, 232, 494-95
ActiveX controls, 252, 288, 289
ActiveXImpl class, 286
ActiveXInstance property, 286
ActiveX interfaces, controls and, 285-88
Add Class wizard, 389
Add Member Function wizard, 389-90
Add Member Variable wizard, 389
add_ methods, 37, 194, 244
address, breakpoint, 473
address-of operator (&), 13-14, 17, 23, 163
AdjustableArrowCap class, 266
Administrators access, 349, 462
Advise method, 202, 203
/AI switch, 3, 413, 461
al.exe tool, 301, 307, 348, 422
aliases
   command, 364-65, 367
   namespace, 73
AllocateNamedDataSlot method, 218
AllocCoTaskMem method, 127
AllocHGlobalMem method, 127
Alloc method, 105
AllowDrop property, 291
ampersand (&), 13-14, 17, 23, 163
Anakrino tool, 510
anchored controls, 283
angle brackets (<>), 3
ANSI characters, 42, 53, 118, 251
apartments, COM, 140-41, 153-54, 252-53, 290, 399
ApartmentState property, 153-54, 290
AppDomain class, 340
AppDomainSetup class, 340
APIs. See unmanaged metadata API; unmanaged .NET services API; Win32 APIs
application configuration files, 325-29, 340-41, 346-47, 400-401. See also configuration files
application domains
   COM interop and, 92
   debugging across, 486-87
   delegates and, 190
   hosting .NET runtime and, 359-62
   passing parameters and, 28-29
   per-user configuration files and, 340-41
   unhandled exceptions and, 221-22
applications
   ASP.NET, 326, 359, 404-8
   building GUI, 250-53. See also controls; forms; GDI+; resources, managed; Windows Forms
   configuration file settings for, 325-29, 340-41,
346-47, 400-401. See also configuration files
   console vs. GUI, 308
   debugging .NET remoting, 489-90
   domains. See application domains
   projects for managed, 398-401. See also projects; solutions, configurations, and
Applied Microsoft .NET Framework Programming, 43
<appSettings> configuration file section, 325-29
AppSettings property, 328
AppSettingsReader class, 327, 340
ArgumentException, 67
Array class, 57-64
arrays
   enumerations and, 174
   inheritance and, 75-76
   managed, 20, 56-64
   as platform invoke parameters, 119-20
   of unmanaged strings, 94-95
ASP.NET applications, 326, 359, 404-8
assembler, 510
assemblies, 309-48. See also executable files; libraries
   attributes and, 41
   COM interop, 143-44
   compiling, 2-4. See also compiling
   configuration and, 324-41. See also configuration files
   culture and, 306, 321-22
   disassembly of, 475-76, 509, 510
   format for, 319-23
   GDI+, 255
   GUI development, 233
   implementation of native C++ classes in, 98-100
   locating, 143, 321, 346-48, 417-18, 460-62. See also .NET Fusion technology
   metadata, manifests, and, 309, 319-20. See also manifests; metadata
   metadata directory, 312-14
   modules and, 402. See also modules
   multiassembly solutions, 416-20
   nested, 100
   portable executable files and, 310-12. See also portable executable files
   preJITted, 345-46
   private, 343
   publisher policy files, 348
   reading metadata, 314-19
   satellite, 307-8, 321, 421-22
   security and, 350-52
   shared, 3, 143, 343-45
   strong names, 322-23
   tracing and, 430
   versioning and, 341-48
   versions, 300, 320-21
   visibility and, 77
   Win32 resources and, 299-300
[AssemblyAlgorithmId] attribute, 322
[AssemblyCulture] attribute, 321-22
[AssemblyFileVersion] attribute, 321
[AssemblyKeyFile] and [AssemblyKeyName]
attributes, 323
/assemblymodule switch, 414
/assemblyresource switch, 301, 414-15
[AssemblyVersion] attribute, 300, 320-21
_ASSERT and _ASSERTE macros, 452-54
assert function, 452
assertions, 444-54
   CRT asserts, 452-54
   .NET asserts, 445-52
   tracing and, 429
Assert method, 445
asterisk (*), 320-21
asynchronous programming, 179-92. See also delegates
   asynchronous calls and exceptions, 189-90
   asynchronous calls and .NET Framework class library, 190-92
   calling delegates asynchronously, 181-89
   parameters and asynchronous delegates, 180-81
   synchronous programming vs., 179-80
   Win32 types and, 124
AsyncResult class, 182
AsyncState property, 188
ATL (Active Template Library), xix, 75, 128-29, 232, 494-95
attaching to running processes, 462-63, 465-66
Attribute class, 39, 44
attributes
   ATL, 494-95
   custom. See custom attributes
   [DllImport], 110-15
   managed types and, 38-45
   marshaling parameters, 119
   .NET COM, 144-47
   parameters and, 14
   serialization, 28-29, 49, 178
[AutomationProxy] attribute, 153
AutoResetEvent class, 222
AxHost class, 288
aximp.exe tool, 288

B
background fills, 267
BackgroundImage property, 269
background threads, 215-16, 227
BadImageFormatException, 4
base classes
   constructors, 74-75, 88-89
   superclassing, 293-94
   Windows Forms, 245-46
BeginInit method, 248
BeginInvoke method, 163, 180-82, 186
BeginPaint method, 279
behavior, interfaces and, 47, 48, 138
binary editor, 512
BinaryFormatter class, 304-5
binary operators, 85-86
binary resources, 298, 302
BinarySearch method, 62
Bitmap class, 268, 271
bitmaps, 268-70, 271
BitVector32 class, 285
bloat, registry, 324-25
block comments, 385
books, 512-13
BooleanSwitch class, 329-30
BOOL type, 122
boxing, 9, 22-24
breakpoints
   running to, 470
   setting, 471-73
   symbol files and, 456
browsing, type, 373-74
Brush class, 267
brushes, 257, 264, 265, 267-68
Brushes class, 267
buffers, Win32, 128, 323
build number, 44, 320
build steps, 415-16
build tools, 368, 372, 377-78, 411-16. See also compiler; linker

C
C++. See Visual C++ .NET
C run-time library (CRT)
   asserts, 452-54
   entry point, 89
   .NET Framework equivalents for, xix, 501-6. See also .NET Framework libraries
   static link libraries and, 103-4
   tracing, 443-44
C#
   array parameters, 64
   comparing strings, 54
   designers, 240
   indexed properties, 32-33
   as .NET language, xv
   parameters, 14
   resources and, 301
   Web service clients, 408-9
Callback method, 277-79
callbacks, function, 155, 174. See also delegates; events
calling conventions
   CRT and static-link libraries, 104
   delegates, 176
   [DllImport], 113-14
   global functions, 161
   .NET runtime, 12, 98, 162, 176
calli opcode, 161
calls, asynchronous. See asynchronous programming
call stack, 350, 474-75
Call Stack window, 474-75
callvirt opcode, 138
CanResume method, 133
Capacity property, 119
cap styles, 266
caption bar, 280
Cartesian points, 257
castclass operator, 244
casting, function pointers and, xvii, 157-58
cast operators, 24, 58, 83-84, 101, 244
catch clauses, 66, 214, 221-22
categories, project, 378
.cctor constructor, 17
CCWs (COM callable wrappers), 140, 152-53, 204
_cdecl calling convention, 104, 113, 161
ChangeType method, 9
character sets. See also fonts
   platform invoke and, 113, 121-22
   project, 378-79
   Unicode and ANSI, 5, 42. See also ANSI characters; Unicode characters
Char class, 52, 501
Chars property, 52
child class destructor, 236
classes. See also objects; types
   abstract, 15-16, 74
   base. See base classes
   collection, 174, 242, 331-32, 507
   container, 247-48, 275, 507
   custom attribute, 44-45
   delegate, 34
   derived, 75-76
   events. See events
   interfaces. See interfaces
   libraries. See libraries
   managed. See types, managed
   methods. See methods
   .NET Framework. See .NET Framework libraries
   properties. See properties
   unmanaged. See interop; native C++ classes
   viewing, 369, 373-74, 389-90, 415-16
class factories, 137
[ClassInterface] attribute, 150
class interfaces, 139, 150
Class View, 369, 373-74, 389-90, 415-16
cleanup, 10, 88. See also garbage collector; memory management
clients, projects for Web service, 408-9
ClientSize property, 261-62
clipboard, 290-91, 477, 512
clipping regions, 263-64
Clip property, 264
Clone method, 17
CloseFigure method, 274
Close method, 49
CLR. See common language runtime
_clrcall calling convention, 12, 98, 162, 176
/clr compiler switch, 1-2, 4, 93, 411-12
CLR debugger, 460
[CLSCompliant] attribute, 39
> cmd command, 364, 480
[CoClass] custom attribute, 145-46
CoCreateInstanceEx function, 137
code
   access security, xviii, 92, 295, 349-52, 489
   compiling, 411-16. See also compiling
   completion, 388
   conditional, 427-28, 445
   debuggable. See debuggable code
   debugging. See debuggers, Visual Studio .NET; debugging
   editing. See text editor
   exceptions and, 65-71. See also exceptions
   generators, 240-42
   groups, 350
   multithreaded. See threading
   native. See native code
   profiling, 491-99
   protecting, with mutexes, 225-26
   source, 510
   symbol files and, 454-60
   synchronous and asynchronous, 10. See also asynchronous programming
   verifiable, 354-55
   wizards, 389-91
code access security, xviii, 92, 295, 349-52, 489
codebase, 143, 207, 347
code-behind files, 404
collection classes
   components, 242
   for configuration section handlers, 331-32
   enumerations and, 174
   .NET Framework library, 507
Collect method, 87, 148, 359
colors, 264-65
colors, code, 383
COM+ interop, 137, 154, 228
CombineImpl method, 169-70
Combine method, 34, 35, 169-70
COM callable wrappers (CCWs), 140, 152-53, 204
[ComEventInterface] attribute, 203
COMException, 117
[ComImport] pseudo custom attribute, 145-46
COM interop, xvi, 135-54. See also unmanaged .NET services API
   COM+ interop and, 154
   COM ActiveX interfaces and controls, 285-88
   COM callable and runtime callable wrappers, 140
   COM objects and registry bloat, 325 n.4
   COM security, 350
   COM servers and, 140-41
   COM types in .NET, 148-50
   COM versioning, 341-42
   exceptions, 151-52
   exporting types, 141-43
   GUI applications and, 252-53
   handling COM events in .NET, 201-3
   handling .NET events in COM, 204-7
   importing types, 143-44
   interfaces and, 137-39
   interfaces defined by .NET Framework, 147
   as interop technology, 92. See also interop
   marshaling .NET objects, 152-53
   .NET COM attributes, 144-47
   .NET objects vs. COM objects, 136-41
   .NET runtime and, 135
   .NET types in COM, 150-51
   object lifetimes, 136-37
   threading and, 153-54
   tools, 141-44
command line
   arguments, 89
   arguments, debugging and, 464-65
   build tool switches, 411
   debugger, 460
   Visual C++ .NET tools, 363
   Visual Studio .NET, 391-93
CommandLine method, 89
command mode, 364, 480
commands, Visual Studio .NET, 363-67
Command window, 364, 476, 477, 480-81
comment character, (//), 385, 410
comments, code, 385, 426-27
comment Web pages, 409-11
common controls, 281-82
common dialog boxes, 294-95
CommonDialog class, 294-95
common language runtime (CLR)
   COM and, 135. See also unmanaged .NET services API
   configuration file startup settings and, 330
   debugger, 460
   hosting, xviii, 359-62
   languages and, xv
Common Language Specification (CLS), 39, 84
Common Object File Format (COFF), 310
common output folders, 418-20
Compare method, 55, 63
CompareTo method, 62
comparison, string, 54-55
compiler. See also compiling
   C++, xix
   exception handling, 71, 104
   JIT. See JIT compiler
   MSIL and, 1-2, 4, 93
   RTTI and, 101
   static linking and, 103
   switches, 411-14
   symbol files and, 455-56
   Unified Event Model and, 197-98
compiling, 411-16
   attributes and, 38. See also attributes
   build steps, 415-16
   build tools, 368, 372, 377-78
   compiler switches, 411-14. See also compiler
   console and GUI applications, 250-53, 308
   decompiler tool, 510
   exceptions and, 71
   Just-In-Time. See JIT compiler
   linker switches, 414-15. See also linker
   managed resources, 299, 302-5, 421
   object files and, 402-3
   optimization, 415
   precompiled headers, 413-14
   to native x86, 4-7
completion, code, 388
Component class, 233
ComponentCollection class, 242
components, 233-50. See also objects
   COM, 136-41. See also Com interop
   container classes, 507
   controls and forms, 245-46
   disposable objects, 234-39, 255, 266-67, 339
   forms as control containers, 246-50
   interface, 239-42
   writing, 242-45
CompoundArray property, 266
[ComSourceInterfaces] attribute, 203, 205
[Conditional] attribute, 427-28, 445
conditional code, 427-28, 445
<configSections> configuration file section, 331-32
Configuration class, 328
configuration files, xviii, 324-41
   adding, to projects, 400
   application settings, 325-29, 340-41, 346-47, 400-401
   assembly configuration and, 324-26
   asserts and, 446
   configuration section handlers, 331-32
   custom configuration sections, 333-37
   diagnostic switches, 329-30
   locating assemblies and, 346-47
   multiassembly solution, 419
   per-user, 340-41
   remoting section, 330
   sections, 326
   startup section, 330
   writing to, 337-40
   XCOPY deployment and, 324-25, 341
Configuration Manager, 380-82
configurations, Visual Studio .NET
   managing, 380-82
   projects, solutions, and, 368-69
connection points, COM, 202-4
console applications, 250-51
Console class, 503-4
console I/O methods, 503-4
const_cast<> operator, 84, 426
const keyword, 12, 83-84, 424-26
constructors
   attribute, 44-45
   base class, 74-75, 88-89
   exceptions and, 67-70
   initialization and, 11
   managed objects and, 16-17
   mutex, 223-24
   native class, 100
   synchronized contexts, 229
   value types and, 18
consumer languages, 9
Container class, 247-48
container classes, 247-48, 275, 507. See also components; forms
containment, 295-97
ContextBoundObject class, 228
contexts
   components and, 242
   passing delegates between, 178-79
   remote. See .NET remoting; remote debugging
   synchronized, 228-30
Control class, 123, 242, 244, 253, 275
ControlCollection class, 246, 279
ControlNativeWindow class, 276-78
controls. See also Windows Forms
   ActiveX interfaces, 285-88
   creating, with configuration files, 333-37
   drag and drop support, 290-93
   event handling strategies, 295-97
   events, properties, and status of, 283-85
   exceptions and, 282-83
   forms and, 245-46, 275-76. See also forms
   forms as containers for, 246-50
   GUI information and, 253
   handles, 288-90
   standard forms, 294-95
   standard Windows, 281-82
   superclassing, 293-94
   Windows header files and, 297-98
   Windows procedure, 276-81
Controls property, 246
conversion methods, string, 8-9, 55, 126-29, 502
conversion operators, 12, 84, 96
Convert class, 9, 502
Conv method, 177
cookie, marshaling, 132
coordinate structures, 257-59
coordinate transforms, 259-63
copying objects, 17
CorBindToRuntime function, 358, 359-60
cordbg.exe tool, 460
COR_ENABLE_PROFILING environment variable, 491
_CorExeMain and _CorDllMain functions, 312
COR_PROFILER environment variable, 491
corpub.h file, 356
CorpubPublish class, 357
CorRuntimeHost class, 358
CoTaskMemAlloc function, 117
CoTaskMemFree function, 117
CreateDelegate method, 166-67
CreateFileBasedResourceManager method, 305
CreateFile function, 191
CreateGraphics method, 255
CreateHandle method, 277, 281-82
CreateInstanceAndUnwrap method, 78
CreateInstance method, 57
CreateParams property, 277, 281-82
creating objects, 86-89
CreationTimeout property, 40
_CrtDbgReport function, 443, 452-53
.ctor constructor, 16
culture
   assembly, 321-22
   date and time formats, 506
   localization and, 305-8. See also localization
   resources and, 303
CultureInfo class, 306
CurrentCulture property, 305-6
CurrentPrincipal property, 353-54
CurrentUICulture property, 305-6
cursor, running to, 470
cursors, mouse, 270-71
custom attributes, 39, 42-45. See also attributes
   assembly names and, 320
   COM interop threading, 154
   platform invoke and, 92. See also platform invoke
   type libraries and, 142, 144-47
   versioning and, 299-300
custom build tools, 377
custom configuration sections, configuration file, 333-37
custom marshaling, 130-32
custom operators, 93
custom wizards, 398

D
dashed lines, 265-66
DashStyle enumerations, 265-66
data
   conversion methods, 502
   native class members, 96-98
   synchronization objects and, 224-26
   thread local, 216-20
DataObject class, 290-93
DataSet class, 337-41
data slots, 216-18
DataTable class, 339
DataTips, 477
dates
   classes and methods, 506
   localization and, 306
DateTime class, 7, 506
DateTimeFormatInfo class, 506
DbgClr.exe tool, 460
DbgView tool, 511
DBNull type, 7
DCOM transport, 487
DebugBreak function, 472
Debug builds, 368, 444
Debug class, 432, 437, 445
Debug configurations, 380
debuggable code, 424-54
   assertions, 444-54. See also assertions
   const keyword and, 424-26
   .NET conditional, 427-28
   tracing. See tracing code
   writing, 424-27
Debugger class, 433, 446, 448
Debugger Proxy Service, 466
debuggers, Visual Studio .NET, xviii-ix, 460-91. See also debugging
   attaching to running processes, 465-66
   Call Stack window, 474-75
   control and form exceptions, 283
   debugging across application domains, 486-87
   debugging mixed code, 483
   debugging multithreaded code, 483-85
   debugging .NET remoting applications, 489-90
   debugging processes, 470-82
   debugging through IDE, 463-65
   debugging Web services, 490-91
   disassembly, 475-76
   Exceptions dialog box, 469
   formatting watch variables, 481-82
   immediate mode, 480-81
   JIT debugging, 466-69
   locating assemblies, 460-62
   Memory window, 476-77
   remote debugging, 487-91
   remote debugging from IDE, 488-89
   remote JIT debugging, 488
   setting breakpoints, 471-74
   starting, 462-69
   stepping through code, 470-71
   Watch window, 477-80
Debugger Users group, 462
debugging, xviii-xix, 423-99
   configuration files and, 326, 329-30
   CRT, 128
   JIT compiler and, 459-60
   library projects, 401-2
   profiling, 491-99
   symbol files and managed code, 454-60
   tools, 509-11
   with Visual Studio .NET debuggers. See debuggers, Visual Studio .NET
   writing code for. See debuggable code
Decimal type, 7
decompiler tool, 510
decompiling resources, 302
decrement operator (-=), 35, 37, 194
default parameters, 12
DefaultTraceListener class, 433-34, 445-48
defWindowProc property, 278
Delegate class, 162-66
_delegate keyword, 33, 169
delegates, xvii, 157-230
   asynchronous calls and exceptions, 189-90
   asynchronous calls and .NET Framework class library, 190-92
   asynchronous vs. synchronous programming, 179-80
   attributes and, 41
   calling, asynchronously, 181-89
   creating, for events, 199-201
   creating and invoking, 162-66
   dynamic creation of, 166-67
   exceptions and, 173-74
   function pointers and global functions, 161-62
   function pointers with unmanaged code, 158-61
   interop and, 174-78
   managed events and, 33-38, 192-207. See also events, managed
   managed types and, 33-38
   marshaling, 178-79
   multicast, 169-71
   parameters and asynchronous, 180-81
   parameters of, 167-69
   as smart (type-safe) function pointers, xvii, 33, 172-73
   type safety and, 33, 157, 172, 230
   Unified Event Model and nested, 196-201
   writing multithreaded code. See threading
DelegateSerializationHolder class, 178
delete operator, 17, 86-87, 93
DEL uninstallation, 324, 341
dependencies, project, 376
DEPENDS tool, 110, 323
deployment
   Web service, 406-8
   XCOPY, 111 n.4, 324, 341
derived classes, 75-76. See also base classes
designers, Visual Studio .NET, 240-42
DesignMode property, 241
Design-Time Environment. See DTE
destroying objects, 70, 86-89. See also memory management
destructors, 87-88, 234-39, 373. See also memory management
detaching from processes, 465-66
deterministic finalization, 234
Developing Applications with Visual Studio .NET, 330 n.6
development, user interface, 250-53. See also controls; forms; GDI+; resources, managed; Windows Forms
DevEnv.com and DevEnv.exe tools, 391-93
device contexts, 255-57
device units, 262
DEVPATH environment variable, 143, 348, 417-18, 461-62
diagnostic information, xviii
diagnostic switches, configuration file, 329-30
Dialog Box Editor, 375
dialog boxes
   assertion, 447-52
   editing, 375
   forms as, 280-81
   MFC, 286-87, 288 n.10
   Win32 standard, 294-95
DialogBoxParam function, 449
directories
   common output, 418-20
   COM server, 143
   debugger, 464-65
   [DllImport] and, 111
   folder picker dialog, 294
   global assembly cache (GAC), 3, 143, 207, 343-45, 347, 462
   metadata, 312-14
   methods, 505
   path methods, 505
   paths, 111, 143, 348, 505
   project, 378, 396-97
   resource, 298-99
   Solution Explorer, 370-72
   system assemblies, 3
Directory class, 505
disassembler, 509, 510
Disassembly window, 475-76
DispatchWrapper class, 150
dispinterfaces, 201-3
disposable objects, 234-39, 255, 266-67, 339
Dispose method, 234-39, 242-43, 246-47, 248
DllGetClassObject function, 137
DLL Hell, 341
[DllImport] attribute, 110-15, 129
DllMainCRTStartup entry point, 90, 108
DllMain entry point, 110
DLLs (dynamic link libraries). See libraries
Dns class, 192
docked controls, 283
document/view model, 232
DoDragDrop method, 290-91
DoSomeTask method, 182
dot operator (.), 22, 43
downloads. See Web sites
drag and drop support, 290-93
DragEventArgs class, 292-93
DrawImage method, 269
drawing images, 253. See also GDI+
drawing methods, 256-57
DrawPath method, 273-74
DrawString method, 272-73
DropSource and DropTarget classes, 290-93
DTE (Design-Time Environment)
   commands, 364-65
   objects, 393-95
DTEClass class, 394-95
_dtor destructor, 86-87
DUMPBIN tool, 110, 114, 310-12, 511
DumpInterfaces tool, 512
dynamic assembly loading, 346
dynamic_cast<> operator, 43, 58, 83, 101, 173
dynamic creation of delegates, 166-67
dynamic help, 388
DynamicInvoke method, 167, 173
dynamic linking vs. static linking, 109-10. See also platform invoke
dynamic link libraries (DLLs). See libraries

E
editors, Visual Studio .NET, 365-66, 370-71, 375. See also text editor
EditValue method, 241
/EH switch, 71, 104
Elapsed event, 201
embedded resources, 414-15
Encrypt method, 5
EndCap property, 266
EndInit method, 248
EndInvoke method, 163, 180, 182, 186
Enter method, 226
entry points
   compiler and, 89-90
   [DllImport] and, 110-13
   PE file, 312
   unmanaged, 160-61
   Windows Forms applications, 250, 308
/entry switch, 251
Enum class, 20
enumerating managed processes, 356-57
enumeration functions, Win32, 174
enumerations, 20-21, 174-78
EnumTypeDefs function, 317-18
EnumWindows function, 174-76
Environment class, 506
environment control methods, 506
environment variables
   DEVPATH, 143, 348, 417-18, 461-62
   getting, 89
   LIBPATH, 413, 417
   PATH, 111
   profiling, 491
   USERNAME, 340-41
   Visual Studio .NET and, 382
equality operator (==), 54
Equals method, 55, 61-62
ErrorCode method, 133
error levels, 90
errors. See exceptions
EventArgs class, 196
EventClick event, 244-45
EventDisposed class, 244
EventHandler class, 195-96, 243
EventHandlerList class, 195, 243-45, 254, 283
event handling, control and form, 295-97
event interfaces, COM, 201-3
_event keyword, 36-37, 39 n.5, 194
event log, Windows NT, 431, 437-43
EventLog class, 439, 441
EventLogTraceListener class, 433-35, 445-46
[event_receiver] attribute, 199
events
   COM, 201-7
   control and form, 283-85
   Control class, 244
   drag and drop, 291-93
   event handling strategies with controls and forms, 295-97
   managed. See events, managed
   profiler and, 495-96
   Windows Forms component, 248-49
   Windows Forms and, 276-81
events, managed, xvii, 192-207
   COM events and, 201-7
   delegates and, xvii, 33-38, 192-95. See also delegates
   handling, in COM, 204-7
   .NET Framework and, 195-96
   unified event model, 196-201
[event_source] attribute, 197
Events property, 243
Exception class, 65-71, 152
EXCEPTION_POINTERS structure, 134-35
exceptions. See also debugging
   asynchronous delegates and, 189-90
   C++ standard library and, 104
   COM interop and, 151-52
   controls and forms and, 282-83
   debugging and, 469
   delegates and, 173-74
   interop and, 133-35
   JIT debugging and, 251-52
   managed code and, 65-71
   platform invoke return values and, 116-17
   symbol files and, 459
   threads and, 220-22
   unmanaged, 71
   Windows header files and, 297-98
Exceptions dialog box, 469
exception specifications, 66
executable files. See also assemblies; compiling; portable executable files
   culture and, 306, 321-22
   #using and, 4
execution points, moving, 470-71
Exit method, 90, 226
explicit layout, 121
exporting and importing types, 76-82
   COM interop and, 141-44
   member access, 78-80
   nested types, 80-82
   types from other languages, 82
   visibility, 76-78
extender languages, 9
extern methods, 108, 112, 129

F
F5 key, 463, 464, 470
F9 key, 471
F10 key, 470
F11 key, 470
Fail method, 445-46, 450-52
famandassem access, 79
family access, 79, 198
/FA switch, 413
fields
   delegates as, 36, 193
   [DllImport], 112
   properties vs., 29. See also properties
   static, 218
File class, 503, 505
FileInfo class, 68, 505
FileIOPermission class, 354
FileNotFoundException, 66
files. See also directories
   assemblies. See assemblies
   binary, 512
   configuration. See configuration files
   console I/O methods, 503-4
   executable. See executable files
   file handling methods, 505
   INI, 324, 342-43
   library. See libraries
   PE. See portable executable files
   publisher policy, 347, 348
   as resources, 298-99. See also resources
   stream I/O methods, 503
   symbol, 454-60
   thread, process, and environment methods, 506
FileStream class, 49-50, 123, 190-92, 503
FileSystemWatcher class, 249
fill areas, 267-68
FillPath method, 273-74
filters, Solution Explorer, 370
finalization. See also memory management
   deterministic, 234
   Dispose method and, 234-39
Finalize method, 87-88, 373
_finally keyword, 69-70
Find dialog box, 386-87
Find drop-down list, 367
FindWindowsEx function, 175
fire and forget pattern, 190
first-chance notification, 469
fixups, performing, 110
folder picker dialog, 294
folders. See directories
Font class, 272-73
FontFamily class, 273
fonts, 272-73. See also character sets
foreground threads, 215-16, 227
format, assembly, 319-23
   assembly strong name, 322-23
   culture, 321-22
   version, 320-21
Format method, 504
formats
   clipboard objects, 290-91
   dates and times, localization and, 306
formatting
   code, 384-85
   strings, 23, 504
   watch variables, 481-82
Form class, 246, 275
forms. See also Windows Forms
   as containers for controls, 246-50, 275
   creating, with configuration files, 333-37
   as derived from controls, 245-46, 275-76. See also controls
   for GDI+, 253-55
   resizing, 296-97
   standard, 294-95
   as windows, 231
forwardref modifier, 34
FreeEnvironmentStrings method, 130
Free method, 105
FreeNamedDataSlot method, 218
friend keyword, 79-80, 82
FromArgb methods, 264
FromHandle method, 294
FromHdc method, 255
FromKnownColor method, 265
fully qualified names, 73, 125, 241, 248
function callbacks, 155, 174. See also delegates; events
function pointers, xvii
   casting and, xvii, 157-58
   COM interface, 137-39
   delegates as smart, xvii, 172-73. See also delegates
   global functions and, 161-62
   .NET objects and, 157-58
   with unmanaged code, 158-61
functions, global, 161-62
Fusion. See .NET Fusion technology
Fusion Log Viewer tool, 342, 347, 461
/FU switch, 412
/Fx switch, 197-98

G
GAC (global assembly cache), 3, 143, 207, 343-45,
347, 462
GacUtil tool, 141, 344
garbage collector. See also memory management
   COM interop and, 140-41
   COM types in .NET and, 148
   destroying objects and, 86-89
   getting information about, 358-59
   interop and, 91-92
   Managed Extensions and, xv
   managed objects and, 10-18
   native classes and, 93-96
   .NET objects vs. COM objects, 136-37
   reference types vs. value types and, 9-10
   Win32 types and, 124
GC class, 148
GCHandle class, 105-7
gcroot<> template, 106-7
_gc types. See also reference types
   converting value types to, 22-24
   delegate parameters, 180
   interfaces, 45-46
   managed classes and, 10-12
   operators on, 84
   passing, 28-29
   value types and, 20
GDI+, xvii, 253-75
   bitmaps, 268-70
   brushes, 267-68
   clipping regions, 263-64
   colors, 264-65
   coordinate structures, 257-59
   coordinate transforms, 259-63
   cursors, 270-71
   getting windows for, 253-55
   Graphics class, 255-57
   graphics paths, 273-74
   icons, 271-72
   pens, 265-67
   regions, 274-75
   resources. See resources, managed
   text and fonts, 272-73
   Windows Forms and, 231. See also Windows Forms
gdiplus.dll, 231
general project properties, 377-80
GenerateGuidForType method, 150
GenerateProgForType method, 150
GetAvailableThreads method, 227
GetClassInfo method, 293
GetComInterfaceForObject method, 149
GetCommandLineArgs method, 89
GetConfig method, 331-32, 334, 340
GetCurrentDirectory method, 118
GetCustomAttribute method, 43
GetCustomAttributes method, 43
GetData method, 217, 292
GetDescription method, 152
GetEnumerator method, 61, 302
GetEnvironmentStrings method, 95-96, 130-31
GetEnvironmentVariables, 89
GetErrorInfo function, 151-52
GetExceptionCode and GetExceptionPointers methods, 71, 133-35
GetExceptionInformation function, 133
GetFamilies method, 273
GetHdc method, 255
GetIDispatchForObject method, 149
GetIDsOfNames method, 139
GetInvocationList method, 36, 170, 173
GetITypeInfoForObject method, 149
GetIUnknownForObject method, 149
GetLowerBound method, 61
GetManifestResourceStream method, 268, 270-71,
301, 306
GetMaxThreads method, 227
get_ methods, 30-33
GetNamedDataSlot method, 218
GetNativeVariantForObject method, 149
GetObjectData method, 50-51
GetObjectForIUnknown method, 149
GetObjectForNativeVariant method, 149
GetObjectIdentity method, 153
GetObject method, 303
GetProcAddress function, 157
GetResourceSet method, 303
GetSerializedBuffer method, 153
GetService method, 241
GetSource method, 152
GetStream method, 49
GetString method, 303
GetTypeCode method, 8
GetTypeDefProps function, 317-19
GetTypedObjectForIUnknown method, 149
GetType method, 43
GetUnmarshalClass method, 153
GetUpperBound method, 60
GetValue method, 58, 327-28
global application settings, 328-29
Global.asax file, 404-5
global assembly cache (GAC), 3, 143, 207, 343-45,
347, 462
global functions, 161-62
global methods, 99-100, 101-2, 107-9
gradient brushes, 268
Graphics class, 254, 255-57. See also GDI+
GraphicsPath class, 273-74
graphics paths, 273-74
GraphicsUnit enumeration, 263, 265
greater-than symbol (>), 364
/GR switch, 101
GUI applications, xvii, 250-53. See also controls; forms; GDI+; resources, managed; Windows Forms
[GuidAttribute] attribute, 39 n.6, 145, 150
GUIDs, generating, 150
/GX switch, 71

H
Handle property, 123, 275, 294
HandleRef type, 124
handles
   control, 275, 288-90, 294
   Windows, 122-24, 233 n.2, 276-79
HANDLE type, 122-24
hash algorithms, 322
Hashtable class, 267, 325, 332
header files, Windows, 124-25, 297-98
headers
   .NET Framework SDK, 355
   PE file, 310-12
   precompiled, 413-14
heap
   boxing and, 22
   reference types and, 9-10, 12
   value types and, 20
help, dynamic, 388
HelpLink property, 152
HexDump tool, 512
Hide method, 280
highlighting, code, 383-84
HKEY_CURRENT_USER registry hive, 340
_hook keyword, 199-201
HRESULT type, 117, 122, 147, 151
HTML Editor, 375
Http classes, 192

I
IAsyncResult interface, 182
IAT (import address table), 109-10
ICloneable interface, 17
IComparable interface, 62
IComparer interface, 63
IComponent interface, 239-42
IConfigurationSectionHandler interface, 333-37
IConnectionPointContainer interface, 202-4
IConnectionPoint interface, 202-4
icons, 257, 271-72, 299
IContainer interface, 241-42
IConvertible interface, 9, 22, 502
ICorProfilerCallback interface, 491-99
ICorRuntimeHost interface, 360-61
ICustomMarshaler interface, 130-32
IDataObject interface, 290
IDE (integrated development environment). See Visual Studio .NET
_identifier keyword, 82
IDictionary interface, 332
IDispatch interface, 138-39, 147, 149-50, 201
IDisposable interface, 49, 88, 234, 240
idle time processing, 182
IEnumerable interface, 61
IErrorInfo interface, 152
IErrorRecords interface, 152
IEvents_Event interface, 203, 204
IEvents_EventProvider interface, 203, 204
IEvents_SinkHelper interface, 202-3
IGCHost interface, 358-59
IJW. See It Just Works
ILDASM tool, 53, 93, 320, 509-10
Image class, 257, 268
Image Editor, 375
ImageFormat class, 268
images, drawing, 253, 257. See also GDI+
IManagedObject interface, 153
IMarshal interface, 142, 153
IMetaData interfaces, 315
immed command, 364, 480
immediate mode, 364, 480-81
impersonation, 349-50
import address table (IAT), 109-10
#import directive, 141
importing types. See exporting and importing types
increment operator (+=), 35, 37, 170-71, 194
indexed properties, 31-33
IndexOf method, 61
Inflate method, 258
information
   C++ run-time, 101
   about garbage collector, 358-59
inheritance
   abstract classes and, 16. See also abstract classes; base classes
   implementing, 74-76
   interface, 45-46
   native C++ classes and, 100
INI files, 324, 342-43
initialization
   constructors and, 11, 16-17. See also constructors
   delegates, 172-73
   .NET runtime, 359-62
   pointers, 24-25
   value types, 18
inlining, 13
InnerException property, 65-66, 152
in/out parameters, 13-14, 167, 180-81. See also parameters
in parameters, 13-14, 117, 151, 167, 180, 192. See also parameters
inproc servers, 137, 142-43
Installer class, 442-43
installers
   class, 442-43
   GAC and, 344
   Web Setup Projects as, 408
installutil.exe tool, 442-43
instance methods, 12, 157
Int32 type, 8
integrated development environment (IDE). See Visual Studio .NET
IntelliSense, 364-65, 388-89
interface, user. See GUI applications
_interface keyword, 16, 45
interfaces
   ActiveX, and controls, 285-88
   asynchronous calls, 182
   COM, and events, 201-7
   COM, to access .NET runtime, 355-62
   comparison, 62-63
   component and container, 239-42
   COM types in .NET and, 148-50
   configuration file, 333-37
   conversion, 22, 502
   custom marshaling, 130-32
   defined by .NET Framework, 147
   disposable objects, 49, 234
   dumping COM, 512
   events and, 193
   exception, 152
   managed, 16, 45-52
   metadata, 315
   .NET objects in COM and, 152-53
   .NET vs. COM, 137-39
   profiler, 491-94
   properties and, 31
   runtime, 360
   serialization, 49-51, 178-79
   virtual methods and, 16
interfaces, managed, 16, 45-52
[InterfaceType] attribute, 151
interior pointers, 25-26, 28. See also pointers
Interlocked class, 225
interop, xvi, 91-155
   COM+ interop, 154
   COM interop. See COM interop
   delegates and, 174-78
   exceptions, 133-35
   It Just Works. See It Just Works
   platform invoke. See platform invoke
   technologies, 91-92
interop assemblies, 143
Interrupt method, 214
IntPtr type, 122-24, 164
Invalidate method, 264
InvalidCastException, 83
Invoke method, 138-39, 163, 166, 170-71
InvokeRequired property, 249
I/O classes, 503-4
   console I/O, 503-4
   stream I/O, 503
IResourceReader interface, 302
IsCompleted property, 182
ISerializable interface, 49-51, 65, 178-79, 290
IServiceProvider interface, 124-25, 241, 242
ISite interface, 240-41, 242-43
IsLongModifier modifier, 8
IsNested metadata, 81
ISupportInitialize interface, 248
ISynchronizeInvoke interface, 245, 249-50
It Just Works (IJW), xvi, 92-109
   C++ standard library, 104
   calling Win32 APIs with, 124-29
   COM types in .NET and, 148-49
   CRT and static-link libraries, 103-4
   global methods, 107-9
   as interop technology, 92. See also interop
   managed pointers in unmanaged types, 104-7
   native C++ classes, 93-102
   resources and, 299
ITypeInfo interface, 149
IUnknown interface, 136-39, 146, 147, 149
IWin32Window interface, 245
IWindowsFormsEditorService interface, 241

J
JIT (Just-In-Time) compiler
   debugging, 252, 466-69
   debugging information from, 459-60
   inlining and, 13
   native image cache, 343
   preJITted assemblies, 345-46
   profiler and, 491-99
   remote debugging and, 488
   symbol files and, 458-59
   unhandled exceptions and, 221
Join method, 212-13


Next



Last Updated: August 5, 2002
Top of Page