N/Direct - The .NET Interoperability Resource Center 

FAQ

 

 

 

Most Valuable Professional

Categories

VS.NET and the .NET Framework SDK Tools
Language or Compiler Specifics
Platform Invocation Services (P/Invoke)
COM Interop
Marshaling and Memory Management
Data Access

 

VS.NET and the .NET Framework SDK Tools

How can I prevent TlbExp from mangling my enum member names?

 

Language or Compiler Specifics

Should I use Declare or DllImport in VB.NET? What's the difference?

How do I handle optional COM method parameters in C#?

 

Platform Invocation Services (P/Invoke)

My callback works for a while, but eventually throws an exception. What's wrong?

How do I call functions in a DLL not in the default search path?

How do I call a C/C++ vararg function from .NET?

 

COM Interop

My classes exported to COM don't contain any methods, even if they are marked with ComVisible(true). What's wrong?

When I automate an Office application, it remains in memory even after I call Quit(). Why?

How do I give an interop assembly a strong name?

 

Marshaling and Memory Management

How do I call a function that returns a pointer to an array of structures?

How do I copy a numeric variable to a byte array or vice versa?

How do I copy a structure to a byte array or vice versa?

When I try to use a structure containing an array of other structures, I get an exception. What's wrong?

How do I deal with variable length structures?

 

Data Access

Why do I get an InvalidCastException when calling the SQLDMO ListAvailableSQLServers() method?