[Mono-list] Marshal.Release not implemented error

David Abrames abramesd at kmbs.konicaminolta.us
Fri Jan 12 16:56:39 EST 2007


I am porting some .NET 2.0 code over to mono compiling with gmcs.
Here is the code snippet:

     IntPtr pszDest = Serializer.CreateStringPtr(cPortBuffer);
     int ret = DllCaller.EnumPorts2(hwkbsys, flCtrl, pszDest, cPortBuffer);
     string sOut = Serializer.GetPtrString(pszDest);
     string[] strRet = sOut.Split('|');

My problem is the Marshal.Release(pszDest) call produces a runtime error of:

Unhandled Exception: System.NotImplementedException: The requested feature
is not implemented.
in <0x0001d> System.Runtime.InteropServices.Marshal:Release (IntPtr pUnk)
in <0x000a5> MyAPI.MyFoo ()

Is there another way to release the pointer 'pszDest' instead of using

Thank you
David Abrames

More information about the Mono-list mailing list