Visual Studio Bugs

Total Page:16

File Type:pdf, Size:1020Kb

Visual Studio Bugs C04622027.fm Page 151 Monday, October 9, 2006 10:34 AM Chapter 4 Common .NET Debugging Questions In this chapter: Process- and Infrastructure-Related Questions. .151 Visual Studio Bugs . .165 Designing for Debugging. .166 Debugger Questions . .170 Debugging Scenario Questions . .177 What Tools Do You Use? . .185 Summary . .195 The best part about writing books and articles, in addition to speaking at conferences, is get- ting the questions from developers about debugging and .NET in general. Although I do get a few “my application doesn’t run—what do I do?” e-mails, most of the questions are well thought out and make me look at areas of .NET I normally don’t get a chance to work with— it’s a great learning experience for me. In fact, I enjoy the questions so much I will feel lonely if I don’t get an e-mail question from each of you who purchase the book. Since the last edition of this book, I’ve been keeping a list of all the questions I’ve been asked, and I want to answer the most common of those. Obviously, many of them apply to debug- ging .NET applications, but having gotten many questions about other aspects of develop- ment, I wanted to answer those also. Because of the breadth and depth of .NET development, I may not answer your particular burning question in this chapter, but I can guarantee you’ll learn something. Process- and Infrastructure-Related Questions Many questions I’ve gotten are about debugging and process-related issues. Although I’ve done my best to make Chapter 1, “Bugs: Where They Come From and How You Solve Them,” and Chapter 2, “Preparing for Debugging,” which discussed those issues, as complete as pos- sible, I still get many questions about those issues. Additionally, some common questions are even about the nature of using computers. 151 C04622027.fm Page 152 Monday, October 9, 2006 10:34 AM 152 Part I The Gestalt of Debugging Why must you always develop as a non-admin? If you are logging on to your computer using an account with administrator privileges, you need to raise your right hand and repeat after me: “I do solemnly swear that by the time I get to the end of this question’s answer, I will put this book down and immediately correct the sit- uation. Additionally, I will make all my coworkers do the same.” There is absolutely no reason at all for logging in with administrator rights to develop software! The only time you need to use an account with administrator rights is if you are debugging across user accounts. Fortunately, it’s easy to start individual processes with greater rights so you can do the debugging. One of the most important features of Microsoft Windows Vista is User Account Control (UAC), which defaults users to less privileged accounts and prompts for required credentials whenever a process tries to do something that needs higher privileges. Even with the release of Windows Vista imminent, we will realistically be developing on and using Microsoft Win- dows XP and Microsoft Windows Server 2003 for many years before we have most of our development teams using the new operating system. That doesn’t even consider the end-user or corporate-user scenario, which will take even longer to migrate over. The most important reason you need to be developing without administrator rights, in other words using a limited user account, is to ensure that your application works correctly on a less privileged account. As someone who’s been developing as a limited user for years, it’s hugely frustrating to run an application and see it crash or have an unhandled exception because the developers assumed that everyone runs with administrator rights. This is a completely preventable bug that tells the user that the developers are lazy and certainly aren’t doing their job. The good news is that on Windows XP and Windows Server 2003, it’s easy to find all the tricks because there’s now an excellent Web site that will get you started: Jonathan Hardwick’s http://nonadmin.editme.com. Many of the links and articles on the Web site point to Aaron Margosis’s blog (http://blogs.msdn.com/aaron_margosis)—he’s done the best writing on the subject. Both Web sites are excellent and are part of your required reading. The main idea behind using your computer without administrator rights is that you’ll use the Runas.exe program that comes with Windows to start particular processes as a user with administrator rights on that machine. For example, if you wanted to debug a Microsoft ASP.NET application running inside Internet Information Services (IIS), the debugger would need administrator rights to debug across the user accounts (your account to Local Service), so you would run the following command (assuming that Microsoft Visual Studio is in the path and the account you want to use is Administrator): runas /u:Administrator devenv.exe The runas command will prompt you for the Administrator account password, and after you type it, Visual Studio will start. From the new instance of Visual Studio, you can now debug the IIS-based application without exposing your whole system to viruses and spyware C04622027.fm Page 153 Monday, October 9, 2006 10:34 AM Chapter 4 Common .NET Debugging Questions 153 because you logged in as an administrator. Note that you can also use Mark Russinovich’s excellent Psexec.exe program (http://www.sysinternals.com/Utilities/PsExec.html), which even allows you to start programs on other machines. The last thing I want to mention about runas is that when you start a program with it, the pro- gram is using the profile from a different user, not the logged-in user. You probably already guessed that, but I’ve seen people get tripped up with setting an environment variable in their logged in account and wonder why their program started with runas doesn’t see the environ- ment variable. If you’re still not convinced that running with a non-administrator account is worthwhile, you should read the wonderful study done by Andrew Garcia in the magazine eWeek, “Is System Lockdown the Secret Weapon?” (http://www.eweek.com/article2/0,1759,1891447,00.asp). He took two fully patched systems, one running Microsoft Windows 2000 Professional SP4 and the other running Windows XP Professional SP2, and surfed some not-so-good Web sites using Administrator, Power User, and User accounts. After each surfing session, he ran spy- ware scans. On Windows XP, the Administrator and Power User accounts had 16 total threats! In setting up my friends’ and family members’ machines so they all run as a limited user, I’ve eliminated nearly all the spyware and virus calls I used to get. The http://nonadmin.editme.com site does a great job of getting you started, but I wanted to share some of my tips about running and developing in a limited user account to help you make the transition. The Runas program is great from the command line, but there’s a hidden feature with shortcuts (.lnk files) that I like to use to automatically be prompted for the user account to run in when clicking the shortcut. After you’ve created the .lnk file, right-click its icon and select Properties from the shortcut menu. On the Shortcut tab, click Advanced to open the Advanced Properties dialog box. If you select the first check box, Run With Different Credentials, now whenever you double-click the shortcut, you’ll be prompted with the Run As dialog box, shown in Figure 4-1, in which you can specify the user name and password to run the application. Figure 4-1 Shortcut prompt for user account C04622027.fm Page 154 Monday, October 9, 2006 10:34 AM 154 Part I The Gestalt of Debugging This is a very convenient way to start applications such as Visual Studio. However, there seems to be a bug in saving the shortcut, because if you change other values in the .lnk file properties, Windows Explorer randomly forgets that you selected the Run With Different Cre- dentials check box. To work around this bug, make all the other changes to the shortcut and save those changes. Go back into the Properties dialog box for the shortcut and select the Run With Different Credentials check box as the last change. One shortcut I like to set up with Run With Different Credentials is one to a Command Prompt. If the Command Prompt is running with administrator privileges, any applications you start from it are also under the same account. If you need to run multiple items with administrator privileges, this trick is very convenient. I even change the icon for that link to be a pirate skull and bones so it appears when pressing Alt+Tab thus helping me find it quickly. When logged on with limited privileges, you sometimes need to access to Windows Explorer to set security on a directory or set up a share. To allow you to run Windows Explorer for another account, you’ll first need to log on to that account and then set Windows Explorer to use separate instances. On the Tools menu, select Folder Options, click the View tab, and in the Advanced Settings box, scroll down and select the Launch Folder Windows In A Separate Process check box. It is a very good idea to enable this setting in general because each Explorer window is in a separate process—if one hangs, you don’t hang the desktop, the taskbar, and everything else on the machine.
Recommended publications
  • Crypto Ransomware Analysis and Detection Using
    CRYPTO RANSOMWARE ANALYSIS AND DETECTION USING PROCESS MONITOR by ASHWINI BALKRUSHNA KARDILE Presented to the Faculty of the Graduate School of The University of Texas at Arlington in Partial Fulfillment of the Requirements for the Degree of MASTER OF SCIENCE IN COMPUTER SCIENCE THE UNIVERSITY OF TEXAS AT ARLINGTON December 2017 Copyright © by Ashwini Balkrushna Kardile 2017 All Rights Reserved ii Acknowledgements I would like to thank Dr. Ming for his timely guidance and motivation. His insights for this research were valuable. I would also like to thank my committee members Dr. David Levine and Dr. David Kung for taking out time from their schedule and attending my dissertation. I am grateful to John Podolanko; it would not have been possible without his help and support. Thank you, John, for helping me and foster my confidence. I would like to thank my colleagues for supporting me directly or indirectly. Last but not the least; I would like to thank my parents, my family and my friends for encouraging me and supporting me throughout my research. November 16, 2017 iii Abstract CRYPTO RANSOMWARE ANALYSIS AND DETECTION USING PROCESS MONITOR Ashwini Balkrushna Kardile, MS The University of Texas at Arlington, 2017 Supervising Professor: Jiang Ming Ransomware is a faster growing threat that encrypts user’s files and locks the computer and holds the key required to decrypt the files for ransom. Over the past few years, the impact of ransomware has increased exponentially. There have been several reported high profile ransomware attacks, such as CryptoLocker, CryptoWall, WannaCry, Petya and Bad Rabbit which have collectively cost individuals and companies well over a billion dollars according to FBI.
    [Show full text]
  • The Open Pitt What's Cooking in Linux and Open Source in Western Pennsylvania Issue 31 January 2007
    The Open Pitt What's cooking in Linux and Open Source in Western Pennsylvania Issue 31 January 2007 www.wplug.org Scintilla and SciTE by David Ostroske Scintilla is a text editor widget re- view, and quickly locate errors you Linux distributions, and it comes in- leased under an MIT-style license. If might have in your code. cluded with some versions of Ruby. this leaves you wondering “what's a As for me, I just use it to edit plain There are also plenty of other Scin- widget?,” it's basically a component text files. I could get along with using tilla-based applications available. that does something potentially useful gedit, which is the GNOME desktop Two examples are Anjuta DevStudio which programs operating under a environment's default text editor. But <http://anjuta.sourceforge.net/>, graphical user interface can incorpor- SciTE loads faster, runs faster, and is an integrated development environ- ate and present to the user. As a wid- more powerful. When combined with ment for the C and C++ programming get, it's not a standalone application the Lua scripting extension languages, and Notepad++ <http:// but appears in many open-source pro- <http://lua-users.org/wiki/ notepad-plus.sourceforge.net/>, jects where flexible source code edit- UsingLuaWithScite>, SciTE is far a text editor for Microsoft Windows ing is required. more customizable than gedit will released under the GNU General Pub- SciTE, the Scintilla Text Editor, is ever be. Plus, it can be configured to lic License. Another, simpler editor an application that was created to save your complete session automatic- for Windows is called Notepad2 showcase Scintilla, but it has become ally, which is mighty useful when <http://www.flos-freeware.ch/ a top-notch editor in its own regard.
    [Show full text]
  • The Scite – TEX Integration
    Hans Hagen VOORJAAR 2004 21 The Scite – TEX integration Abstract Editors are a sensitive, often emotional subject. Some editors have exactly the properties a software designer or a writer desires and one gets attached to it. Still, most computer experts such as TEX users often are use three or more different editors each day. Scite is a modern programmers editor which is very flexible, very configurable, and easily extended. We integrated Scite with TEX, CONTEXT, LATEX, METAPOST and viewer and succeeded in that it is now possible to design and write your texts, manuscripts, reports, manuals and books with the Scite editor without having to leave the editor to compile and view your work. The article describes what is available and what you need with special emphasis on highlighting commands with lexers. About Scite Scite is a source code editor written by Neil Hodgson. After playing with several editors we found that this editor is quite configurable and extendible. At PRAGMA ADE we use TEXEDIT, an editor written long ago in Niklaus Wirth’s MODULA as well as a platform independent reimplementation of it called TEXWORK written in PERL/TK. Although our editors possess some functionality that is not (yet) present in Scite, we decided to use Scite because it frees us from the editor maintenance chore. Installing Scite Installing Scite is straightforward. We assume below that you use MS WINDOWS but for other operating systems installation is not much different. First you need to fetch the archive from: www.scintilla.org The MS WINDOWS binaries are in wscite.zip, and you can unzip this in any direc- tory as long as the binary executable ends up in your PATH or as shortcut icon on your desktop.
    [Show full text]
  • Development Environment
    BLUESPAWN BLUESPAWN Dev Team Apr 28, 2021 CONTENTS 1 Our Mission 3 2 What is BLUESPAWN 5 3 Get Involved & Contribute to the project7 4 Why we made BLUESPAWN9 4.1 Contact Us................................................9 4.2 Sponsoring................................................9 4.3 Licensing.................................................9 4.4 Project Authors.............................................. 10 4.5 Publications............................................... 11 4.6 Hunts................................................... 11 4.7 Scan Mode................................................ 11 4.8 Mitigations................................................ 11 4.9 Reactions................................................. 11 4.10 Logging and Output........................................... 11 4.11 Agent7 Integration............................................ 11 4.12 Getting Started.............................................. 11 4.13 Examples of BLUESPWAN in Action.................................. 13 4.14 Using Mitigations............................................ 14 4.15 Getting Involved............................................. 18 4.16 Setting up your Development Environment............................... 18 4.17 Software Architecture Info........................................ 19 4.18 Project Roadmap............................................. 21 i ii BLUESPAWN CONTENTS 1 BLUESPAWN 2 CONTENTS CHAPTER ONE OUR MISSION BLUESPAWN helps blue teams monitor systems in real-time against active attackers by detecting
    [Show full text]
  • Appendix a the Ten Commandments for Websites
    Appendix A The Ten Commandments for Websites Welcome to the appendixes! At this stage in your learning, you should have all the basic skills you require to build a high-quality website with insightful consideration given to aspects such as accessibility, search engine optimization, usability, and all the other concepts that web designers and developers think about on a daily basis. Hopefully with all the different elements covered in this book, you now have a solid understanding as to what goes into building a website (much more than code!). The main thing you should take from this book is that you don’t need to be an expert at everything but ensuring that you take the time to notice what’s out there and deciding what will best help your site are among the most important elements of the process. As you leave this book and go on to updating your website over time and perhaps learning new skills, always remember to be brave, take risks (through trial and error), and never feel that things are getting too hard. If you choose to learn skills that were only briefly mentioned in this book, like scripting, or to get involved in using content management systems and web software, go at a pace that you feel comfortable with. With that in mind, let’s go over the 10 most important messages I would personally recommend. After that, I’ll give you some useful resources like important websites for people learning to create for the Internet and handy software. Advice is something many professional designers and developers give out in spades after learning some harsh lessons from what their own bitter experiences.
    [Show full text]
  • Teamcity 7.1 Documentation.Pdf
    1. TeamCity Documentation . 4 1.1 What's New in TeamCity 7.1 . 5 1.2 What's New in TeamCity 7.0 . 14 1.3 Getting Started . 26 1.4 Concepts . 30 1.4.1 Agent Home Directory . 31 1.4.2 Agent Requirements . 32 1.4.3 Agent Work Directory . 32 1.4.4 Authentication Scheme . 33 1.4.5 Build Agent . 33 1.4.6 Build Artifact . 34 1.4.7 Build Chain . 35 1.4.8 Build Checkout Directory . 36 1.4.9 Build Configuration . 37 1.4.10 Build Configuration Template . 38 1.4.11 Build Grid . 39 1.4.12 Build History . 40 1.4.13 Build Log . 40 1.4.14 Build Number . 40 1.4.15 Build Queue . 40 1.4.16 Build Runner . 41 1.4.17 Build State . 41 1.4.18 Build Tag . 42 1.4.19 Build Working Directory . 43 1.4.20 Change . 43 1.4.21 Change State . 43 1.4.22 Clean Checkout . 44 1.4.23 Clean-Up . 45 1.4.24 Code Coverage . 46 1.4.25 Code Duplicates . 47 1.4.26 Code Inspection . 47 1.4.27 Continuous Integration . 47 1.4.28 Dependent Build . 47 1.4.29 Difference Viewer . 49 1.4.30 Guest User . 50 1.4.31 History Build . 51 1.4.32 Notifier . 51 1.4.33 Personal Build . 52 1.4.34 Pinned Build . 52 1.4.35 Pre-Tested (Delayed) Commit . 52 1.4.36 Project . 53 1.4.37 Remote Run . ..
    [Show full text]
  • Editors Desk ...2
    The content of this magazine is released under the Creative Commons Attribution-Share Alike 3.0 Unported license. For more information visit user http://creativecommons.org/licenses/by-sa/3.0 TM Issue #1 - April 2009 EDITORS DESK ................................ 2 COMMUNITY NEWS ........................ 3 CHOOSING A DE/WM ...................... 4 HARDENING SSH IN 60 SECONDS .................................... 6 GAMERS CORNER .......................... 9 TIPS & TRICKS ............................... 10 PIMP MY ARCH .............................. 11 SOFTWARE REVIEW ......................12 Q&A ..................................................14 EEDDIITTOORRSS DDEESSKK Welcome to the first issue of Arch User Magazine! ARCH USER STAFF Daniel Griffiths (Ghost1227) ........... Editor ello, and thank you for picking up issue #1 of Arch User Magazine! While David Crouse (Crouse) .......... Contributor the vast majority of you probably know me (or have at least seen me H around the forums), I feel that I should take a moment to introduce myself. My name is Daniel Griffiths, and I am a 26-year-old independent contractor in Delaware, US. Throughout my life, I have wandered through various UNIX/Linux systems including (but not limited to) MINIX, RedHat, Mandrake, Slackware, Gentoo, Debian, and even two home made distributions based on Linux From Scratch. I finally found Arch in 2007 and instantly fell in love with its elegant simplicity. Some of our more attentive readers may note that Arch already has a monthly newsletter. With the existence of the aformentioned newsletter, what is the point of adding another news medium to the mix? Fear not, newsletter readers, I have no intention of letting Arch User Magazine take the place of the newsletter. In fact, Arch User Magazine and the newsletter are intended to fill two very different needs in the Arch community.
    [Show full text]
  • Multiband Plasma-Process Monitor C10346-01
    Multiband plasma-process monitor C10346-01 C10346-01 is a multiband plasma process monitor designed for real-time, monitoring of wide spectrum. Monitoring Plasma (Emission Spectrum) in Real-Time C10346-01 is a monitoring system to detect wide spectrum plasma emission during the process of etching, spattering and CVD in semiconductor manufacturing . With the various analysis functions, it can be used for setting up end-point detection conditions and automatic detection of etching and cleaning, estimation of plasma species and monitoring (plasma) contamination and abnormal discharges. Features Simultaneous measurements of wide (plasma) spectrum Easy measurement using optical fibers Captures wide spectrum (emission) from (plasma) radicals or ions. The equipped optical fiber can be easily attached to plasma C10346-01 : 200 nm to 950 nm chambers through a SMA connector widely used. Real-time plasma (emission) measurement Operation with multiple chambers Continuously measures up to 15 000 spectra at an interval of 20 ms A single analysis unit can control up to four C10346-01 (50 ms with concurrent running of detection software) Multiband plasma-process monitor via a USB 2.0 interface. Highly accurate and reliable measurements Data acquisition software A high resolution spectrometer and a ultra-high sensitive photo The data acquisition software stores the spectrum data into detector are firmly locked in position to assure the acquisition of the database during plasma process. This stored data can accurate spectrum and precise spectrum responsivity data then be used for spectrum data calculations. through sharply focused plasma emission spectrum images. Optional software High-sensitivity detection in UV spectrum region High sensitive endpoint detection and real-time monitoring of Detects the UV spectrum region from 200 nm with high process abnormality are achieved by creating ''detection model''.
    [Show full text]
  • ASP.NET SQL Server
    CYAN YELLOW MAGENTA BLACK PANTONE 123 C BOOKS FOR PROFESSIONALS BY PROFESSIONALS® THE EXPERT’S VOICE® IN SQL SERVER Companion eBook Available Pro ASP.NET for SQL Server: High Performance Data Access for Web Developers Pro Dear Reader, ASP.NET ASP.NET As web developers, we work with ASP.NET and SQL Server by using a rich toolkit of databound controls and database functionality that promises great Pro performance and productivity gains after we know how to use it properly. Unfortunately, that toolkit is cluttered with a wide spectrum of features—some ideal for the one-man shop building a tiny application, and others aimed at large developer teams producing websites used by thousands of people. This book carves out a path for the senior developer who needs to produce a professional website that will perform well under high load. I focus on what a senior developer should know and use daily while also for explaining which features to avoid and why. There are several, little-known features ASP.NET in ASP.NET and SQL Server that work very well together without requiring much effort. These features get detailed coverage. Each chapter includes a full sample project, to help you learn by digging into some good code. These projects are for designed to keep you engaged while using them to understand the chapter topics in greater detail. What you will learn from this book are techniques that allow you to leverage SQL Server the many performance and productivity improvements that have been provided ASP.NET and SQL Server. These improvements will help you produce better SQL Server websites with the desired results right from the start.
    [Show full text]
  • Process Monitor
    Моим коллегам — специалистам по устранению неполадок Windows. Никогда не отступайте и не сдавайтесь! – Марк Руссинович Элизе, благодаря ей сбываются самые прекрасные мечты! (И она гораздо круче меня!) – Аарон Маргозис SIN_Titul.indd I 29.12.2011 13:41:15 Mark Russinovich Aaron Margosis Windows® Sysinternals Administrator's Reference SIN_Titul.indd II 29.12.2011 13:41:15 Марк Руссинович Аарон Маргозис Предисловие Дэвида Соломона Утилиты Sysinternals Справочник администратора 2012 SIN_Titul.indd III 29.12.2011 13:41:15 УДК 004.738.5 ББК 32.973.202 P89 Руссинович Марк, Маргозис Аарон P89 Утилиты Sysinternals. Справочник администратора. / Пер. с англ. — М. : Издательство «Русская редакция» ; СПб. : БХВ-Петербург, 2012. — 480 стр. : ил. ISBN 978-5-7502-0411-3 («Русская редакция») ISBN 978-5-9775-0826-1 («БХВ-Петербург») Эта книга — исчерпывающее руководство по использованию утилит Sysin- ternals. Авторы книги — создатель утилит Sysinternals Марк Руссинович и при- знанный эксперт по Windows Аарон Маргозис — подробно разбирают многочис- ленные функции утилит для диагностики и управления файлами, дисками, си- стемой безопасности и встроенным инструментарием Windows. Рекомендации авторов проиллюстрированы многочисленными примерами из реальной жизни. Изучив их, вы сможете справиться с неполадками в ИТ-системах так, как это делают настоящие профессионалы. Книга состоит из 18 глав и предметного указателя. Она предназначена для ИТ-специалистов и опытных пользователей Windows, которые хотят применять утилиты Sysinternals с максимальной эффективностью. УДК 004.738.5 ББК 32.973.202 © 2011-2012, Translation Russian Edition Publishers. Authorized Russian translation of the English edition of Windows® Sysinternals Administrator’s Reference, ISBN 978- 0-7356-5672-7 © Aaron Margosis and Mark Russinovich. This translation is published and sold by permission of O’Reilly Media, Inc., which owns or controls all rights to publish and sell the same.
    [Show full text]
  • Debugging Mixedenvironment Programs with Blink
    SOFTWARE – PRACTICE AND EXPERIENCE Softw. Pract. Exper. (2014) Published online in Wiley Online Library (wileyonlinelibrary.com). DOI: 10.1002/spe.2276 Debugging mixed-environment programs with Blink Byeongcheol Lee1,*,†, Martin Hirzel2, Robert Grimm3 and Kathryn S. McKinley4 1Gwangju Institute of Science and Technology, Gwangju, Korea 2IBM, Thomas J. Watson Research Center, Yorktown Heights, NY, USA 3New York University, New York, NY, USA 4Microsoft Research, Redmond, WA, USA SUMMARY Programmers build large-scale systems with multiple languages to leverage legacy code and languages best suited to their problems. For instance, the same program may use Java for ease of programming and C to interface with the operating system. These programs pose significant debugging challenges, because programmers need to understand and control code across languages, which often execute in different envi- ronments. Unfortunately, traditional multilingual debuggers require a single execution environment. This paper presents a novel composition approach to building portable mixed-environment debuggers, in which an intermediate agent interposes on language transitions, controlling and reusing single-environment debug- gers. We implement debugger composition in Blink, a debugger for Java, C, and the Jeannie programming language. We show that Blink is (i) simple: it requires modest amounts of new code; (ii) portable: it supports multiple Java virtual machines, C compilers, operating systems, and component debuggers; and (iii) pow- erful: composition eases debugging, while supporting new mixed-language expression evaluation and Java native interface bug diagnostics. To demonstrate the generality of interposition, we build prototypes and demonstrate debugger language transitions with C for five of six other languages (Caml, Common Lisp, C#, Perl 5, Python, and Ruby) without modifications to their debuggers.
    [Show full text]
  • Appendixes APPENDIX A
    PART 8 Appendixes APPENDIX A COM and .NET Interoperability The goal of this book was to provide you with a solid foundation in the C# language and the core services provided by the .NET platform. I suspect that when you contrast the object model provided by .NET to that of Microsoft’s previous component architecture (COM), you’ll no doubt be con- vinced that these are two entirely unique systems. Regardless of the fact that COM is now considered to be a legacy framework, you may have existing COM-based systems that you would like to inte- grate into your new .NET applications. Thankfully, the .NET platform provides various types, tools, and namespaces that make the process of COM and .NET interoperability quite straightforward. This appendix begins by examin- ing the process of .NET to COM interoperability and the related Runtime Callable Wrapper (RCW). The latter part of this appendix examines the opposite situation: a COM type communicating with a .NET type using a COM Callable Wrapper (CCW). ■Note A full examination of the .NET interoperability layer would require a book unto itself. If you require more details than presented in this appendix, check out my book COM and .NET Interoperability (Apress, 2002). The Scope of .NET Interoperability Recall that when you build assemblies using a .NET-aware compiler, you are creating managed code that can be hosted by the common language runtime (CLR). Managed code offers a number of ben- efits such as automatic memory management, a unified type system (the CTS), self-describing assemblies, and so forth. As you have also seen, .NET assemblies have a particular internal compo- sition.
    [Show full text]