N/Direct - The .NET Interoperability Resource Center 

r4 r4 card r4 ds card links of london sweetie bracelet thomas sabo online shop r4i card

Samples

 

 

 

Most Valuable Professional

Categories

General
Platform Invocation Services (P/Invoke)
Component Services
C++ Interop / It Just Works (IJW)
Windows Shell
Internet Explorer and the Web Browser Control

 

General

Customizing interop assemblies
Author(s): Sonja Keserovic Language(s): C#, C++
Good examples of when it's necessary to modify interop assemblies, and how it's done.

 

Platform Invocation Services (P/Invoke)

OpenNETCF.org WinAPI Library Open-Source Project
Author(s): OpenNETCF Language(s): C#
The WinAPI Library is an assembly that provides managed wrappers for the Win32 APIs in Windows CE.

Platform Invoke Samples
Author(s): Sonja Keserovic Language(s): C#, VB.NET, C++
The platform invoke samples demonstrate how to call functions exported from an unmanaged library: how to declare different types, how to use available attributes to modify default behavior, how to use methods of the Marshal class when needed, and which aspects of garbage collection and threading could affect results.

Dynamic PInvoke method calls
Author(s): Mattias Sjögren Language(s): C#, VB.NET
Demonstrates how to use Reflection Emit to generate P/Invoke methods when the implementing DLL location isn't known at compile time.

Interop Declarations for Windows.h
Author(s): Peter Hallam Language(s): C#
This post includes C# definitions of many common Win32APIs and their related data structures.

HOW TO: Set a Windows Hook in Visual C# .NET
Author(s): Microsoft Language(s): C#
This article describes how to set a hook that is specific to a thread and to a hook procedure by using the mouse hook as an example. You can use hooks to monitor certain types of events. You can associate these events with a specific thread or with all of the threads in the same desktop as a calling thread.

HOW TO: Use the Unmanaged HTML Help API from a Managed Visual C# .NET Application (317406)
Author(s): Microsoft Language(s): C#
This step-by-step article shows you how to use marshalling to call the unmanaged HTML Help API from a Visual C# .NET application.

HOWTO: Determine the Operating System Service Pack Level in Visual C++ .NET (307393)
Author(s): Microsoft Language(s): C++

HOWTO: Determine the Operating System Service Pack Level in Visual Basic .NET (304722)
Author(s): Microsoft Language(s): VB.NET

HOWTO: Determine the Operating System Service Pack Level in Visual C# .NET (304721)
Author(s): Microsoft Language(s): C#

 

Component Services

OLE Structured Storage Classes
Author(s): Eduardo Morcillo Language(s): VB.NET
Wrapper classes for the OLE structured storage files and interfaces. You can use these classes to read the properties of Office documents.

HOW TO: Wrap a UCOMIStream in a Stream Class in Visual Basic .NET (321695)
Author(s): Microsoft Language(s): VB.NET
This step-by-step article describes how to wrap a UCOMIStream interface in a class that descends from the abstract Stream class.

HOW TO: Wrap a UCOMIStream in a Stream Class (321340)
Author(s): Microsoft Language(s): C++
This step-by-step article describes how to wrap a UCOMIStream interface in a class that descends from the abstract Stream class.

 

C++ Interop / It Just Works (IJW)

Transitioning AppDomains from native code using delegates
Author(s): Sonja Keserovic Language(s): C++
When transitioning from native to managed code using C++, you'll transition into AppDomain where your thread was the last time (or default AppDomain if thread was never in managed code). If you need to pick AppDomain yourself you can use delegates to perform this transition.

 

Windows Shell

Easy Windows shell namespace extensions in C# and VB.NET
Author(s): Dominic Cooney Language(s): C#
A framework for writing Windows shell namespace extensions in C#, VB.NET, or any other .NET language. This sample includes the complete C# source for the framework, and the source code for three sample namespace extensions.

Shell Extensions with .NET
Author(s): Eduardo Morcillo Language(s): VB.NET
The code includes a library with base classes from which the extensions classes inherits. The base classes contains the code to register the extensions automatically (with the help of two custom attributes) when the extension library is registered for COM.

Extending Explorer with Band Objects using .NET and Windows Forms
Author(s): Pavel Zolnikov Language(s): C#
Walks you through the implementation of an Explorer bar with the help of BandObject base class. Describes implementation details of the BandObject class.

