C# for Java Programmers

Chapter 14: Working with ActiveX, COM, and Unmanaged Code

Introduction

At this point you have learned most of what C# has to offer. This chapter will complete your arsenal by showing you some more advanced programming techniques available in the C# language.

No matter how good a technology is, it just can t come in and replace all of the other existing ones. The designers of the C# language realized this fact and equipped the language with support for old legacy applications. Java provides this functionality through the Java Native Interface (JNI), which allows you to work with code that is written in some other language. This chapter will look at several ways that C# lets you work with objects that are written in another language such as C, C++, or Visual Basic.

Currently, there are several projects, such as the Mono project (www.go-mono.net), which are trying to port the .NET platform to other operating systems like the UNIX-BSD OS. However, Microsoft would probably prefer that you develop most of your C# applications under the Windows environment. Therefore, most of the tools provided by Microsoft are for interacting with existing Windows applications and components such as ActiveX controls, COM DLLs, and the Win32 APIs. You will see some of these tools in action in this chapter.

The first thing you will learn is the difference between managed and unmanaged code in C#. Unmanaged codes are methods that are executed outside the .NET Framework s managed environment.

Next, the chapter will show how you can incorporate standard COM dynamic link library (DLL)...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Integrated Development Environment (IDE)
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.