[Mono-list] Passing structures to pinvoke (or: mono bug)

Pablo Baena pbaena@uol.com.ar
01 Apr 2003 20:38:36 +0000


--=-wJQlag08f7DEBInmlnSq
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

This is now bug # 40645 on bugzilla. I got around this by making the
modify parameter an IntPtr, and then marshaling it to the test_struct
class. 

I don't know if this is a feature or a bug, it isn't documented anywhere
what's the correct way to pass out objects to pinvoke.


On Tue, 2003-04-01 at 05:24, Pablo Baena wrote:

> Finally, I can pass a class to pinvoke as an 'out' parameter. Attached
> are the samples that runs on .NET, but still won't run on mono.
> 
> Cheers!

-- 
Pablo Baena <pbaena@uol.com.ar>

--=-wJQlag08f7DEBInmlnSq
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/1.1.7">
</HEAD>
<BODY>
This is now bug # 40645 on bugzilla. I got around this by making the modify parameter an IntPtr, and then marshaling it to the test_struct class. <BR>
<BR>
I don't know if this is a feature or a bug, it isn't documented anywhere what's the correct way to pass out objects to pinvoke.<BR>
<BR>
<BR>
On Tue, 2003-04-01 at 05:24, Pablo Baena wrote:
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#737373" SIZE="3"><I>Finally, I can pass a class to pinvoke as an 'out' parameter. Attached are the samples that runs on .NET, but still won't run on mono.<BR>
    <BR>
    Cheers!</I></FONT>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Pablo Baena &lt;<A HREF="mailto:pbaena@uol.com.ar">pbaena@uol.com.ar</A>&gt;
</TD>
</TR>
</TABLE>

</BODY>
</HTML>

--=-wJQlag08f7DEBInmlnSq--