If the IntPtr result
parameter is to receive the value from within the function, it must be marked ref.
I don't see ptrs[1]
being assigned any value before passing.
Try changing the definition to:
[DllImport("Padeg.dll", EntryPoint = "GetNominativePadeg")]
private static extern Int32 decGetNominativePadeg(IntPtr surnameNamePatronimic,
**ref** IntPtr result, ref Int32 resultLength);
The reason probably is that it's trying to write to "result" which is marked as input-only.
MasterGaurav
2010-05-18 06:26:33