Wednesday, August 1, 2007

.NET 2.0 Interoperability Recipes - Chapter 1

I just finished the first chapter of .NET 2.0 Interoperability Recipes. Several points mentioned in the chapter are written down here for my reference.
  • To find the entry point of a function in a dll, use dumpbin.exe to check the exact function name.
  • One solution to the memory allocation problem in unmanaged functions is to write a c++ wrapper to convert the unmanaged data structures to managed ones, (check out Marshal methods) and free the unmanaged memory allocation before returning from the c++ wrapper.

No comments: