O'Reilly logo

COM Programming with Microsoft® .NET by Julian Templeman, John Paul Mueller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Advanced Interaction

Chapter 12 showed you how to use Platform Invoke to call unmanaged functions defined in dynamic-link libraries (DLLs). For simple functions, the procedures outlined in the previous chapter will work very well, but you will come across cases that demand more advanced techniques.

This chapter will show you how to use unmanaged functions that take string arguments or array arguments, or require pointers to be passed. It will also show you how to pass pointers to managed objects into unmanaged code, and how to specify the path to a Platform Invoke DLL dynamically.

The MarshalAs Attribute

You use this attribute to specify how data should be marshaled between managed and unmanaged code when you need to override the defaults. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required