Skip to Content
.NET and COM: The Complete Interoperability Guide
book

.NET and COM: The Complete Interoperability Guide

by Adam Nathan
January 2002
Intermediate to advanced
1608 pages
38h 34m
English
Sams
Content preview from .NET and COM: The Complete Interoperability Guide

Chapter 19. Deeper Into PInvoke and Useful Examples

In This Chapter

Callbacks

Passing Structures

Handling Variable-Length Structures and Signatures

Using C# Unsafe Code

Guarding Against Premature Garbage Collection

Choosing the DLL Location or Name Dynamically

Example: Responding Immediately to Console Input

Example: Clearing the Console Screen

Example: Using CoCreateInstanceEx to Activate Remote COM Objects

In this chapter, we cover a variety of advanced topics, but focus mainly on two essential topics that weren’t covered in the previous chapter: callbacks and structure marshaling. In examining these topics, we cover useful examples that you might want to copy and paste into your own applications. You can never have too ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

.NET and COM Interoperability Handbook, The

.NET and COM Interoperability Handbook, The

Alan Gordon
COM Programming with Microsoft® .NET

COM Programming with Microsoft® .NET

John Paul Mueller, Julian Templeman

Publisher Resources

ISBN: 9780672333583Purchase book