Đang chuẩn bị liên kết để tải về tài liệu:
Professional ASP.NET 3.5 in C# and Visual Basic Part 135
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Professional ASP.NET 3.5 in C# and Visual Basic Part 135. Building on the revolutionary ASP.NET 2.0 release, ASP.NET 3.5 adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in ASP.NET 2.0 now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS. . | Chapter 28 Using Business Objects The Runtime Callable Wrapper The Runtime Callable Wrapper or RCW is the magic piece of code that enables interaction to occur between .NET and COM. One RCW is created for each COM component in your project. To create an RCW for a COM component you can use Visual Studio 2008. To add an ActiveX DLL to the References section of your project choose Website O Add Reference or choose the Add Reference menu item that appears when you right-click the root node of your project in the Solution Explorer. The Add Reference dialog box appears with five tabs .NET COM Projects Browse and Recent as shown in Figure 28-7. For this example select the COM tab and locate the component that you want to add to your .NET project. After you have located the component highlight the item and click OK to add a reference to the component to your project. The newly added component will then be found inside a newly created Bin folder in your project. Your Interop library is automatically created for you from the ActiveX DLL that you told Visual Studio 2008 to use. This Interop library is the RCW component customized for your ActiveX control as shown previously in Figure 28-6. The name of the Interop file is simply Interop.OriginalName.DLL. It is also possible to create the RCW files manually instead of doing it through Visual Studio 2008. In the .NET Framework you will find a method to create RCW Interop files for controls manually through a command-line tool called the Type Library Importer. You invoke the Type Library Importer by using the tlbimp.exe executable. For example to create the Interop library for the SQLDMO object used earlier start up a Visual Studio 2008 Command Prompt from the Microsoft Visual Studio 2008 O Visual Studio Tools group within your Start Menu. From the comment prompt type tlbimp sqldmo.dll out sqldmoex.dll In this example the out parameter specifies the name of the RCW Interop library to be created. If you omit this parameter you get