Appendix H COM Integration 1373 The translation (Web hosting isp)
Appendix H COM Integration 1373 The translation for each COM component is performed by a Runtime Callable Wrapper (RCW). The RCW is a proxy object created by the .NET runtime from the information in the object s primary interop assembly. The RCW manages the COM object and performs communication between .NET code and the COM object. When we instantiate a COM object in C#, we are actually creating a new instance of the object s RCW. The communication between the RCW and the COM component is entirely transparent, enabling the .NET developer to interact with the COM object as if it were a .NET object. TERMINOLOGY ActiveX monolithic executable COM (Component Object Model) .NET component COM component .OCX file COM limitation primary interop assembly Common Runtime Library proxy proxy Component Object Model (COM) RCW (Runtime Callable Wrapper) DLL (Dynamic Link Library) RegSvr32 utility .dll file Runtime Callable Wrapper (RCW) DLL hell shared library Dynamic Link Library (DLL) .tlb file Globally Unique Identifier (GUID) Windows Forms proxy GUID (Globally Unique Identifier) Windows Registry SELF-REVIEW EXERCISES H.1 Fill in the blanks in each of the following statements: a) Initially, DOS and Windows programs were designed as executables. b) Microsoft incorporated shared libraries, or , into Windows to allow program modularity and code reusability. c) The COM specification was designed as a uniform programming model that promotes , and . d) A contains language-independent descriptions of all interfaces, methods and data types defined in a COM component. e) When an ActiveX control is imported, two files are created: A(n) proxy and proxy. H.2 State whether each of the following statements is true or false. If false, explain why. a) The Runtime Callable Wrapper (RCW) allows .NET components to be accessed from COM components. b) A primary interop assembly contains information about COM components. c) .NET component GUIDs must be entered in the Windows Registry. d) The Component Object Model eliminates DLL hell. e) ActiveX controls are COM components. ANSWERS TO SELF-REVIEW EXERCISES H.1 a) monolithic. b) Dynamic Link Libraries (DLLs). c) language independence, backwards compatibility and version control. d) type library e) Common Language Runtime, Windows Forms proxy. H.2 a) False. The RCW allows .NET components to access COM components. b) True. c) False. Unlike COM components, .NET components contain their GUIDs internally. d) False. COM DLLs may not be correctly representing in the windows registry causing misidentification and resulting in DLL hell. e) True.
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.