Tak se s váma podělímo o zkušenost..
Jak jsem psal níže, fce z managed do native exportuju takhle..
l.InstanceManagerInit = Marshal.GetFunctionPointerForDelegate<ExportList._dInstanceManagerInit>(ManagedInstanceManager.InstanceManagerInit);
Funguje. Pokud v nějaký c# fci zavolam GC.Collect(10, GCCollectionMode.Forced, true); tak příští managovanej call naprosto kouzelně selže..
Pokud alokaci předělám na
testdel = new ExportList._dInstanceManagerInit(ManagedInstanceManager.InstanceManagerInit);
l.InstanceManagerInit = Marshal.GetFunctionPointerForDelegate(testdel);
tak to začne fungovat.. Kouzelný.