Dependency Walker
Author(s): Sonja Keserovic Language(s): C#, C++
A managed property sheet shell extension that adds a tab called .NET References to the system property page dialog.

Explorer column handler shell extension in C#
Author(s): Richard Birkby Language(s): C#
This article shows how to write a column handler shell extension for Explorer's 'Detail' view using C#.

Creating a shell extension with C#
Author(s): Richard Birkby Language(s): C#
Demonstrates building a Windows Explorer shell extension using C# and ComInterop.

HOW TO: Implement a Managed Component that Wraps the Browse For Folder Common Dialog Box by Using Microsoft Visual Basic .NET (811004)
Author(s): Microsoft Language(s): VB.NET
This step-by-step article describes how to write a design time component that wraps the Browse For Folder common dialog box.

HOW TO: Implement a Managed Component that Wraps the Browse For Folder Common Dialog Box by Using C# (306285)
Author(s): Microsoft Language(s): C#
This step-by-step article describes how to write a design time component that wraps the Browse For Folder common dialog box.

HOW TO: Use the SHGetFileInfo Function to Get the Icons That Are Associated with Files in Visual C# .NET (319350)
Author(s): Microsoft Language(s): C#
This step-by-step article describes how to use the SHGetFileInfo function to get the icons that are associated with files.

HOW TO: Use the SHGetFileInfo Function to Get the Icons That Are Associated with Files in Visual Basic .NET (319340)
Author(s): Microsoft Language(s): VB.NET
This step-by-step article describes how to use the SHGetFileInfo function to get the icons that are associated with files.

ShellLink
Author(s): Mattias Sjögren Language(s): C#, VB.NET
This sample demonstrates how to read and write shortcut files from managed code.

Task Scheduler for .NET
Author(s): Mattias Sjögren Language(s): C#
Interface definitions and a simple demo app showing how to use the Windows Task Scheduler from .NET. Uses only the raw COM APIs.

Task Scheduler Library for .NET
Author(s): David Hall Language(s): C#
A library for .NET that encapsulates the Task Scheduler COM object.

Wrapper Classes for the Windows Task Scheduler
Author(s): Eduardo Morcillo Language(s): VB.NET
Add, modify and delete tasks in the Task Scheduler from .net applications.

C# does Shell, Part 1
Author(s): Arik Poznanski Language(s): C#
This article introduces shell programming using C#. It includes developing several utility classes for working with the shell and a class that wraps the extensible Browse for Folder dialog.

C# does Shell, Part 2
Author(s): Arik Poznanski Language(s): C#
This article continues shell programming using C#. It includes Launching applications, Doing Shell file operations (Copy, Move, Delete) with the proper shell response, Adding files to Recent Documents list and Doing some printer operations.

C# does Shell, Part 3
Author(s): Arik Poznanski Language(s): C#
This article is about Application Desktop Toolbars, which are applications that can align to the screen much like the taskbar. The article will develop a base class for developing such apps.

C# does Shell, Part 4
Author(s): Arik Poznanski Language(s): C#
This article is about the AutoComplete features enabled by windows and how to use them with C#. AutoComplete is the ability to expand strings written in an edit box. The article will develop a class for using this functionality in you applications.

 

Internet Explorer and the Web Browser Control

The HTMLEditor
Author(s): Tim Anderson Language(s): C#
The HTMLEditor control is a wrapper for MSHTML, the rendering portion of Internet Explorer (and IE's largest single component). It is written in C#. Unlike the .Net webbrowser control, this is not an ActiveX control. Rather it is an ActiveX Document. Even if you are not interested in MSHTML, you may be interested in the HTMLEditor as an example of advanced .NET / COM interop.

WebOCHostVB.exe Hosts the WebBrowser Control in Visual Basic .NET (311303)
Author(s): Microsoft Language(s): VB.NET
The WebOCHostVB.exe sample demonstrates how to host the WebBrowser control in Visual Basic .NET.

HOW TO: Automate Internet Explorer Within a Contained Visual Basic .NET UserControl (311295)
Author(s): Microsoft Language(s): VB.NET
This article contains a Microsoft Visual Basic .NET sample file that demonstrates how to access Microsoft Internet Explorer's automation model and scripting model from within a contained Visual Basic .NET UserControl.