[DllImport("*.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi, EntryPoint = "#100")]
public static extern string GetFldStr(int Num, [MarshalAs(UnmanagedType.LPStr)] string Field);
Сама функция описана в файле во вложении
Вызов функции приводит к ошибке:
FatalExecutionEngineError:
The runtime has encountered a fatal error. The address of the error was at 0x6f4293ba, on thread 0x22f0. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
Что не так и куда копать подскажите плз?