The underlying cause is a rock-hard exception, the equivalent of an AccessViolationException. It occurs at a very critical time, just as the native DLL gets loaded and its DllMain() entrypoint runs. You can see it in the Output window if you enable unmanaged debugging. There isn't anything you can look at or do about if you don't have source code. Cisco has source code, you'll need to call them. – Hans Passant
Inspired by another bug regarding a similar issue here, we found a workaround. The DLL seems to have a fixed load address. When I load the DLL using LoadLibrary() right at program start, this address is free and new VpnApiClass() works.
Table of ContentsIntroductionVersion HistoryPossible Future
UpdatesDocuments PurposeNAT Operation in ASA 8.3+ SectionsRule Types
Network Object NATTwice NAT / Manual NATRule Types used per SectionNAT
Types used with Twice NAT / Manual NAT and Network Obje...
Table of Contents Introduction:This document describes details on how
NAT-T works. Background: ESP encrypts all critical information,
encapsulating the entire inner TCP/UDP datagram within an ESP header.
ESP is an IP protocol in the same sense that TCP an...