The string here is a char* in shared memory. C# assumes all memory returned to it was allocated by AllocHGlobal when doing default marshalling, so this crashes. It must have worked on earlier .net simply on accident.
Also the UsePostHSChanges can't be called until crypt is fully initialized. It's already called later on, so just delete the place where it is used too early.
The string here is a char* in shared memory. C# assumes all memory returned to it was allocated by AllocHGlobal when doing default marshalling, so this crashes. It must have worked on earlier .net simply on accident.
Also the UsePostHSChanges can't be called until crypt is fully initialized. It's already called later on, so just delete the place where it is used too early.