COM and .NET interoperability:
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Berkeley, CA
Apress
2002
|
Schriftenreihe: | Intertech instructor series
.Net developer series |
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | XXIX, 769 S. Ill. |
ISBN: | 1590590112 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV014309434 | ||
003 | DE-604 | ||
005 | 00000000000000.0 | ||
007 | t | ||
008 | 020523s2002 a||| |||| 00||| eng d | ||
020 | |a 1590590112 |9 1-59059-011-2 | ||
035 | |a (OCoLC)49931655 | ||
035 | |a (DE-599)BVBBV014309434 | ||
040 | |a DE-604 |b ger |e rakwb | ||
041 | 0 | |a eng | |
049 | |a DE-91G | ||
050 | 0 | |a QA76.9.A73 | |
082 | 0 | |a 005.26/8 |2 21 | |
100 | 1 | |a Troelsen, Andrew |e Verfasser |4 aut | |
245 | 1 | 0 | |a COM and .NET interoperability |c Andrew Troelsen |
264 | 1 | |a Berkeley, CA |b Apress |c 2002 | |
300 | |a XXIX, 769 S. |b Ill. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a Intertech instructor series | |
490 | 0 | |a .Net developer series | |
650 | 4 | |a COM (Computer architecture) | |
650 | 4 | |a Computer software |x Development | |
650 | 4 | |a Microsoft .NET Framework | |
650 | 4 | |a Object-oriented programming (Computer science) | |
856 | 4 | 2 | |m SWB Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=009816495&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-009816495 |
Datensatz im Suchindex
_version_ | 1804129206561406976 |
---|---|
adam_text | CONTENTS ACKNOWLEDGMENTS
...............................................................................................XXIII
INTRODUCTION
..............................................................................
.........................XXV CHAPTER 1 UNDERSTANDING PLATFORM INVOCATION
SERVICES ........................................................1 THE
TWO FACES OF UNMANAGED CODE
..................................................................1
UNDERSTANDING THE C-STYLE DLL
......................................................................2
EXPORTING CUSTOM MEMBERS
..............................................................................
3 BUILDING A CUSTOM C-BASED DLL
......................................................................5
FUNCTIONS USING BASIC DATA TYPES AND
ARRAYS.................................................. 6 FUNCTIONS
RECEIVING STRUCTURES (AND STRUCTURES CONTAINING STRUCTURES) .......7
FUNCTIONS USING CLASS TYPES
..............................................................................8
VIEWING YOUR IMPORTS AND EXPORTS USING DUMPBIN.EXE
........................9 DEPLOYING TRADITIONAL DLLS
...........................................................................12
A DYNAMIC C++ DLL CLIENT
...............................................................................15
DYNAMICALLY LOADING AN EXTERNAL LIBRARY
......................................................15 INVOKING
MEMBERS
..............................................................................
..............16 THE ATOMS OF PINVOKE
........................................................................................18
DATA TYPE CONVERSIONS
..............................................................................
.......18 THE MARSHAL CLASS
..............................................................................
...............20 THE DLLIMPORTATTRIBUTE TYPE
............................................................................25
A TRIVIAL PINVOKE EXAMPLE
.............................................................................26
SPECIFYING THE EXACTSPELLING FIELD
...................................................................29
SPECIFYING THE CHARACTER SET
............................................................................29
SPECIFYING CALLING CONVENTIONS
.......................................................................30
SPECIFYING FUNCTION ENTRY POINTS
....................................................................31
SETLASTERROR AND MARSHAL.GETLASTWIN32ERROR()
............................................32 INTERACTING WITH
MYCUSTOMDLL.DLL
.............................................................33
MARSHALING ARRAYS
..............................................................................
...............34 PASSING STRUCTURES
..............................................................................
...............35 RECEIVING ALLOCATED STRUCTURES
.........................................................................37
INTERACTING WITH EXPORTED CLASS TYPES
............................................................39 EXAMINING
THE UNDERLYING IL
...........................................................................41
WORKING WITH UNMANAGED CALLBACKS
.............................................................42 A SIMPLE
CALLBACK EXAMPLE
.............................................................................43
A MORE INTERESTING CALLBACK FUNCTION
.....................................................44 BUILDING A C#
CALLBACK CLIENT
....................................................................46
SUMMARY
....................................................................................................................49
VII CHAPTER 2 THE ANATOMY OF A COM SERVER
.................................51 OF CLASSES AND INTERFACES
.............................................................................51
INTERFACES FROM A NON-COM PERSPECTIVE
........................................................52 CLEANING UP
THE INTERFACE DEFINITION
..............................................................54
BUILDING THE CLASS TYPES
..............................................................................
.....55 INTERFACES ARE STRONGLY TYPED VARIABLES
..........................................................58 CLASSES CAN
SUPPORT MULTIPLE INTERFACES
........................................................59 INTERFACES
PROVIDE A VERSIONING SCHEME
......................................................... 61 THE
COMPOSITION OF A COM DLL
......................................................................63
THE ROLE OF TYPE LIBRARIES
...........................................................................65
THE FULL MIDL OUTPUT
..............................................................................
........66 THE ROLE OF THE SYSTEM REGISTRY
................................................................66
CREATING THE COM DLL PROJECT WORKSPACE
................................................67 UNDERSTANDING COM
INTERFACES
......................................................................68
THE ROLE OF THE GUID
........................................................................................68
THE ROLE OF IUNKNOWN
......................................................................................
71 DEFINING THE ICAR INTERFACE IN IDL
...................................................................73
THE ROLE OF THE HRESULT
.................................................................................
74 IDL PARAMETER ATTRIBUTES
..................................................................................74
DEFINING THE COCLASS (COMCAR) IN IDL
............................................................75 DEFINING
THE [DEFAULT] INTERFACE
.......................................................................76
DEFINING AND SUPPORTING MULTIPLE
INTERFACES................................................. 76 COMPILING
THE IDL FILE WITH THE MIDL COMPILER
...........................................77 EXAMINING THE
MIDL-GENERATED FILES
.............................................................78 A BRIEF
WORD ON COM-CENTRIC MACROS
.........................................................79 IMPLEMENTING
THE COMCAR
.................................................................................80
IMPLEMENTING IUNKNOWN
.................................................................................81
IMPLEMENTING ICAR AND IRADIO
........................................................................83
UNDERSTANDING ICLASSFACTORY
........................................................................84
BUILDING YOUR CLASS FACTORY
........................................................................85
IMPLEMENTING ICLASSFACTORY::CREATEINSTANCE()
.............................................86 IMPLEMENTING
ICLASSFACTORY::LOCKSERVER()
....................................................87 IMPLEMENTING DLL
COMPONENT HOUSING
.........................................................88 MANAGING
SERVER LIFETIME:
DLLCANUNLOADNOW()............................................ 88
CONTENDING WITH DLLREGISTERSERVER() AND DLLUNREGISTERSERVER()
..................90 EXPORTING THE EXPORTS
......................................................................................90
REGISTERING THE COM SERVER
...........................................................................91
PROGRAMMATIC IDENTIFIERS (PROGIDS)
................................................................ 91 A
CRITICAL KEY: HKEY_CLASSES_ROOT CLSID
.............................................92 ANOTHER CRITICAL KEY:
HKEY_CLASSES_ROOT TYPELIB ................................. 94 OTHER COM
REGISTRATION POSSIBILITIES
..............................................................94
REGISTERING YOUR COM SERVERS
..........................................................................95
CONTENTS VIII DEVELOPING A C++ COM CLIENT
........................................................................97
ACTIVATING COM OBJECTS
..............................................................................
.....97 ACCESSING A COCLASS USING COCREATEINSTANCE()
............................................100 BUILDING A C++ CLIENT
USING THE #IMPORT DIRECTIVE ......................................102 A
VISUAL BASIC 6.0 COM CLIENT
........................................................................103
UNDERSTANDING COM PROPERTIES
....................................................................105
IDL SYNTAX FOR INTERFACE PROPERTIES
...............................................................106
PROPERTIES: THE CLIENT*S POINT OF VIEW
............................................................107 BUILDING
SCRIPTABLE OBJECTS (USING IDISPATCH) ...............................108
UNDERSTANDING DISPINTERFACES AND DISPIDS
................................................109 OBTAINING DISPIDS
..........................................................................................111
INVOKING THE MEMBER
..............................................................................
.......111 THE VARIANT DATA TYPE
....................................................................................112
WORKING WITH VARIANTS (IN C++)
...................................................................114
WORKING WITH VARIANTS (IN VB 6.0)
...............................................................115 THE
DISPPARAMS STRUCTURE
...........................................................................115
A C++ IDISPATCH EXAMPLE
...............................................................................116
A VISUAL BASIC IDISPATCH CLIENT
..............................................................117
UNDERSTANDING THE DUAL INTERFACE
...........................................................118 DEFINING
A SCRIPTABLE OBJECT
....................................................................118
IMPLEMENTING ISCRIPTABLECAR
........................................................................119
BUILDING THE CLASS FACTORY
.........................................................................123
UPDATING DLLGETCLASSOBJECT
.........................................................................123
UPDATING THE SERVER*S REGISTRATION FILE
............................................124 BUILDING A VBSCRIPT
LATE-BOUND CLIENT .................................................124
SUMMARY
..................................................................................................................126
CHAPTER 3 A PRIMER ON COM PROGRAMMING FRAMEWORKS
............................................127 THE ROLE OF THE ACTIVE
TEMPLATE LIBRARY ............................................127
GENERATING THE COMPONENT HOUSING
............................................................128 THE ATL
PROJECT
FILES.......................................................................................
129 INSERTING COM OBJECTS USING THE ATL OBJECT
WIZARD.................................. 133 CODE UPDATES
..................................................................................................
135 ATL*S IMPLEMENTATION OF YOUR COCLASS
...........................................................136 ATL*S
REGISTRATION SUPPORT
..............................................................................137
ADDING MEMBERS TO THE [DEFAULT] INTERFACE
..................................................140 ADDING A MORE
INTERESTING METHOD
................................................................142
SUPPORTING ADDITIONAL COM INTERFACES
.........................................................143 CONTENTS IX
THE ROLE OF VISUAL BASIC 6.0
....................................................................146
BUILDING COM SERVERS USING VISUAL BASIC 6.0
...............................................146 DEFINING AUXILIARY
INTERFACES
..........................................................................148
IMPLEMENTING INTERFACES IN VB 6.0
................................................................149
SETTING BINARY COMPATIBILITY
..........................................................................151
VIEWING THE GENERATED IDL USING OLEVIEW.EXE
............................................152 MAKING USE OF YOUR COM
SERVERS
..................................................................156
SUMMARY
..................................................................................................................159
CHAPTER 4 COM TYPE INFORMATION
.................................................161 THE FORMAT OF A COM
IDL FILE
....................................................................162
DEFINING COM TYPES
..........................................................................................163
PRIMITIVE COM DATA TYPES
.............................................................................164
THE OLEAUTOMATION (AKA VARIANT) DATA TYPES
...............................................166 IDL METHOD PARAMETER
ATTRIBUTES
..............................................................167
DEFINING COM INTERFACE TYPES IN IDL
.....................................................171 DEFINING RAW
DISPINTERFACES
..........................................................................171
DEFINING DUAL INTERFACES
..............................................................................
..172 BUILDING IUNKNOWN-DERIVED INTERFACES
........................................................173 COMMON IDL
INTERFACE MODIFIERS
.................................................................173
DEFINING COM CLASSES IN IDL
.........................................................................174
DEFINING IDL ENUMERATIONS
...........................................................................176
DEFINING IDL STRUCTURES
..................................................................................176
COM STRING REPRESENTATION
...........................................................................177
COM (SAFE)ARRAY REPRESENTATION
...................................................................179
COM INTERFACE TYPES AS METHOD PARAMETERS
...............................................184 THE ITYPEINFO
INTERFACE
...............................................................................185
A BRIEF WORD ON ITYPEINFO2
............................................................................18
8 RELATED ITYPEINFO DATA TYPES
.........................................................................188
GENERATING COM TYPE INFORMATION PROGRAMMATICALLY
........................189 A BRIEF WORD ON ICREATETYPELIB2 AND
ICREATETYPEINFO2 .............................190 THE TARGET IDL
..............................................................................
...................190 BUILDING THE TYPE LIBRARY (ICREATETYPELIB)
......................................191 CREATING THE IHELLO INTERFACE
..................................................................193
BREAKING DOWN THE CREATEINTERFACE() HELPER METHOD
.................................195 BUILDING THE SAYHELLO() METHOD
................................................................198
BUILDING THE HELLO COCLASS
.........................................................................200
TESTING THE APPLICATION
...............................................................................201
CONTENTS X PROGRAMMATICALLY READING COM TYPE INFORMATION
...............................203 THE PROGRAM SKELETON
.....................................................................................204
DISPLAYING COM LIBRARY INFORMATION
...........................................................205 DUMPING
COM TYPE INFORMATION
.................................................................207
LISTING COCLASS STATISTICS
..............................................................................
..208 LISTING IDISPATCH-BASED INTERFACE STATISTICS
.................................................209 LISTING
IUNKNOWN-BASED INTERFACE STATISTICS
................................................209 LISTING COM
ENUMERATION STATISTICS
.............................................................209 READING
THE MYTYPELIB.TLB FILE
......................................................................210
DEFINING CUSTOM IDL ATTRIBUTES
................................................................212
READING CUSTOM ATTRIBUTES
............................................................................21
4 INTRODUCING THE SYSTEM.RUNTIME.INTEROPSERVICES NAMESPACE .......218
BUILDING A C# COM TYPE INFORMATION VIEWER
........................................220 LOADING THE COM TYPE LIBRARY
......................................................................221
LOADING THE COM TYPE LIBRARY
......................................................................222
DISPLAYING THE COM TYPES
.............................................................................2
24 SUMMARY
..................................................................................................................228
CHAPTER 5 THE ANATOMY OF A .NET SERVER .............................229
THE PHILOSOPHY OF .NET
..............................................................................
...230 THE BUILDING BLOCKS OF .NET
......................................................................231
WORKING WITH MANAGED LANGUAGES
................................................................232 THE
COMPOSITION OF A .NET BINARY
...........................................................233 BUILDING
A C# CODE LIBRARY
.........................................................................235
BUILDING THE ABSTRACT CAR TYPE
.......................................................................238
BUILDING THE DERIVED MINIVAN TYPE
...............................................................240
IMPLEMENTING THE CONVERTIBLES
.....................................................................240
ESTABLISHING THE ASSEMBLY MANIFEST
..............................................................242
INTRODUCING ILDASM.EXE
..............................................................................
...243 VIEWING THE ASSEMBLY MANIFEST
.....................................................................243
VIEWING THE TYPE METADATA
............................................................................24
5 VIEWING (PARTIAL) METADATA FOR THE CARCOLOR ENUMERATION
.........................246 VIEWING (PARTIAL) METADATA FOR THE
ICONVERTIBLE INTERFACE ...........................247 VIEWING (PARTIAL)
METADATA FOR A DERIVED TYPE
.............................................247 REMAINING BITS OF
INTERESTING METADATA
........................................................248 (NOT)
VIEWING THE UNDERLYING IL CODE
..........................................................249 BUILDING A
MANAGED CLIENT
...........................................................................250
CONFIGURING PRIVATE ASSEMBLIES
.....................................................................251
SPECIFYING ARBITRARY ASSEMBLY LOCATIONS
............................................253 CONTENTS XI
UNDERSTANDING THE SHARED ASSEMBLY
.........................................................254 GENERATING
A STRONGLY NAMED ASSEMBLY
.......................................................255 PREPPING THE
PROJECT WORKSPACE
....................................................................257
BUILDING THE AIR VEHICLES
..............................................................................
...258 GENERATING THE STRONG NAME
..........................................................................260
USING THE SHARED ASSEMBLY
...........................................................................262
VERSIONING SHARED ASSEMBLIES
....................................................................264
VERSIONING THE SHARED VB .NET AIRVEHICLES ASSEMBLY
.................................265 WORKING WITH PUBLISHER POLICY
ASSEMBLIES ..........................................267 THE BINDING
PROCESS IN A NUTSHELL
.................................................................269 AND
NOW FOR SOMETHING COMPLETELY DIFFERENT: SYSTEM.CODEDOM ...270
SYSTEM.CODEDOM: ITS MEANING IN LIFE
.........................................................272 INTRODUCING
THE SYSTEM.CODEDOM NAMESPACE
..........................................272 THE TYPES OF
SYSTEM.CODEDOM
.....................................................................274
BUILDING A CODEDOM EXAMPLE
......................................................................276
BUILDING THE MAIN() FUNCTION
.........................................................................277
BUILDING THE FILE VIA CREATEFILE()
....................................................................280
BUILDING THE HELLOCLASS (AND CONTAINING NAMESPACE)
................................281 COMPILING THE ASSEMBLY
..............................................................................
...284 RUNNING THE ASSEMBLY (USING LATE BINDING)
................................................285 RUNNING YOUR
APPLICATION
..............................................................................
285 SUMMARY
..................................................................................................................288
CHAPTER 6 .NET TYPES
...........................................................................289
THE ROLE OF SYSTEM.OBJECT
...........................................................................289
OVERRIDING TOSTRING()
..............................................................................
........290 THE TWO FACES OF EQUALITY
..............................................................................
292 EXAMINING THE .NET DATA TYPE SYSTEM
.....................................................294 SYSTEM DATA
TYPE LANGUAGE MAPPINGS
.........................................................296 THE SET OF
CUSTOM .NET TYPES
....................................................................297
.NET CLASS TYPES
..............................................................................
...............299 .NET STRUCTURE TYPES
..............................................................................
........300 .NET INTERFACE TYPES
..............................................................................
.........301 .NET ENUMERATION TYPES
................................................................................301
BUILDING A COMPLEX CODE LIBRARY
..............................................................302
UNDERSTANDING REFLECTION
.............................................................................304
WORKING WITH SYSTEM.TYPE
.............................................................................304
OBTAINING A TYPE REFERENCE USING SYSTEM.OBJECT.GETTYPE()
......................306 OBTAINING A TYPE REFERENCE USING THE C# TYPEOF
OPERATOR .........................306 OBTAINING A TYPE REFERENCE USING
THE TYPE CLASS ........................................307 THE
SYSTEM.REFLECTION NAMESPACE
..............................................................309
CONTENTS XII DYNAMICALLY LOADING AN ASSEMBLY
..............................................................310
ENUMERATING TYPES IN A REFERENCED ASSEMBLY
.............................................311 ENUMERATING CLASS
MEMBERS
.........................................................................311
ENUMERATING METHOD PARAMETERS
.................................................................311
BUILDING A CUSTOM .NET TYPE VIEWER
.......................................................312 SHOWING
SELECTED TYPE DETAILS
.......................................................................315
BUILDING THE MORE DETAILS MENU
....................................................................316
A BRIEF WORD REGARDING SYSTEM.REFLECTION.EMIT
...............................323 UNDERSTANDING .NET ATTRIBUTES
..................................................................323
CREATING AND APPLYING CUSTOM ATTRIBUTES
............................................325 VIEWING THE APPLIED
METADATA
.......................................................................326
RESTRICTING ATTRIBUTE USAGE
............................................................................32
7 ASSEMBLY- (AND MODULE-) LEVEL ATTRIBUTES
...................................................328 READING
ATTRIBUTES AT RUNTIME
..................................................................330
LATE BINDING UNDER THE .NET PLATFORM
.........................................................331 THE
ACTIVATOR CLASS
..........................................................................................331
LATE BINDING TO A PRIVATE ASSEMBLY
...............................................................332
INVOKING PARAMETERIZED METHODS
..................................................................334
BINDING LATE TO SHARED ASSEMBLIES
.........................................................335 CONTRASTING
COM AND .NET LATE-BINDING SYNTAX
........................................336 SUMMARY
..................................................................................................................338
CHAPTER 7 .NET-TO-COM INTEROPERABILITY* THE BASICS
...........................................................................339
A HIGH-LEVEL OVERVIEW OF .NET-TO-COM INTEROPERABILITY ..............339
UNDERSTANDING THE ROLE OF THE RCW
..............................................................340
BUILDING AN INTEROP ASSEMBLY*THE SIMPLEST POSSIBLE EXAMPLE ...342 A
VISUAL BASIC .NET CLIENT
..............................................................................
346 CONVERTING BETWEEN COM IDL DATA TYPES AND MANAGED DATA TYPES
..............................................................................
...346 WORKING WITH MANAGED GUIDS (SYSTEM.GUID)
.............................................348 BLITTABLE AND
NON-BLITTABLE DATA TYPES
.........................................................349 INTERFACES
CONSUMED BY THE RCW
................................................................351
OPTIONS TO OBTAIN AN INTEROP ASSEMBLY
.................................................353 USING THE
TLBIMP.EXE COMMAND LINE UTILITY
................................................353 EXAMINING THE
GENERATED .NET TYPES
.......................................................356 MANIPULATING
COM TYPES USING GENERATED *-CLASS* TYPES ........................357
MANIPULATING COM TYPES USING DISCRETE INTERFACES
...................................358 MANIPULATING COM TYPES USING THE
[DEFAULT] INTERFACE TYPE ....................361 CONTENTS XIII CONTENTS
XIV SELECT MEMBERS OF THE SYSTEM.RUNTIME.INTEROPSERVICES NAMESPACE
......................................362 AN INTERESTING ASIDE:
SYSTEM.RUNTIME.INTEROPSERVICES.RUNTIMEENVIRONMENT
............................366 COM LIBRARY STATEMENT TO .NET ASSEMBLY
STATEMENT CONVERSION RULES
.................................................367 PROGRAMMATICALLY
CONTROLLING THE NAMESPACE DEFINITION ..........................369 COM
TYPES TO .NET TYPES CONVERSION RULES
..........................................371 COM INTERFACE CONVERSION
.............................................................................371
COM INTERFACE MEMBERS TO .NET METHOD CONVERSION RULES
.....................375 COM METHOD PARAMETERS TO .NET METHOD PARAMETERS
CONVERSION RULES
........................................................................377
HANDLING OPTIONAL AND DEFAULT PARAMETERS
.................................................381 COM COCLASS
CONVERSION
..............................................................................
.385 MAPPING [NONCREATABLE] AND [APPOBJECT] COCLASSES
....................................387 CATALOGING COM DISPIDS
...............................................................................388
ADDITIONAL COCLASS TO .NET CLASS INFRASTRUCTURE
...........................................389 COM ENUM CONVERSION
..................................................................................391
DEPLOYING INTEROP ASSEMBLIES
....................................................................392
CREATING A PRIMARY INTEROP ASSEMBLY
.....................................................393 REFLECTING ON
INTEROP ASSEMBLY ATTRIBUTES ........................................396
OBTAINING TYPE INFORMATION FOR A COM WRAPPER TYPE
................................398 THE ROLE OF SYSTEM.__COMOBJECT
..................................................................399
INTERACTING WITH WELL-KNOWN COM SERVERS
............................................399 SUMMARY
..................................................................................................................402
CHAPTER 8 .NET-TO-COM INTEROPERABILITY* INTERMEDIATE TOPICS
....................................................403 HANDLING THE COM
VARIANT
.............................................................................403
BUILDING A VARIANT-CENTRIC COM SERVER
.................................................405 EXERCISING COM
VARIANTS FROM MANAGED CODE .........................................407
THE VARIANT WRAPPERS
..............................................................................
....409 HANDLING COM SAFEARRAYS
...............................................................................410
EXERCISING COM SAFEARRAYS FROM MANAGED CODE
....................................413 RECEIVING SAFEARRAYS
...................................................................................416
HANDLING C-STYLE ARRAYS
...............................................................................419
HANDLING COM PARAM ARRAYS
...........................................................................420
HANDLING COM STRUCTURES
...............................................................................421
BUILDING A VB 6.0 STRUCTURE SERVER
.................................................................423
EXERCISING COM STRUCTURES FROM MANAGED CODE
.........................................424 HANDLING COM COLLECTIONS
.............................................................................426
EXERCISING THE COM COLLECTION FROM MANAGED CODE
..................................433 CONTENTS XV A BRIEF REVIEW OF COM
CONNECTION POINTS (COM EVENTS) ................437 UNDERSTANDING
ICONNECTIONPOINTCONTAINER
................................................437 UNDERSTANDING
ICONNECTIONPOINT
.................................................................438
UNDERSTANDING THE OUTBOUND INTERFACE
.......................................................439 ALL TOGETHER
NOW ...
..........................................................................................440
BUILDING A CONNECTABLE COM TYPE
..............................................................441 A
BRIEF REVIEW OF .NET DELEGATES
...........................................................443 A BRIEF
REVIEW OF .NET EVENTS
..................................................................445
EXAMINING THE INTEROP ASSEMBLY
................................................................448
EXAMINING THE GENERATED DELEGATES
.............................................................450
EXAMINING THE GENERATED __COCAR AND __COCAR_EVENT INTERFACES
...........451 EXAMINING THE MANAGED COCLASS
..................................................................453
RECEIVING THE COM EVENTS (C#)
.....................................................................455
RECEIVING THE COM EVENTS (VB .NET)
...........................................................456 HANDLING
COM TYPES WITH MULTIPLE [SOURCE] INTERFACES
..............................457 HANDLING COM ERROR OBJECTS
.........................................................................459
MANIPULATING COM ERROR OBJECTS IN COM
....................................................461 THE ROLE OF
ISUPPORTERRORINFO
.......................................................................462
BUILDING A SIMPLE ATL ERROR SERVER
...............................................................462 THE
.NET ERROR HANDLING MECHANISM
.........................................................464 THE
COMEXCEPTION TYPE
................................................................................466
HANDLING COM ERROR INFORMATION FROM MANAGED CODE
.............................466 DEBUGGING COM SERVERS USING VS .NET
.....................................................468 SUMMARY
..................................................................................................................470
CHAPTER 9 .NET-TO-COM INTEROPERABILITY* ADVANCED TOPICS
..............................................................471
REVISITING THE MARSHAL CLASS
....................................................................471
DIRECTLY INTERACTING WITH IUNKNOWN
..............................................................473
MANUALLY DESTROYING A COM OBJECT
..............................................................474 COM
COCLASSES IMPLEMENTING .NET INTERFACES
......................................475 BUILDING A COMPARABLE COM
CLASS ...............................................................476
BUILDING A CLONEABLE COM TYPE
....................................................................480
BUILDING .NET TYPE COMPATIBLE COCLASSES USING ATL 3.0
...........................481 GUIDELINES FOR BUILDING .NET TYPE
COMPATIBLE COM CLASSES .......484 GUIDELINE #1: DON*T INDIRECTLY
IMPLEMENT THE SAME INTERFACE TWICE .........485 GUIDELINE #2: DON*T
IMPLEMENT .NET CLASS INTERFACES .................................485
GUIDELINE #3: TAKE CARE WHEN IMPLEMENTING INTERFACE HIERARCHIES
..........487 GUIDELINE #4: VB 6.0 HAS A KEY LIMITATION (IMAGINE THAT .
. .) .....................489 CONSUMING ACTIVEX CONTROLS FROM MANAGED
CODE .................................490 BUILDING AN EXAMPLE ACTIVEX
CONTROL ...........................................................490
VIEWING THE GENERATED IDL
............................................................................49
3 OPTIONS FOR CONSUMING ACTIVEX CONTROLS FROM MANAGED CODE .......495
CONSUMING AN ACTIVEX CONTROL USING THE VS .NET IDE
...............................495 IMPORTING ACTIVEX CONTROLS USING
AXIMP.EXE ..............................................501 MODIFYING
THE CODE FOR THE AXHOST-DERIVED TYPE .............................504
ONE FINAL MODIFICATION
...................................................................................506
MANUALLY MODIFYING INTEROP ASSEMBLIES
.................................................508 BUILDING AN EXAMPLE
COM SERVER
.................................................................509
UNDERSTANDING THE INTEROP EDITING PROCESS
........................................510 GENERATING THE INITIAL
INTEROP ASSEMBLY
.......................................................511 OBTAINING THE
*.IL FILE FOR INTEROP.HELPFULATLSERVER.DLL
...............................512 VIEWING THE ORIGINAL IL/METADATA
DEFINITIONS .............................................514 DISSECTING
THE LAYOUT OF ATTRIBUTE METADATA ...................................517
BUILDING A *SCRATCH* ASSEMBLY
..................................................................519
CREATING A .NET [CUSTOM] WRAPPER
................................................................519
UPDATING THE INTEROP ASSEMBLY
.....................................................................522
RECOMPILING THE IL
..........................................................................................524
BUILDING THE MANAGED CLIENT
......................................................................526
BUILDING A CUSTOM TYPE LIBRARY IMPORTER UTILITY
...........................528 UNDERSTANDING THE TYPELIBCONVERTER CLASS
.................................................528 BUILDING THE MAIN
SHELL
...............................................................................530
PROGRAMMATICALLY LOADING THE COM TYPE INFORMATION
..............................531 DISSECTING THE
TYPELIBCONVERTER.CONVERTTYPELIBTOASSEMBLY() METHOD
.............................................................................................................533
BUILDING THE HELPER SINK
.................................................................................535
IMPLEMENTING MYTLBIMPAPP.GENERATEASSEMBLYFROMTYPELIB() ..............536
SUMMARY
..................................................................................................................538
CHAPTER 10 COM-TO-.NET INTEROPERABILITY* THE BASICS
...........................................................................539
THE ROLE OF THE CCW
........................................................................................539
THE CCW: MAPPING .NET DATA TYPES INTO COM IDL DATA TYPES
................540 THE CCW: SIMULATING IMPLEMENTED COM INTERFACES
..................................542 THE CCW: SIMULATING COM IDENTITY
..............................................................543 CORE
REQUIREMENTS FOR COM-TO-.NET COMMUNICATIONS ........................544
GENERATING COM TYPE DEFINITIONS
................................................................545
REGISTERING THE .NET ASSEMBLY WITH COM
....................................................545 USING THE
TLBEXP.EXE UTILITY
....................................................................546
CONTENTS XVI GENERAL GUIDELINES FOR BUILDING COM-AWARE .NET TYPES
................547 ESTABLISHING TYPE VISIBILITY
.............................................................................547
ESTABLISHING TYPE MEMBER VISIBILITY
.............................................................548
CONTROLLING TYPE AND MEMBER VISIBILITY USING THE COMVISIBLE ATTRIBUTE
..548 TRANSLATING CONSTRUCTORS AND C#-STYLE DESTRUCTORS
.....................................549 TRANSLATING ABSTRACT BASE
CLASSES
..................................................................551
TRANSLATING OVERRIDABLE MEMBERS
.................................................................551
INHERITING PUBLIC MEMBERS
............................................................................55
3 TRANSLATING STATIC AND CONSTANT MEMBERS
....................................................554 CRITICAL
.NET-TO-COM CONVERSION DETAILS
............................................554 CONVERTING METHOD
SIGNATURES
......................................................................555
CONVERTING .NET PROPERTIES
...........................................................................556
CONVERTING .NET FIELDS
...................................................................................557
UNDERSTANDING THE CLASS INTERFACE
.........................................................557
ESTABLISHING A .NET CLASS INTERFACE
...............................................................559 THE
CUSTOM IDL ATTRIBUTE: {0F21F359-AB84-41E8-9A78-36D110E6D2F9}
..............................................561 UNDERSTANDING THE
OBJECT INTERFACE
.......................................................562 TRANSFORMING
SYSTEM.OBJECT.TOSTRING()
........................................................563 THE CASE
AGAINST CLASS INTERFACES
.........................................................563 EXPOSING
CUSTOM .NET INTERFACES TO COM
..............................................564 CONTROLLING IID AND
DISPID GENERATION
.......................................................566 IMPLEMENTING
EXPLICIT INTERFACES
...........................................................567
CONTROLLING THE GENERATED PROGID
...........................................................567
CONTROLLING THE COM LIBRARY DEFINITION
..............................................568 HANDLING OVERLOADED
METHODS
......................................................................569
IMPORTING MSCORLIB.TLB
..............................................................................
...570 USING THE REGASM.EXE UTILITY
....................................................................572
EXAMINING THE UPDATED ENTRIES
..................................................................574
THE PROGID ENTRY
.............................................................................................575
THE HKCR CLSID ENTRY
..................................................................................575
ENLISTING .NET TYPES INTO A SPECIFIC COM CATEGORY
....................................577 REGISTERING THE EXPOSED
INTERFACES
................................................................579
REGISTERING THE COM TYPE LIBRARY
.................................................................582
DEPLOYING THE .NET ASSEMBLY
......................................................................582
LEVERAGING THE VISUAL STUDIO .NET IDE
.................................................584 BUILDING A VISUAL
BASIC 6.0 COM CLIENT ..............................................584
INTERACTING WITH MSCORLIB.TLB
..........................................................................586
BUILDING A C++ COM CLIENT
...........................................................................589
BUILDING A VBSCRIPT COM CLIENT
................................................................590
SUMMARY
..................................................................................................................591
CONTENTS XVII CHAPTER 11 COM-TO-.NET INTEROPERABILITY* INTERMEDIATE
TOPICS ....................................................593
CONVERTING .NET ENUMS TO COM ENUMS
.......................................................593 ALTERING THE
UNDERLYING FIELD STORAGE
...........................................................595
LEVERAGING SYSTEM.ENUM?
..............................................................................597
CONVERTING .NET STRUCTURES TO COM STRUCTURES
.................................598 EXPOSING A .NET STRUCTURE AS AN IDL
UNION .................................................603 CONVERTING
.NET DELEGATES TO COM CONNECTION POINTS ....................604 CREATING
THE EVENT INTERFACE
...........................................................................605
SPECIFYING THE EVENT INTERFACES (A LA COMSOURCEINTERFACESATTRIBUTE)
........606 ESTABLISHING MULTIPLE [SOURCE] INTERFACES
......................................................607 BUILDING A
.NET EVENT SERVER USING VB .NET
......................................608 BUILDING A VISUAL BASIC 6.0
EVENT CLIENT ..........................................609 BUILDING A
C++ EVENT CLIENT
......................................................................610
BUILDING THE CLIENT-SIDE SINK
.........................................................................611
EXPOSING CUSTOM .NET COLLECTIONS
...........................................................614 A VB 6.0
.NET COLLECTION CLIENT
......................................................................617
EXPOSING .NET EXCEPTIONS
.............................................................................619
THROWING CUSTOM .NET EXCEPTIONS
...............................................................620
EXERCISING YOUR DOTNETCOLLECTION ASSEMBLY FROM C++
....................621 CONVERTING .NET INTERFACE WITH MULTIPLE BASE
INTERFACES .........624 CONVERTING .NET INTERFACE HIERARCHIES
.................................................627 SUMMARY
..................................................................................................................630
CHAPTER 12 COM-TO-.NET INTEROPERABILITY* ADVANCED TOPICS
..............................................................633
CHANGING TYPE MARSHALING USING MARSHALASATTRIBUTE
......................633 .NET TYPES IMPLEMENTING COM INTERFACES
..............................................638 DEFINING CUSTOM COM
INTERFACES
................................................................638
BUILDING AND DEPLOYING THE INTEROP ASSEMBLY
.............................................640 BUILDING A
BINARY-COMPATIBLE C# TYPE
.........................................................641 BUILDING A
BINARY-COMPATIBLE VB .NET TYPE
................................................642 REGISTERING THE .NET
ASSEMBLIES WITH COM .................................................644
BUILDING A VB 6.0 COM CLIENT
....................................................................644
DEFINING COM INTERFACES USING MANAGED CODE
......................................646 SELECTED NOTES ON MANUALLY
DEFINING COM INTERFACES USING MANAGED CODE
....................................................................649
MANUALLY DEFINING COM ATOMS: AN EXTENDED EXAMPLE
........................650 DEFINING THE DUAL INTERFACE (AND SHAPECOLOR
ENUM) USING C# .............651 CONTENTS XVIII INTERACTING WITH INTEROP
ASSEMBLY REGISTRATION .............................653 INSERTING CUSTOM
REGISTRATION INFORMATION
.................................................654 PROGRAMMATICALLY
CONVERTING ASSEMBLIES TO COM TYPE INFORMATION
...........................................................................655
HOSTING THE .NET RUNTIME FROM AN UNMANAGED ENVIRONMENT ...........660
BUILDING A CUSTOM HOST
..................................................................................663
SUMMARY
..................................................................................................................667
CHAPTER 13 BUILDING SERVICED COMPONENTS (COM+ INTEROP)
.................................................................669 THE
MTS, COM+, COMPONENT SERVICES NAME GAME
...................................669 RECAPPING COMPONENT SERVICES
....................................................................670
REVIEWING THE COM+ RUNTIME ENVIRONMENT
..............................................672 REVIEWING OBJECT
CONTEXT
..............................................................................
673 REVIEWING CALL CONTEXT
..............................................................................
.....674 THE ROLE OF THE COM+ CATALOG
....................................................................675
THE COMPONENT SERVICE EXPLORER
................................................................678
CREATING COM+ APPLICATIONS
.........................................................................679
A CLASSIC COM+ EXAMPLE
..............................................................................
...682 BUILDING A VB 6.0 COM+ CLIENT
..................................................................683
DEPLOYING COM+ APPLICATIONS
......................................................................685
THE SYSTEM.ENTERPRISESERVICES NAMESPACE
............................................687 THE
SYSTEM.ENTERPRISESERVICES.SERVICEDCOMPONENT TYPE
.........................689 THE SIMPLEST POSSIBLE EXAMPLE
..................................................................690
INSTALLING THE CODE LIBRARY
.............................................................................693
USING THE REGSVCS.EXE COMMAND LINE UTILITY
......................................694 VIEWING THE GENERATED TYPE COM
INFORMATION ...........................................695 ACKNOWLEDGING
THE REGISTRATION ENTRIES
.......................................................696 AND FINALLY,
THE COM+ APPLICATION ITSELF
......................................................697 ACCESSING THE
CONFIGURED .NET COMPONENT FROM VB 6.0 ..................698 ACCESSING
THE CONFIGURED .NET COMPONENT FROM C# ...........................699
ENABLING COMPONENT STATISTICS
..................................................................699 A
BRIEF WORD ON LAZY (AUTOMATIC) REGISTRATION
...............................700 WORKING WITH THE REGISTRATIONHELPER
TYPE ..........................................701 CONFIGURING A MANAGED
COM+ APPLICATION USING .NET ATTRIBUTES
.....................................................703 SUPPORTING
OBJECT CONSTRUCTION STRINGS
..............................................704 EXAMINING THE
CONTEXTUTIL TYPE
................................................................706
CONTENTS XIX UNDERSTANDING JITA
..........................................................................................708
THE *HAPPY* AND *DONE* BITS
........................................................................709
ENABLING JITA/ASAP DEACTIVATION
.................................................................710
CONTROLLING THE DONE BIT
.................................................................................712
JITA AND IMPLEMENTING IOBJECTCONTROL (SO TO SPEAK*)
.............................713 JITA, IOBJECTCONTROL, AND THE .NET
GARBAGE COLLECTOR ................714 CONFIGURING POOLABLE OBJECTS
....................................................................715
A RECAP OF TRANSACTIONAL PROGRAMMING
...................................................717 ROOT OBJECTS,
SECONDARY OBJECTS, AND COM+ TRANSACTIONS ........................718
PROGRAMMING COM+ TRANSACTIONS
..................................................................720
SETTING THE HAPPY BIT
..............................................................................
........722 A COMPLETE SERVICED COMPONENT EXAMPLE
.................................................724 BUILDING THE CUSTOM
DATABASE
......................................................................725
BUILDING THE C# CODE LIBRARY
.........................................................................726
BUILDING THE LOGSALE TYPE
..............................................................................
727 BUILDING THE CARINVENTORY CLASS TYPE
...........................................................728 BUILDING
THE WINDOWS FORMS FRONT END
.......................................................732 BUILDING AN
ASP.NET WEB SERVICE CLIENT
.......................................................734 FINAL
THOUGHTS REGARDING SYSTEM.ENTERPRISESERVICES ....................736
SUMMARY
..................................................................................................................738
INDEX
..............................................................................
......................................739 CONTENTS XX
|
any_adam_object | 1 |
author | Troelsen, Andrew |
author_facet | Troelsen, Andrew |
author_role | aut |
author_sort | Troelsen, Andrew |
author_variant | a t at |
building | Verbundindex |
bvnumber | BV014309434 |
callnumber-first | Q - Science |
callnumber-label | QA76 |
callnumber-raw | QA76.9.A73 |
callnumber-search | QA76.9.A73 |
callnumber-sort | QA 276.9 A73 |
callnumber-subject | QA - Mathematics |
ctrlnum | (OCoLC)49931655 (DE-599)BVBBV014309434 |
dewey-full | 005.26/8 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 005 - Computer programming, programs, data, security |
dewey-raw | 005.26/8 |
dewey-search | 005.26/8 |
dewey-sort | 15.26 18 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01268nam a2200361 c 4500</leader><controlfield tag="001">BV014309434</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">00000000000000.0</controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">020523s2002 a||| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1590590112</subfield><subfield code="9">1-59059-011-2</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)49931655</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV014309434</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakwb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-91G</subfield></datafield><datafield tag="050" ind1=" " ind2="0"><subfield code="a">QA76.9.A73</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">005.26/8</subfield><subfield code="2">21</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Troelsen, Andrew</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">COM and .NET interoperability</subfield><subfield code="c">Andrew Troelsen</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Berkeley, CA</subfield><subfield code="b">Apress</subfield><subfield code="c">2002</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXIX, 769 S.</subfield><subfield code="b">Ill.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">Intertech instructor series</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">.Net developer series</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">COM (Computer architecture)</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Computer software</subfield><subfield code="x">Development</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Microsoft .NET Framework</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Object-oriented programming (Computer science)</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">SWB Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=009816495&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-009816495</subfield></datafield></record></collection> |
id | DE-604.BV014309434 |
illustrated | Illustrated |
indexdate | 2024-07-09T19:01:27Z |
institution | BVB |
isbn | 1590590112 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-009816495 |
oclc_num | 49931655 |
open_access_boolean | |
owner | DE-91G DE-BY-TUM |
owner_facet | DE-91G DE-BY-TUM |
physical | XXIX, 769 S. Ill. |
publishDate | 2002 |
publishDateSearch | 2002 |
publishDateSort | 2002 |
publisher | Apress |
record_format | marc |
series2 | Intertech instructor series .Net developer series |
spelling | Troelsen, Andrew Verfasser aut COM and .NET interoperability Andrew Troelsen Berkeley, CA Apress 2002 XXIX, 769 S. Ill. txt rdacontent n rdamedia nc rdacarrier Intertech instructor series .Net developer series COM (Computer architecture) Computer software Development Microsoft .NET Framework Object-oriented programming (Computer science) SWB Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=009816495&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Troelsen, Andrew COM and .NET interoperability COM (Computer architecture) Computer software Development Microsoft .NET Framework Object-oriented programming (Computer science) |
title | COM and .NET interoperability |
title_auth | COM and .NET interoperability |
title_exact_search | COM and .NET interoperability |
title_full | COM and .NET interoperability Andrew Troelsen |
title_fullStr | COM and .NET interoperability Andrew Troelsen |
title_full_unstemmed | COM and .NET interoperability Andrew Troelsen |
title_short | COM and .NET interoperability |
title_sort | com and net interoperability |
topic | COM (Computer architecture) Computer software Development Microsoft .NET Framework Object-oriented programming (Computer science) |
topic_facet | COM (Computer architecture) Computer software Development Microsoft .NET Framework Object-oriented programming (Computer science) |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=009816495&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT troelsenandrew comandnetinteroperability |