|
From: mike1reynolds on 2 Jul 2008 16:19 I am calling legacy Btrieve database functions using StructureToPtr and PtrToStructure, but I think that I am getting memory corruption from improper marshalling, and I am unclear about when memory is being copied vs memory being pinned. Does StructureToPtr pin, or just copy? I've seen references to pinning memory using GCHandles while googling the topic, and I suspect that I might do better using GCHandle functions rather than Marshal functions since these buffers are reused often. I've spent hours on google trying to get a better understanding, but I'm still in a fog. Which is the best approach for calling old C++ DLLs?
|
Pages: 1 Prev: Code to Extract Text from PDF Next: Get text "literally" from a TextBox |