Mike,

Thanks! That fixed it and of course explains the Assertion I got. At the
end, it didn't have anything to do with memset - just me looking at the
wrong part of my code!

Frederik.

Mike Welham schreef:
> Hi Frederik
>
>>     public struct TidyBuffer
>
> ...
>
>>         [DllImport("libtidy")]
>>         public static extern int tidySetErrorBuffer(IntPtr tdoc,
>> TidyBuffer errbuf);
>
> ...
>
>> int TIDY_CALL tidySetErrorBuffer(TidyDoc tdoc, TidyBuffer * errbuf)
>
> It seems to me you P/Invoke signature is wrong - the managed version
> is passing the struct by value, the native code expects a pointer.
>
> Perhaps changing the second parameter of the P/Invoke signature to
> "ref TidyBuffer errbuf" may fix it.
>
> Regards
>
> Mike

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to