Re: [Mono-list] screen capturing in mono

2007-02-28 Thread Scott Willeke
In theory you could use reflection to call the protected Control.OnPaint 
method to trick it into painting on your bitmap's graphics, but it is 
obviously a hack, and may have security implications (will almost 
certainly require full trust, especially on MS.NET).

Sebastien Pouliot wrote:
> On Wed, 2007-02-28 at 15:34 -0500, Abe Gillespie wrote:
>   
>> Have you tried the DrawToBitmap method?
>> 
>
> Nice one, but 2.0 and not yet implemented in Mono.
>
>   
>> -Abe
>>
>> On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
>> 
>>> The problem isn't resizing - I don't have an original bitmap to resize.  The
>>> problem is that I have a control that I want a screenshot of.  So, I'm
>>> trying to create a Bitmap from whatever is appearing in the control.
>>>
>>> I pass the control in, then I call control.CreateGraphics();
>>> System.Drawing.Graphics g1 = c.CreateGraphics();
>>>
>>> Then, with the resulting graphics object, I try to create a new bitmap.
>>> Bitmap MyImage = new Bitmap(w, h, g1);
>>>
>>> The thing is, this bitmap is blank, unless I paste back in that BitBlt code.
>>>  I can't figure out how to get a new bitmap from a graphics object, without
>>> BitBlt().
>>>
>>> Sebastien - Using 2.0 isn't an option, unfortunately.
>>>
>>> Is there any alternative from P/Invoking in this case?
>>>
>>> Thanks for all the help!
>>>
>>> Eric
>>>
>>>
>>> On 2/28/07, Abe Gillespie < [EMAIL PROTECTED]> wrote:
>>>   
 It looks like you're just taking the image and resizing it to show in
 the dialog.  You really should not have to go into native OS libraries
 to do so.  Does this site help?

 http://www.peterprovost.org/archive/2003/05/29/516.aspx

 -Abe

 On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
 
> I'm not too sure how to get a Bitmap object from a graphics object.
>   
>>> From
>>>   
> all I've read, I just hear that you have to deal with device contexts.
>   
>>> I'm
>>>   
> not too familiar with it, but BitBlt seems to be the way to do that.
>   
>>> What
>>>   
> would I need to do to get that bitmap created with what appears in the
> control using 100% .NET so it can run in mono?  Here's a snippet of
>   
>>> code.
>>>   
>
>   
>>> [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]
>>>   
> private static extern bool BitBlt(
> IntPtr hdcDest, // handle to destination DC
> int nXDest,  // x-coord of destination upper-left corner
> int nYDest,  // y-coord of destination upper-left corner
> int nWidth,  // width of destination rectangle
> int nHeight, // height of destination rectangle
> IntPtr hdcSrc,  // handle to source DC
> int nXSrc,   // x-coordinate of source upper-left corner
> int nYSrc,   // y-coordinate of source upper-left corner
> System.Int32 dwRop  // raster operation code
> );
>
>
> public static Bitmap PerformCapture(Control c, int maxWidth, int
> maxHeight)
> {
> try
> {
> int w = c.ClientRectangle.Width;
> int h = c.ClientRectangle.Height;
>
> w = System.Math.Min(w, maxWidth);
> h = System.Math.Min(w, maxHeight);
>
> System.Drawing.Graphics g1 =
> c.CreateGraphics();//this.CreateGraphics();
> Bitmap MyImage = new Bitmap(w, h, g1);
> System.Drawing.Graphics g2 =
> System.Drawing.Graphics.FromImage (MyImage);
> IntPtr dc1 = g1.GetHdc();
> IntPtr dc2 = g2.GetHdc();
> BitBlt(dc2, 0, 0, w, h, dc1, 0, 0, 13369376);
> g1.ReleaseHdc(dc1);
> g2.ReleaseHdc(dc2);
>
> //Separate dialog to display the image.  If I comment out the BitBlt
>   
>>> code,
>>>   
> it just appears blank.
>
>   
>>> Library.Windows.Dialogs.ScreenCaptureDlg
>>>   
> dlg = new
> Library.Windows.Dialogs.ScreenCaptureDlg(MyImage);
> dlg.ShowDialog();
>
> return MyImage;
> }
> catch(Exception error)
> {
> //our exception handling library.
> Library.Common.ErrMsg.Err( error );
> throw error;
>
> }
> }
>
>
>
> On 2/28/07, Abe Gillespie <[EMAIL PROTECTED]> wrote:
>   
>> Are you P/Invoking for performance?  Why not just use the GDI .Net
>> 
>>> API?
>>>   
>> -Abe
>>
>> On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
>> 
>>> Hi all,
>>>
>>> Is there a g

Re: [Mono-list] screen capturing in mono

2007-02-28 Thread Abe Gillespie
Well there's obviously some way to draw the control ... otherwise it
wouldn't show up normally.  Heh.  :)

Perhaps just dig into the Mono code, find how the control renders
itself, and expose that through the DrawToBitmap method.  You
certainly wouldn't have to implement this for every known control ...
just the specific one you're using.  Implementing more, of course,
wouldn't cause anyone to complain.

Of course that is .Net 2.0 as Sebastien points out and you've stated
that isn't an option.

-Abe

On 2/28/07, Sebastien Pouliot <[EMAIL PROTECTED]> wrote:
> On Wed, 2007-02-28 at 15:34 -0500, Abe Gillespie wrote:
> > Have you tried the DrawToBitmap method?
>
> Nice one, but 2.0 and not yet implemented in Mono.
>
> > -Abe
> >
> > On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> > > The problem isn't resizing - I don't have an original bitmap to resize.  
> > > The
> > > problem is that I have a control that I want a screenshot of.  So, I'm
> > > trying to create a Bitmap from whatever is appearing in the control.
> > >
> > > I pass the control in, then I call control.CreateGraphics();
> > > System.Drawing.Graphics g1 = c.CreateGraphics();
> > >
> > > Then, with the resulting graphics object, I try to create a new bitmap.
> > > Bitmap MyImage = new Bitmap(w, h, g1);
> > >
> > > The thing is, this bitmap is blank, unless I paste back in that BitBlt 
> > > code.
> > >  I can't figure out how to get a new bitmap from a graphics object, 
> > > without
> > > BitBlt().
> > >
> > > Sebastien - Using 2.0 isn't an option, unfortunately.
> > >
> > > Is there any alternative from P/Invoking in this case?
> > >
> > > Thanks for all the help!
> > >
> > > Eric
> > >
> > >
> > > On 2/28/07, Abe Gillespie < [EMAIL PROTECTED]> wrote:
> > > > It looks like you're just taking the image and resizing it to show in
> > > > the dialog.  You really should not have to go into native OS libraries
> > > > to do so.  Does this site help?
> > > >
> > > > http://www.peterprovost.org/archive/2003/05/29/516.aspx
> > > >
> > > > -Abe
> > > >
> > > > On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> > > > > I'm not too sure how to get a Bitmap object from a graphics object.
> > > From
> > > > > all I've read, I just hear that you have to deal with device contexts.
> > > I'm
> > > > > not too familiar with it, but BitBlt seems to be the way to do that.
> > > What
> > > > > would I need to do to get that bitmap created with what appears in the
> > > > > control using 100% .NET so it can run in mono?  Here's a snippet of
> > > code.
> > > > >
> > > > >
> > > > >
> > > [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]
> > > > > private static extern bool BitBlt(
> > > > > IntPtr hdcDest, // handle to destination DC
> > > > > int nXDest,  // x-coord of destination upper-left corner
> > > > > int nYDest,  // y-coord of destination upper-left corner
> > > > > int nWidth,  // width of destination rectangle
> > > > > int nHeight, // height of destination rectangle
> > > > > IntPtr hdcSrc,  // handle to source DC
> > > > > int nXSrc,   // x-coordinate of source upper-left corner
> > > > > int nYSrc,   // y-coordinate of source upper-left corner
> > > > > System.Int32 dwRop  // raster operation code
> > > > > );
> > > > >
> > > > >
> > > > > public static Bitmap PerformCapture(Control c, int maxWidth, 
> > > > > int
> > > > > maxHeight)
> > > > > {
> > > > > try
> > > > > {
> > > > > int w = c.ClientRectangle.Width;
> > > > > int h = c.ClientRectangle.Height;
> > > > >
> > > > > w = System.Math.Min(w, maxWidth);
> > > > > h = System.Math.Min(w, maxHeight);
> > > > >
> > > > > System.Drawing.Graphics g1 =
> > > > > c.CreateGraphics();//this.CreateGraphics();
> > > > > Bitmap MyImage = new Bitmap(w, h, g1);
> > > > > System.Drawing.Graphics g2 =
> > > > > System.Drawing.Graphics.FromImage (MyImage);
> > > > > IntPtr dc1 = g1.GetHdc();
> > > > > IntPtr dc2 = g2.GetHdc();
> > > > > BitBlt(dc2, 0, 0, w, h, dc1, 0, 0, 13369376);
> > > > > g1.ReleaseHdc(dc1);
> > > > > g2.ReleaseHdc(dc2);
> > > > >
> > > > > //Separate dialog to display the image.  If I comment out the BitBlt
> > > code,
> > > > > it just appears blank.
> > > > >
> > > Library.Windows.Dialogs.ScreenCaptureDlg
> > > > > dlg = new
> > > > > Library.Windows.Dialogs.ScreenCaptureDlg(MyImage);
> > > > > dlg.ShowDialog();
> > > > >
> > > > > return MyImage;
> > > > > }
> > > > > catch(Exception error)
> > > > > {
> > > > > //our exception handling library.
> > > > > Library.Common.ErrMsg.Err( error );
> > > > > throw error;
>

Re: [Mono-list] screen capturing in mono

2007-02-28 Thread Sebastien Pouliot
On Wed, 2007-02-28 at 15:34 -0500, Abe Gillespie wrote:
> Have you tried the DrawToBitmap method?

Nice one, but 2.0 and not yet implemented in Mono.

> -Abe
> 
> On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> > The problem isn't resizing - I don't have an original bitmap to resize.  The
> > problem is that I have a control that I want a screenshot of.  So, I'm
> > trying to create a Bitmap from whatever is appearing in the control.
> >
> > I pass the control in, then I call control.CreateGraphics();
> > System.Drawing.Graphics g1 = c.CreateGraphics();
> >
> > Then, with the resulting graphics object, I try to create a new bitmap.
> > Bitmap MyImage = new Bitmap(w, h, g1);
> >
> > The thing is, this bitmap is blank, unless I paste back in that BitBlt code.
> >  I can't figure out how to get a new bitmap from a graphics object, without
> > BitBlt().
> >
> > Sebastien - Using 2.0 isn't an option, unfortunately.
> >
> > Is there any alternative from P/Invoking in this case?
> >
> > Thanks for all the help!
> >
> > Eric
> >
> >
> > On 2/28/07, Abe Gillespie < [EMAIL PROTECTED]> wrote:
> > > It looks like you're just taking the image and resizing it to show in
> > > the dialog.  You really should not have to go into native OS libraries
> > > to do so.  Does this site help?
> > >
> > > http://www.peterprovost.org/archive/2003/05/29/516.aspx
> > >
> > > -Abe
> > >
> > > On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> > > > I'm not too sure how to get a Bitmap object from a graphics object.
> > From
> > > > all I've read, I just hear that you have to deal with device contexts.
> > I'm
> > > > not too familiar with it, but BitBlt seems to be the way to do that.
> > What
> > > > would I need to do to get that bitmap created with what appears in the
> > > > control using 100% .NET so it can run in mono?  Here's a snippet of
> > code.
> > > >
> > > >
> > > >
> > [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]
> > > > private static extern bool BitBlt(
> > > > IntPtr hdcDest, // handle to destination DC
> > > > int nXDest,  // x-coord of destination upper-left corner
> > > > int nYDest,  // y-coord of destination upper-left corner
> > > > int nWidth,  // width of destination rectangle
> > > > int nHeight, // height of destination rectangle
> > > > IntPtr hdcSrc,  // handle to source DC
> > > > int nXSrc,   // x-coordinate of source upper-left corner
> > > > int nYSrc,   // y-coordinate of source upper-left corner
> > > > System.Int32 dwRop  // raster operation code
> > > > );
> > > >
> > > >
> > > > public static Bitmap PerformCapture(Control c, int maxWidth, int
> > > > maxHeight)
> > > > {
> > > > try
> > > > {
> > > > int w = c.ClientRectangle.Width;
> > > > int h = c.ClientRectangle.Height;
> > > >
> > > > w = System.Math.Min(w, maxWidth);
> > > > h = System.Math.Min(w, maxHeight);
> > > >
> > > > System.Drawing.Graphics g1 =
> > > > c.CreateGraphics();//this.CreateGraphics();
> > > > Bitmap MyImage = new Bitmap(w, h, g1);
> > > > System.Drawing.Graphics g2 =
> > > > System.Drawing.Graphics.FromImage (MyImage);
> > > > IntPtr dc1 = g1.GetHdc();
> > > > IntPtr dc2 = g2.GetHdc();
> > > > BitBlt(dc2, 0, 0, w, h, dc1, 0, 0, 13369376);
> > > > g1.ReleaseHdc(dc1);
> > > > g2.ReleaseHdc(dc2);
> > > >
> > > > //Separate dialog to display the image.  If I comment out the BitBlt
> > code,
> > > > it just appears blank.
> > > >
> > Library.Windows.Dialogs.ScreenCaptureDlg
> > > > dlg = new
> > > > Library.Windows.Dialogs.ScreenCaptureDlg(MyImage);
> > > > dlg.ShowDialog();
> > > >
> > > > return MyImage;
> > > > }
> > > > catch(Exception error)
> > > > {
> > > > //our exception handling library.
> > > > Library.Common.ErrMsg.Err( error );
> > > > throw error;
> > > >
> > > > }
> > > > }
> > > >
> > > >
> > > >
> > > > On 2/28/07, Abe Gillespie <[EMAIL PROTECTED]> wrote:
> > > > > Are you P/Invoking for performance?  Why not just use the GDI .Net
> > API?
> > > > >
> > > > > -Abe
> > > > >
> > > > > On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> > > > > > Hi all,
> > > > > >
> > > > > > Is there a good way to capture screens or something similar in mono?
> >  In
> > > > our
> > > > > > .NET application, we have custom controls, and we basically create a
> > > > > > graphics object from it, make a new bitmap, then do a bitblt to get
> > it
> > > > into
> > > > > > the bitmap.  This requires a P/Invoke into gdi32.dll , which
> > obviously
> > > > blows
> > > > > > up in mono.  Is there a good way to do this using mono?  Some

Re: [Mono-list] screen capturing in mono

2007-02-28 Thread Sebastien Pouliot
Eric,

There's no alternative to p/invoke - even if you used 2.0 you would only
be calling a method hiding some platform specific p/invoke calls.

Now using 2.0 may not be an option for you, but that doesn't prevent you
from using CopyFromScreen. Why ? because it's open source :-)

Just create your own library using Mono source code for CopyFromScreen
(and the code it depends on) or include the source in your own project.

Sebastien

On Wed, 2007-02-28 at 13:27 -0700, Eric Morgan wrote:
> The problem isn't resizing - I don't have an original bitmap to
> resize.  The problem is that I have a control that I want a screenshot
> of.  So, I'm trying to create a Bitmap from whatever is appearing in
> the control. 
> 
> I pass the control in, then I call control.CreateGraphics();
> System.Drawing.Graphics g1 = c.CreateGraphics();
> 
> Then, with the resulting graphics object, I try to create a new
> bitmap.
> Bitmap MyImage = new Bitmap(w, h, g1); 
> 
> The thing is, this bitmap is blank, unless I paste back in that BitBlt
> code.  I can't figure out how to get a new bitmap from a graphics
> object, without BitBlt().
> 
> Sebastien - Using 2.0 isn't an option, unfortunately. 
> 
> Is there any alternative from P/Invoking in this case?
> 
> Thanks for all the help!
> 
> Eric
> 
> On 2/28/07, Abe Gillespie <[EMAIL PROTECTED]> wrote:
> It looks like you're just taking the image and resizing it to
> show in 
> the dialog.  You really should not have to go into native OS
> libraries
> to do so.  Does this site help?
> 
> http://www.peterprovost.org/archive/2003/05/29/516.aspx
> 
> -Abe
> 
> On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> > I'm not too sure how to get a Bitmap object from a graphics
> object.  From
> > all I've read, I just hear that you have to deal with device
> contexts.  I'm 
> > not too familiar with it, but BitBlt seems to be the way to
> do that.  What
> > would I need to do to get that bitmap created with what
> appears in the
> > control using 100% .NET so it can run in mono?  Here's a
> snippet of code. 
> >
> >
> >
> [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]
> > private static extern bool BitBlt(
> > IntPtr hdcDest, // handle to destination DC
> > int nXDest,  // x-coord of destination
> upper-left corner 
> > int nYDest,  // y-coord of destination
> upper-left corner
> > int nWidth,  // width of destination rectangle
> > int nHeight, // height of destination rectangle
> > IntPtr hdcSrc,  // handle to source DC 
> > int nXSrc,   // x-coordinate of source
> upper-left corner
> > int nYSrc,   // y-coordinate of source
> upper-left corner
> > System.Int32 dwRop  // raster operation code
> > );
> >
> >
> > public static Bitmap PerformCapture(Control c, int
> maxWidth, int
> > maxHeight)
> > {
> > try
> > {
> > int w = c.ClientRectangle.Width;
> > int h = c.ClientRectangle.Height;
> >
> > w = System.Math.Min(w, maxWidth);
> > h = System.Math.Min(w, maxHeight);
> >
> > System.Drawing.Graphics g1 =
> > c.CreateGraphics();//this.CreateGraphics();
> > Bitmap MyImage = new Bitmap(w, h, g1);
> > System.Drawing.Graphics g2 =
> > System.Drawing.Graphics.FromImage (MyImage);
> > IntPtr dc1 = g1.GetHdc();
> > IntPtr dc2 = g2.GetHdc();
> > BitBlt(dc2, 0, 0, w, h, dc1, 0, 0,
> 13369376);
> > g1.ReleaseHdc(dc1); 
> > g2.ReleaseHdc(dc2);
> >
> > //Separate dialog to display the image.  If I comment out
> the BitBlt code,
> > it just appears blank.
> > Library.Windows.Dialogs.ScreenCaptureDlg 
> > dlg = new
> > Library.Windows.Dialogs.ScreenCaptureDlg(MyImage);
> > dlg.ShowDialog();
> >
> > return MyImage;
> > }
> > catch(Exception error) 
> > {
> > //our exception handling library.
> > Library.Common.ErrMsg.Err( error );
> > throw error;
> >
> > }
> > }
> >
> >
> >
> > On 2/28/07, Abe Gillespie <[EMAIL PRO

Re: [Mono-list] screen capturing in mono

2007-02-28 Thread Abe Gillespie
Have you tried the DrawToBitmap method?

-Abe

On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> The problem isn't resizing - I don't have an original bitmap to resize.  The
> problem is that I have a control that I want a screenshot of.  So, I'm
> trying to create a Bitmap from whatever is appearing in the control.
>
> I pass the control in, then I call control.CreateGraphics();
> System.Drawing.Graphics g1 = c.CreateGraphics();
>
> Then, with the resulting graphics object, I try to create a new bitmap.
> Bitmap MyImage = new Bitmap(w, h, g1);
>
> The thing is, this bitmap is blank, unless I paste back in that BitBlt code.
>  I can't figure out how to get a new bitmap from a graphics object, without
> BitBlt().
>
> Sebastien - Using 2.0 isn't an option, unfortunately.
>
> Is there any alternative from P/Invoking in this case?
>
> Thanks for all the help!
>
> Eric
>
>
> On 2/28/07, Abe Gillespie < [EMAIL PROTECTED]> wrote:
> > It looks like you're just taking the image and resizing it to show in
> > the dialog.  You really should not have to go into native OS libraries
> > to do so.  Does this site help?
> >
> > http://www.peterprovost.org/archive/2003/05/29/516.aspx
> >
> > -Abe
> >
> > On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> > > I'm not too sure how to get a Bitmap object from a graphics object.
> From
> > > all I've read, I just hear that you have to deal with device contexts.
> I'm
> > > not too familiar with it, but BitBlt seems to be the way to do that.
> What
> > > would I need to do to get that bitmap created with what appears in the
> > > control using 100% .NET so it can run in mono?  Here's a snippet of
> code.
> > >
> > >
> > >
> [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]
> > > private static extern bool BitBlt(
> > > IntPtr hdcDest, // handle to destination DC
> > > int nXDest,  // x-coord of destination upper-left corner
> > > int nYDest,  // y-coord of destination upper-left corner
> > > int nWidth,  // width of destination rectangle
> > > int nHeight, // height of destination rectangle
> > > IntPtr hdcSrc,  // handle to source DC
> > > int nXSrc,   // x-coordinate of source upper-left corner
> > > int nYSrc,   // y-coordinate of source upper-left corner
> > > System.Int32 dwRop  // raster operation code
> > > );
> > >
> > >
> > > public static Bitmap PerformCapture(Control c, int maxWidth, int
> > > maxHeight)
> > > {
> > > try
> > > {
> > > int w = c.ClientRectangle.Width;
> > > int h = c.ClientRectangle.Height;
> > >
> > > w = System.Math.Min(w, maxWidth);
> > > h = System.Math.Min(w, maxHeight);
> > >
> > > System.Drawing.Graphics g1 =
> > > c.CreateGraphics();//this.CreateGraphics();
> > > Bitmap MyImage = new Bitmap(w, h, g1);
> > > System.Drawing.Graphics g2 =
> > > System.Drawing.Graphics.FromImage (MyImage);
> > > IntPtr dc1 = g1.GetHdc();
> > > IntPtr dc2 = g2.GetHdc();
> > > BitBlt(dc2, 0, 0, w, h, dc1, 0, 0, 13369376);
> > > g1.ReleaseHdc(dc1);
> > > g2.ReleaseHdc(dc2);
> > >
> > > //Separate dialog to display the image.  If I comment out the BitBlt
> code,
> > > it just appears blank.
> > >
> Library.Windows.Dialogs.ScreenCaptureDlg
> > > dlg = new
> > > Library.Windows.Dialogs.ScreenCaptureDlg(MyImage);
> > > dlg.ShowDialog();
> > >
> > > return MyImage;
> > > }
> > > catch(Exception error)
> > > {
> > > //our exception handling library.
> > > Library.Common.ErrMsg.Err( error );
> > > throw error;
> > >
> > > }
> > > }
> > >
> > >
> > >
> > > On 2/28/07, Abe Gillespie <[EMAIL PROTECTED]> wrote:
> > > > Are you P/Invoking for performance?  Why not just use the GDI .Net
> API?
> > > >
> > > > -Abe
> > > >
> > > > On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> > > > > Hi all,
> > > > >
> > > > > Is there a good way to capture screens or something similar in mono?
>  In
> > > our
> > > > > .NET application, we have custom controls, and we basically create a
> > > > > graphics object from it, make a new bitmap, then do a bitblt to get
> it
> > > into
> > > > > the bitmap.  This requires a P/Invoke into gdi32.dll , which
> obviously
> > > blows
> > > > > up in mono.  Is there a good way to do this using mono?  Some other
> > > library
> > > > > maybe?
> > > > >
> > > > > I've tried installing wine and using the gdi32.dll.so that comes
> with
> > > it,
> > > > > but I don't know if I'm using it correctly or not.  It can find the
> > > library,
> > > > > but it gives a SIGSEGV while trying to execute the bitblt operation.
> > > Seemed
> > > > > like kind of a hack, and I 

Re: [Mono-list] screen capturing in mono

2007-02-28 Thread Eric Morgan

The problem isn't resizing - I don't have an original bitmap to resize.  The
problem is that I have a control that I want a screenshot of.  So, I'm
trying to create a Bitmap from whatever is appearing in the control.

I pass the control in, then I call control.CreateGraphics();
System.Drawing.Graphics g1 = c.CreateGraphics();

Then, with the resulting graphics object, I try to create a new bitmap.
Bitmap MyImage = new Bitmap(w, h, g1);

The thing is, this bitmap is blank, unless I paste back in that BitBlt
code.  I can't figure out how to get a new bitmap from a graphics object,
without BitBlt().

Sebastien - Using 2.0 isn't an option, unfortunately.

Is there any alternative from P/Invoking in this case?

Thanks for all the help!

Eric

On 2/28/07, Abe Gillespie <[EMAIL PROTECTED]> wrote:


It looks like you're just taking the image and resizing it to show in
the dialog.  You really should not have to go into native OS libraries
to do so.  Does this site help?

http://www.peterprovost.org/archive/2003/05/29/516.aspx

-Abe

On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> I'm not too sure how to get a Bitmap object from a graphics
object.  From
> all I've read, I just hear that you have to deal with device
contexts.  I'm
> not too familiar with it, but BitBlt seems to be the way to do
that.  What
> would I need to do to get that bitmap created with what appears in the
> control using 100% .NET so it can run in mono?  Here's a snippet of
code.
>
>
> [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]
> private static extern bool BitBlt(
> IntPtr hdcDest, // handle to destination DC
> int nXDest,  // x-coord of destination upper-left corner
> int nYDest,  // y-coord of destination upper-left corner
> int nWidth,  // width of destination rectangle
> int nHeight, // height of destination rectangle
> IntPtr hdcSrc,  // handle to source DC
> int nXSrc,   // x-coordinate of source upper-left corner
> int nYSrc,   // y-coordinate of source upper-left corner
> System.Int32 dwRop  // raster operation code
> );
>
>
> public static Bitmap PerformCapture(Control c, int maxWidth, int
> maxHeight)
> {
> try
> {
> int w = c.ClientRectangle.Width;
> int h = c.ClientRectangle.Height;
>
> w = System.Math.Min(w, maxWidth);
> h = System.Math.Min(w, maxHeight);
>
> System.Drawing.Graphics g1 =
> c.CreateGraphics();//this.CreateGraphics();
> Bitmap MyImage = new Bitmap(w, h, g1);
> System.Drawing.Graphics g2 =
> System.Drawing.Graphics.FromImage(MyImage);
> IntPtr dc1 = g1.GetHdc();
> IntPtr dc2 = g2.GetHdc();
> BitBlt(dc2, 0, 0, w, h, dc1, 0, 0, 13369376);
> g1.ReleaseHdc(dc1);
> g2.ReleaseHdc(dc2);
>
> //Separate dialog to display the image.  If I comment out the BitBlt
code,
> it just appears blank.
> Library.Windows.Dialogs.ScreenCaptureDlg
> dlg = new
> Library.Windows.Dialogs.ScreenCaptureDlg(MyImage);
> dlg.ShowDialog();
>
> return MyImage;
> }
> catch(Exception error)
> {
> //our exception handling library.
> Library.Common.ErrMsg.Err( error );
> throw error;
>
> }
> }
>
>
>
> On 2/28/07, Abe Gillespie <[EMAIL PROTECTED]> wrote:
> > Are you P/Invoking for performance?  Why not just use the GDI .Net
API?
> >
> > -Abe
> >
> > On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> > > Hi all,
> > >
> > > Is there a good way to capture screens or something similar in
mono?  In
> our
> > > .NET application, we have custom controls, and we basically create a
> > > graphics object from it, make a new bitmap, then do a bitblt to get
it
> into
> > > the bitmap.  This requires a P/Invoke into gdi32.dll , which
obviously
> blows
> > > up in mono.  Is there a good way to do this using mono?  Some other
> library
> > > maybe?
> > >
> > > I've tried installing wine and using the gdi32.dll.so that comes
with
> it,
> > > but I don't know if I'm using it correctly or not.  It can find the
> library,
> > > but it gives a SIGSEGV while trying to execute the bitblt operation.
> Seemed
> > > like kind of a hack, and I didn't really expect it to work...  Do I
need
> > > other libraries along with the gdi32.dll.so ?
> > >
> > > Any advice is appreciated.  Thanks.
> > >
> > > Eric Morgan
> > > Renegade Geophysics
> > > 303-661-0400, x2
> > >
> > > ___
> > > Mono-list maillist  -  Mono-list@lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/mono-list
> > >
> > >
> >
> >
>
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://list

Re: [Mono-list] screen capturing in mono

2007-02-28 Thread Sebastien Pouliot
Hello Eric,

On Wed, 2007-02-28 at 11:45 -0700, Eric Morgan wrote:
> Hi all,
> 
> Is there a good way to capture screens or something similar in mono? 

When using the 2.0 profile you can use the CopyFromScreen method from
System.Drawing.Graphics.

>  In our .NET application, we have custom controls, and we basically
> create a graphics object from it, make a new bitmap, then do a bitblt
> to get it into the bitmap.  This requires a P/Invoke into gdi32.dll,
> which obviously blows up in mono.  Is there a good way to do this
> using mono?  Some other library maybe?
> 
> I've tried installing wine and using the gdi32.dll.so that comes with
> it, but I don't know if I'm using it correctly or not.  It can find
> the library, but it gives a SIGSEGV while trying to execute the bitblt
> operation.  Seemed like kind of a hack, 

It is.

> and I didn't really expect it to work... 

me neither ;-)

>  Do I need other libraries along with the gdi32.dll.so ?
> 
> Any advice is appreciated.  Thanks.
> 
> Eric Morgan
> Renegade Geophysics
> 303-661-0400, x2
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-- 
Sebastien Pouliot  <[EMAIL PROTECTED]>
Blog: http://pages.infinit.net/ctech/

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] screen capturing in mono

2007-02-28 Thread Abe Gillespie
It looks like you're just taking the image and resizing it to show in
the dialog.  You really should not have to go into native OS libraries
to do so.  Does this site help?

http://www.peterprovost.org/archive/2003/05/29/516.aspx

-Abe

On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> I'm not too sure how to get a Bitmap object from a graphics object.  From
> all I've read, I just hear that you have to deal with device contexts.  I'm
> not too familiar with it, but BitBlt seems to be the way to do that.  What
> would I need to do to get that bitmap created with what appears in the
> control using 100% .NET so it can run in mono?  Here's a snippet of code.
>
>
> [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]
> private static extern bool BitBlt(
> IntPtr hdcDest, // handle to destination DC
> int nXDest,  // x-coord of destination upper-left corner
> int nYDest,  // y-coord of destination upper-left corner
> int nWidth,  // width of destination rectangle
> int nHeight, // height of destination rectangle
> IntPtr hdcSrc,  // handle to source DC
> int nXSrc,   // x-coordinate of source upper-left corner
> int nYSrc,   // y-coordinate of source upper-left corner
> System.Int32 dwRop  // raster operation code
> );
>
>
> public static Bitmap PerformCapture(Control c, int maxWidth, int
> maxHeight)
> {
> try
> {
> int w = c.ClientRectangle.Width;
> int h = c.ClientRectangle.Height;
>
> w = System.Math.Min(w, maxWidth);
> h = System.Math.Min(w, maxHeight);
>
> System.Drawing.Graphics g1 =
> c.CreateGraphics();//this.CreateGraphics();
> Bitmap MyImage = new Bitmap(w, h, g1);
> System.Drawing.Graphics g2 =
> System.Drawing.Graphics.FromImage(MyImage);
> IntPtr dc1 = g1.GetHdc();
> IntPtr dc2 = g2.GetHdc();
> BitBlt(dc2, 0, 0, w, h, dc1, 0, 0, 13369376);
> g1.ReleaseHdc(dc1);
> g2.ReleaseHdc(dc2);
>
> //Separate dialog to display the image.  If I comment out the BitBlt code,
> it just appears blank.
> Library.Windows.Dialogs.ScreenCaptureDlg
> dlg = new
> Library.Windows.Dialogs.ScreenCaptureDlg(MyImage);
> dlg.ShowDialog();
>
> return MyImage;
> }
> catch(Exception error)
> {
> //our exception handling library.
> Library.Common.ErrMsg.Err( error );
> throw error;
>
> }
> }
>
>
>
> On 2/28/07, Abe Gillespie <[EMAIL PROTECTED]> wrote:
> > Are you P/Invoking for performance?  Why not just use the GDI .Net API?
> >
> > -Abe
> >
> > On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> > > Hi all,
> > >
> > > Is there a good way to capture screens or something similar in mono?  In
> our
> > > .NET application, we have custom controls, and we basically create a
> > > graphics object from it, make a new bitmap, then do a bitblt to get it
> into
> > > the bitmap.  This requires a P/Invoke into gdi32.dll , which obviously
> blows
> > > up in mono.  Is there a good way to do this using mono?  Some other
> library
> > > maybe?
> > >
> > > I've tried installing wine and using the gdi32.dll.so that comes with
> it,
> > > but I don't know if I'm using it correctly or not.  It can find the
> library,
> > > but it gives a SIGSEGV while trying to execute the bitblt operation.
> Seemed
> > > like kind of a hack, and I didn't really expect it to work...  Do I need
> > > other libraries along with the gdi32.dll.so ?
> > >
> > > Any advice is appreciated.  Thanks.
> > >
> > > Eric Morgan
> > > Renegade Geophysics
> > > 303-661-0400, x2
> > >
> > > ___
> > > Mono-list maillist  -  Mono-list@lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/mono-list
> > >
> > >
> >
> >
>
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] screen capturing in mono

2007-02-28 Thread Eric Morgan

I'm not too sure how to get a Bitmap object from a graphics object.  From
all I've read, I just hear that you have to deal with device contexts.  I'm
not too familiar with it, but BitBlt seems to be the way to do that.  What
would I need to do to get that bitmap created with what appears in the
control using 100% .NET so it can run in mono?  Here's a snippet of code.

   [System.Runtime.InteropServices.DllImportAttribute("gdi32.dll")]
   private static extern bool BitBlt(
   IntPtr hdcDest, // handle to destination DC
   int nXDest,  // x-coord of destination upper-left corner
   int nYDest,  // y-coord of destination upper-left corner
   int nWidth,  // width of destination rectangle
   int nHeight, // height of destination rectangle
   IntPtr hdcSrc,  // handle to source DC
   int nXSrc,   // x-coordinate of source upper-left corner
   int nYSrc,   // y-coordinate of source upper-left corner
   System.Int32 dwRop  // raster operation code
   );


   public static Bitmap PerformCapture(Control c, int maxWidth, int
maxHeight)
   {
   try
   {
   int w = c.ClientRectangle.Width;
   int h = c.ClientRectangle.Height;

   w = System.Math.Min(w, maxWidth);
   h = System.Math.Min(w, maxHeight);

   System.Drawing.Graphics g1 = c.CreateGraphics
();//this.CreateGraphics();
   Bitmap MyImage = new Bitmap(w, h, g1);
   System.Drawing.Graphics g2 =
System.Drawing.Graphics.FromImage(MyImage);
   IntPtr dc1 = g1.GetHdc();
   IntPtr dc2 = g2.GetHdc();
   BitBlt(dc2, 0, 0, w, h, dc1, 0, 0, 13369376);
   g1.ReleaseHdc(dc1);
   g2.ReleaseHdc(dc2);

//Separate dialog to display the image.  If I comment out the BitBlt code,
it just appears blank.
   Library.Windows.Dialogs.ScreenCaptureDlg dlg = new
Library.Windows.Dialogs.ScreenCaptureDlg(MyImage);
   dlg.ShowDialog();

   return MyImage;
   }
   catch(Exception error)
   {
//our exception handling library.
   Library.Common.ErrMsg.Err( error );
   throw error;
   }
   }



On 2/28/07, Abe Gillespie <[EMAIL PROTECTED]> wrote:


Are you P/Invoking for performance?  Why not just use the GDI .Net API?

-Abe

On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Is there a good way to capture screens or something similar in mono?  In
our
> .NET application, we have custom controls, and we basically create a
> graphics object from it, make a new bitmap, then do a bitblt to get it
into
> the bitmap.  This requires a P/Invoke into gdi32.dll, which obviously
blows
> up in mono.  Is there a good way to do this using mono?  Some other
library
> maybe?
>
> I've tried installing wine and using the gdi32.dll.so that comes with
it,
> but I don't know if I'm using it correctly or not.  It can find the
library,
> but it gives a SIGSEGV while trying to execute the bitblt
operation.  Seemed
> like kind of a hack, and I didn't really expect it to work...  Do I need
> other libraries along with the gdi32.dll.so ?
>
> Any advice is appreciated.  Thanks.
>
> Eric Morgan
> Renegade Geophysics
> 303-661-0400, x2
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] screen capturing in mono

2007-02-28 Thread Abe Gillespie
Are you P/Invoking for performance?  Why not just use the GDI .Net API?

-Abe

On 2/28/07, Eric Morgan <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Is there a good way to capture screens or something similar in mono?  In our
> .NET application, we have custom controls, and we basically create a
> graphics object from it, make a new bitmap, then do a bitblt to get it into
> the bitmap.  This requires a P/Invoke into gdi32.dll, which obviously blows
> up in mono.  Is there a good way to do this using mono?  Some other library
> maybe?
>
> I've tried installing wine and using the gdi32.dll.so that comes with it,
> but I don't know if I'm using it correctly or not.  It can find the library,
> but it gives a SIGSEGV while trying to execute the bitblt operation.  Seemed
> like kind of a hack, and I didn't really expect it to work...  Do I need
> other libraries along with the gdi32.dll.so ?
>
> Any advice is appreciated.  Thanks.
>
> Eric Morgan
> Renegade Geophysics
> 303-661-0400, x2
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] screen capturing in mono

2007-02-28 Thread Eric Morgan

Hi all,

Is there a good way to capture screens or something similar in mono?  In our
.NET application, we have custom controls, and we basically create a
graphics object from it, make a new bitmap, then do a bitblt to get it into
the bitmap.  This requires a P/Invoke into gdi32.dll, which obviously blows
up in mono.  Is there a good way to do this using mono?  Some other library
maybe?

I've tried installing wine and using the gdi32.dll.so that comes with it,
but I don't know if I'm using it correctly or not.  It can find the library,
but it gives a SIGSEGV while trying to execute the bitblt operation.  Seemed
like kind of a hack, and I didn't really expect it to work...  Do I need
other libraries along with the gdi32.dll.so ?

Any advice is appreciated.  Thanks.

Eric Morgan
Renegade Geophysics
303-661-0400, x2
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] What should I do with MONO247.com - two other domains

2007-02-28 Thread C. Bergström
Joshua Tauberer wrote:
> Nick Berardi wrote:
>   
>> I have a domain name, MONO247.com, as in Mono 24/7 (24 hours 7 days a
>> week).  I have had this domain sitting around for a long time and was
>> wondering if there was any interest turning this in to a community site
>> or some sorts to help support all the Mono developers that live and
>> breath this project on a daily basis.
>> 
>
> I also have some domains that I thought I might do something with but
> never really did:
>
>   monolibs.com
>   dotnetlibs.com
>
> I had hoped to create a decentrally managed index of Mono/.NET libraries.
>   
I guess I'll join in..

dotmono.com

Was going to offer community site, mono based hosting, mono projects 
hosting, forums and other bits.  We had/have website, logo, forums and 
patches to allow a more secure mod_mono for vhosting.  Never felt 
comfortable with the stability or security.  Our focus is changing and I 
highly doubt we'll ever use it if anyone is interested.

Cheers,

C.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] What should I do with MONO247.com - two other domains

2007-02-28 Thread Joshua Tauberer
Nick Berardi wrote:
> I have a domain name, MONO247.com, as in Mono 24/7 (24 hours 7 days a
> week).  I have had this domain sitting around for a long time and was
> wondering if there was any interest turning this in to a community site
> or some sorts to help support all the Mono developers that live and
> breath this project on a daily basis.

I also have some domains that I thought I might do something with but
never really did:

  monolibs.com
  dotnetlibs.com

I had hoped to create a decentrally managed index of Mono/.NET libraries.

If anyone has any use for them, drop me an email.

- Josh
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Fwd: What should I do with MONO247.com

2007-02-28 Thread Abe Gillespie
You missed the list.  Original message below.

-Abe

-- Forwarded message --
From: Nick Berardi <[EMAIL PROTECTED]>
Date: Feb 28, 2007 12:07 PM
Subject: Re: [Mono-list] What should I do with MONO247.com
To: Abe Gillespie <[EMAIL PROTECTED]>


Well if anybody is interested in doing anything with it, let me know.


On 2/28/07, Abe Gillespie <[EMAIL PROTECTED] > wrote:
> That's the one.  ;)
>
> -Abe
>
> On 2/28/07, Austin Winstanley < [EMAIL PROTECTED]> wrote:
> > I set one up recently at http://communityasp.net/mono
> >
> >
> >
> > On 2/28/07, Abe Gillespie < [EMAIL PROTECTED]> wrote:
> > > There was a very recent post (last two weeks maybe) of someone setting
> > > up yet-another-mono community site.  Check the archives; it seemed to
> > > have some decent potential.
> > >
> > > -Abe
> > >
> > > On 2/28/07, Nick Berardi <[EMAIL PROTECTED]> wrote:
> > > > I have heard of GotMono.  But what are some of the other ones?
> > > >
> > > >
> > > > On 2/28/07, Abe Gillespie <[EMAIL PROTECTED] > wrote:
> > > > > Redirect all to the most active?
> > > > >
> > > > > -Abe
> > > > >
> > > > > On 2/28/07, Adam Tauno Williams < [EMAIL PROTECTED]> wrote:
> > > > > > > Joseph Hill set up GotMono ( http://gotmono.net/) a while ago. I
> > know
> > > > > > > he's been busy lately, but he might know of someone who could take
> > > > > > > over this community site.
> > > > > > > While on the topic of domains, I have mono-host.com sitting around
> > if
> > > > > > > anyone knows of a good home for it.
> > > > > > > > I have a domain name, MONO247.com, as in Mono 24/7 (24 hours 7
> > days
> > > > a week).
> > > > > > > >  I have had this domain sitting around for a long time and was
> > > > wondering if
> > > > > > > > there was any interest turning this in to a community site or
> > some
> > > > sorts to
> > > > > > > > help support all the Mono developers that live and breath this
> > > > project on a
> > > > > > > > daily basis.
> > > > > >
> > > > > > Seems to me there are already several Mono community sites;  doesn't
> > > > > > seem to me to be much point in spreading out the community even
> > further
> > > > > > (most of the community sites aren't terribly active).  Just my two
> > > > > > cents.
> > > > > >
> > > > > > Nice domain name though.
> > > > > >
> > > > > > > > Please add your suggestions to this thread, I currently don't
> > have a
> > > > host
> > > > > > > > for the domain name, and it is a shame that it has been sitting
> > > > around for
> > > > > > > > 2+ years now with little to no work done on it from my side of
> > > > things.
> > > > > >
> > > > > >
> > > > > > ___
> > > > > > Mono-list maillist  -  Mono-list@lists.ximian.com
> > > > > > http://lists.ximian.com/mailman/listinfo/mono-list
> > > > > >
> > > > > >
> > > > > >
> > > > > ___
> > > > > Mono-list maillist  -   Mono-list@lists.ximian.com
> > > > > http://lists.ximian.com/mailman/listinfo/mono-list
> > > > >
> > > >
> > > >
> > > ___
> > > Mono-list maillist  -   Mono-list@lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/mono-list
> > >
> >
> >
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Problems resolving System.ComponentModel in monodevelop

2007-02-28 Thread Jack Lund
*Doh!*

Thanks! That fixed it.

-Jack

Lluis Sanchez wrote:
> You have to add a reference to the System assembly in your project
> (right click on the References folder and then select the System
> assembly in the first tab).
>
> El dt 27 de 02 del 2007 a les 22:35 -0600, en/na Jack Lund va escriure:
>   
>> Hi,
>>
>> My apologies if this question has been asked before. I'm trying to compile a 
>> Windows C# app in monodevelop on Fedora Core 5, and I keep getting the 
>> following errors:
>>
>> [Task:File=/home/jackl/workspace/gvelocity/gvelocity/trunk/gvelocity/applications/klein/HighLowQuoter/HighLowQuoter/HighLowForm.cs,
>>  Line=4, Column=1, Type=Error, Priority=Normal, Description=The type or 
>> namespace name `System.ComponentModel' could not be found. Are you missing a 
>> using directive or an assembly reference?(CS0246)]
>> [Task:File=/home/jackl/workspace/gvelocity/gvelocity/trunk/gvelocity/applications/klein/HighLowQuoter/HighLowQuoter/HighLowForm.cs,
>>  Line=4, Column=14, Type=Error, Priority=Normal, Description=The type or 
>> namespace name `ComponentModel' does not exist in the namespace `System'. 
>> Are you missing an assembly reference?(CS0234)]
>>
>> which is strange, since, from everything I can tell, the 
>> System.ComponentModel assembly is supposed to be in the main Systemassembly. 
>> I've installed all of the mono RPMs, and I'm running monodevelop 0.13 but I 
>> can't seem to get past this one error.
>>
>> Any help would be greatly appreciated.
>>
>> Thanks.
>>
>> -Jack Lund
>>
>> ___
>> Mono-list maillist  -  Mono-list@lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>> 
>
>
>   
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] What should I do with MONO247.com

2007-02-28 Thread Abe Gillespie
That's the one.  ;)

-Abe

On 2/28/07, Austin Winstanley <[EMAIL PROTECTED]> wrote:
> I set one up recently at http://communityasp.net/mono
>
>
>
> On 2/28/07, Abe Gillespie < [EMAIL PROTECTED]> wrote:
> > There was a very recent post (last two weeks maybe) of someone setting
> > up yet-another-mono community site.  Check the archives; it seemed to
> > have some decent potential.
> >
> > -Abe
> >
> > On 2/28/07, Nick Berardi <[EMAIL PROTECTED]> wrote:
> > > I have heard of GotMono.  But what are some of the other ones?
> > >
> > >
> > > On 2/28/07, Abe Gillespie <[EMAIL PROTECTED] > wrote:
> > > > Redirect all to the most active?
> > > >
> > > > -Abe
> > > >
> > > > On 2/28/07, Adam Tauno Williams < [EMAIL PROTECTED]> wrote:
> > > > > > Joseph Hill set up GotMono ( http://gotmono.net/) a while ago. I
> know
> > > > > > he's been busy lately, but he might know of someone who could take
> > > > > > over this community site.
> > > > > > While on the topic of domains, I have mono-host.com sitting around
> if
> > > > > > anyone knows of a good home for it.
> > > > > > > I have a domain name, MONO247.com, as in Mono 24/7 (24 hours 7
> days
> > > a week).
> > > > > > >  I have had this domain sitting around for a long time and was
> > > wondering if
> > > > > > > there was any interest turning this in to a community site or
> some
> > > sorts to
> > > > > > > help support all the Mono developers that live and breath this
> > > project on a
> > > > > > > daily basis.
> > > > >
> > > > > Seems to me there are already several Mono community sites;  doesn't
> > > > > seem to me to be much point in spreading out the community even
> further
> > > > > (most of the community sites aren't terribly active).  Just my two
> > > > > cents.
> > > > >
> > > > > Nice domain name though.
> > > > >
> > > > > > > Please add your suggestions to this thread, I currently don't
> have a
> > > host
> > > > > > > for the domain name, and it is a shame that it has been sitting
> > > around for
> > > > > > > 2+ years now with little to no work done on it from my side of
> > > things.
> > > > >
> > > > >
> > > > > ___
> > > > > Mono-list maillist  -  Mono-list@lists.ximian.com
> > > > > http://lists.ximian.com/mailman/listinfo/mono-list
> > > > >
> > > > >
> > > > >
> > > > ___
> > > > Mono-list maillist  -  Mono-list@lists.ximian.com
> > > > http://lists.ximian.com/mailman/listinfo/mono-list
> > > >
> > >
> > >
> > ___
> > Mono-list maillist  -   Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> >
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] What should I do with MONO247.com

2007-02-28 Thread Austin Winstanley

I set one up recently at http://communityasp.net/mono


On 2/28/07, Abe Gillespie <[EMAIL PROTECTED]> wrote:


There was a very recent post (last two weeks maybe) of someone setting
up yet-another-mono community site.  Check the archives; it seemed to
have some decent potential.

-Abe

On 2/28/07, Nick Berardi <[EMAIL PROTECTED]> wrote:
> I have heard of GotMono.  But what are some of the other ones?
>
>
> On 2/28/07, Abe Gillespie <[EMAIL PROTECTED] > wrote:
> > Redirect all to the most active?
> >
> > -Abe
> >
> > On 2/28/07, Adam Tauno Williams < [EMAIL PROTECTED]> wrote:
> > > > Joseph Hill set up GotMono (http://gotmono.net/) a while ago. I
know
> > > > he's been busy lately, but he might know of someone who could take
> > > > over this community site.
> > > > While on the topic of domains, I have mono-host.com sitting around
if
> > > > anyone knows of a good home for it.
> > > > > I have a domain name, MONO247.com, as in Mono 24/7 (24 hours 7
days
> a week).
> > > > >  I have had this domain sitting around for a long time and was
> wondering if
> > > > > there was any interest turning this in to a community site or
some
> sorts to
> > > > > help support all the Mono developers that live and breath this
> project on a
> > > > > daily basis.
> > >
> > > Seems to me there are already several Mono community sites;  doesn't
> > > seem to me to be much point in spreading out the community even
further
> > > (most of the community sites aren't terribly active).  Just my two
> > > cents.
> > >
> > > Nice domain name though.
> > >
> > > > > Please add your suggestions to this thread, I currently don't
have a
> host
> > > > > for the domain name, and it is a shame that it has been sitting
> around for
> > > > > 2+ years now with little to no work done on it from my side of
> things.
> > >
> > >
> > > ___
> > > Mono-list maillist  -  Mono-list@lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/mono-list
> > >
> > >
> > >
> > ___
> > Mono-list maillist  -  Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> >
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] What should I do with MONO247.com

2007-02-28 Thread Abe Gillespie
There was a very recent post (last two weeks maybe) of someone setting
up yet-another-mono community site.  Check the archives; it seemed to
have some decent potential.

-Abe

On 2/28/07, Nick Berardi <[EMAIL PROTECTED]> wrote:
> I have heard of GotMono.  But what are some of the other ones?
>
>
> On 2/28/07, Abe Gillespie <[EMAIL PROTECTED] > wrote:
> > Redirect all to the most active?
> >
> > -Abe
> >
> > On 2/28/07, Adam Tauno Williams < [EMAIL PROTECTED]> wrote:
> > > > Joseph Hill set up GotMono (http://gotmono.net/) a while ago. I know
> > > > he's been busy lately, but he might know of someone who could take
> > > > over this community site.
> > > > While on the topic of domains, I have mono-host.com sitting around if
> > > > anyone knows of a good home for it.
> > > > > I have a domain name, MONO247.com, as in Mono 24/7 (24 hours 7 days
> a week).
> > > > >  I have had this domain sitting around for a long time and was
> wondering if
> > > > > there was any interest turning this in to a community site or some
> sorts to
> > > > > help support all the Mono developers that live and breath this
> project on a
> > > > > daily basis.
> > >
> > > Seems to me there are already several Mono community sites;  doesn't
> > > seem to me to be much point in spreading out the community even further
> > > (most of the community sites aren't terribly active).  Just my two
> > > cents.
> > >
> > > Nice domain name though.
> > >
> > > > > Please add your suggestions to this thread, I currently don't have a
> host
> > > > > for the domain name, and it is a shame that it has been sitting
> around for
> > > > > 2+ years now with little to no work done on it from my side of
> things.
> > >
> > >
> > > ___
> > > Mono-list maillist  -  Mono-list@lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/mono-list
> > >
> > >
> > >
> > ___
> > Mono-list maillist  -  Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> >
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] What should I do with MONO247.com

2007-02-28 Thread Abe Gillespie
Redirect all to the most active?

-Abe

On 2/28/07, Adam Tauno Williams <[EMAIL PROTECTED]> wrote:
> > Joseph Hill set up GotMono (http://gotmono.net/) a while ago. I know
> > he's been busy lately, but he might know of someone who could take
> > over this community site.
> > While on the topic of domains, I have mono-host.com sitting around if
> > anyone knows of a good home for it.
> > > I have a domain name, MONO247.com, as in Mono 24/7 (24 hours 7 days a 
> > > week).
> > >  I have had this domain sitting around for a long time and was wondering 
> > > if
> > > there was any interest turning this in to a community site or some sorts 
> > > to
> > > help support all the Mono developers that live and breath this project on 
> > > a
> > > daily basis.
>
> Seems to me there are already several Mono community sites;  doesn't
> seem to me to be much point in spreading out the community even further
> (most of the community sites aren't terribly active).  Just my two
> cents.
>
> Nice domain name though.
>
> > > Please add your suggestions to this thread, I currently don't have a host
> > > for the domain name, and it is a shame that it has been sitting around for
> > > 2+ years now with little to no work done on it from my side of things.
>
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] What should I do with MONO247.com

2007-02-28 Thread Adam Tauno Williams
> Joseph Hill set up GotMono (http://gotmono.net/) a while ago. I know
> he's been busy lately, but he might know of someone who could take
> over this community site.
> While on the topic of domains, I have mono-host.com sitting around if
> anyone knows of a good home for it.
> > I have a domain name, MONO247.com, as in Mono 24/7 (24 hours 7 days a week).
> >  I have had this domain sitting around for a long time and was wondering if
> > there was any interest turning this in to a community site or some sorts to
> > help support all the Mono developers that live and breath this project on a
> > daily basis.

Seems to me there are already several Mono community sites;  doesn't
seem to me to be much point in spreading out the community even further
(most of the community sites aren't terribly active).  Just my two
cents.

Nice domain name though.

> > Please add your suggestions to this thread, I currently don't have a host
> > for the domain name, and it is a shame that it has been sitting around for
> > 2+ years now with little to no work done on it from my side of things.



signature.asc
Description: This is a digitally signed message part
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] What should I do with MONO247.com

2007-02-28 Thread Steve Deobald
Joseph Hill set up GotMono (http://gotmono.net/) a while ago. I know
he's been busy lately, but he might know of someone who could take
over this community site.

While on the topic of domains, I have mono-host.com sitting around if
anyone knows of a good home for it.

-steve


On 2/28/07, Nick Berardi <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I have a domain name, MONO247.com, as in Mono 24/7 (24 hours 7 days a week).
>  I have had this domain sitting around for a long time and was wondering if
> there was any interest turning this in to a community site or some sorts to
> help support all the Mono developers that live and breath this project on a
> daily basis.
>
> Please add your suggestions to this thread, I currently don't have a host
> for the domain name, and it is a shame that it has been sitting around for
> 2+ years now with little to no work done on it from my side of things.
>
> Thanks in advance for any suggestions,
> Nick
>
>
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] What should I do with MONO247.com

2007-02-28 Thread Nick Berardi

Hi guys,

I have a domain name, MONO247.com, as in Mono 24/7 (24 hours 7 days a
week).  I have had this domain sitting around for a long time and was
wondering if there was any interest turning this in to a community site or
some sorts to help support all the Mono developers that live and breath this
project on a daily basis.

Please add your suggestions to this thread, I currently don't have a host
for the domain name, and it is a shame that it has been sitting around for
2+ years now with little to no work done on it from my side of things.

Thanks in advance for any suggestions,
Nick
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mixed programming languages

2007-02-28 Thread Andreia Gaita
On 2/28/07, tom potts <[EMAIL PROTECTED]> wrote:
> Granted it might impose further requirements in the
> code but to have a VB.NET programmer extend something
> written in C# without having to convert the code could
> be a massive plus for mono.
> I say this as someone who had to learn VB.NET when I
> was already fluent in C# and now stutter in both languages..

I don't see why it should be necessary to write one project (one set
of classes compiling to a single assembly) in several languages. If
you want to extend a class, you create a project referencing the
assembly where the class resides in, and extend it, without thought to
which language the to-be-extended-class was written in. There's no
reason for rewriting the original code to change the language, of
course, since the key word is extend (in a new assembly), not rewrite.

Since it is possible to split the same namespace through more than one
assembly, you need not add classes to a VB.NET project to add more
functionality to that namespace if what you really want is to program
in C#; you just create a new assembly on the namespace and add what
you need to it. If you need to add features to a class, you can
inherit from it, or if it's un-inheritable you can always write a
wrapper. There's so many different ways to make things work without
having to mix languages within one assembly, I really don't see the
point. Maybe I'm missing something? :p

shana
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Interop problem: ** ERROR **: Type System.MarshalByRefObject which is passed to unmanaged code must have a StructLayout attribute

2007-02-28 Thread Robert Jordan
Frederik,

> Thanks. So it is a "bug" (or at least something that could be improved
> upon) in the MS framework, then. But indeed, the basic problem is this:
> I need to set some callbacks from unmanaged code. The callback should
> contain a stream (or a reference to it) as a parameter.

Since you have to use delegates anyway (only those can be called back
from unmanaged code), you can make the stream a member of the class
that implements the delegate.

Robert

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Problems resolving System.ComponentModel in monodevelop

2007-02-28 Thread Lluis Sanchez
You have to add a reference to the System assembly in your project
(right click on the References folder and then select the System
assembly in the first tab).

El dt 27 de 02 del 2007 a les 22:35 -0600, en/na Jack Lund va escriure:
> Hi,
> 
> My apologies if this question has been asked before. I'm trying to compile a 
> Windows C# app in monodevelop on Fedora Core 5, and I keep getting the 
> following errors:
> 
> [Task:File=/home/jackl/workspace/gvelocity/gvelocity/trunk/gvelocity/applications/klein/HighLowQuoter/HighLowQuoter/HighLowForm.cs,
>  Line=4, Column=1, Type=Error, Priority=Normal, Description=The type or 
> namespace name `System.ComponentModel' could not be found. Are you missing a 
> using directive or an assembly reference?(CS0246)]
> [Task:File=/home/jackl/workspace/gvelocity/gvelocity/trunk/gvelocity/applications/klein/HighLowQuoter/HighLowQuoter/HighLowForm.cs,
>  Line=4, Column=14, Type=Error, Priority=Normal, Description=The type or 
> namespace name `ComponentModel' does not exist in the namespace `System'. Are 
> you missing an assembly reference?(CS0234)]
> 
> which is strange, since, from everything I can tell, the 
> System.ComponentModel assembly is supposed to be in the main Systemassembly. 
> I've installed all of the mono RPMs, and I'm running monodevelop 0.13 but I 
> can't seem to get past this one error.
> 
> Any help would be greatly appreciated.
> 
> Thanks.
> 
> -Jack Lund
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] .net remoting problem with object sending

2007-02-28 Thread Lluis Sanchez
The problem is that the receiver application can't deserialize the
object because it can't find the assembly that implements it. In any
case, remoting should not crash with a null ref exception. I just fixed
it.

Lluis.

El dc 28 de 02 del 2007 a les 04:40 +0100, en/na Mirek Binas va
escriure:
> hello
> 
> i am trying to develop application with .net remoting for communication. at 
> the moment - everything is well, but when i want to send object, that is not 
> one of the default types, the exception raised:
> 
> Unhandled Exception: System.NullReferenceException: Object reference not set 
> to an instance of an object
> 
> the object is not null (checked line before call of the remote method). and 
> in the declaration of the class it is marked as [Serializable]. don't know, 
> what is the problem about. any idea?
> 
> mirek
> 
> p.s.: the complete exception
> 
> Unhandled Exception: System.NullReferenceException: Object reference not set 
> to an instance of an object
> 
> Server stack trace: 
>   at System.Runtime.Remoting.Channels.SimpleBinder.BindToType (System.String 
> assemblyName, System.String typeName) [0x0] 
>   at System.Runtime.Serialization.Formatters.Soap.SoapTypeMapper.GetType 
> (System.String xmlName, System.String xmlNamespace) [0x0] 
>   at System.Runtime.Serialization.Formatters.Soap.SoapReader.Deserialize () 
> [0x0] 
>   at System.Runtime.Serialization.Formatters.Soap.SoapReader.Deserialize 
> (System.IO.Stream inStream, ISoapMessage soapMessage) [0x0] 
>   at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize 
> (System.IO.Stream serializationStream, 
> System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x0] 
>   at System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize 
> (System.IO.Stream serializationStream) [0x0] 
>   at System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage 
> (IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders 
> requestHeaders, System.IO.Stream requestStream, IMessage& responseMsg, 
> ITransportHeaders& responseHeaders, System.IO.Stream& responseStream) 
> [0x0] 
> 
> Exception rethrown at [0]: 
> 
>   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke 
> (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, 
> System.Exception& exc, System.Object[]& out_args) [0x0]

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] error on FileInfo.CopyTo() / .MoveTo()

2007-02-28 Thread larsfp



Dick Porter-2 wrote:
> 
> On Mon, 2007-02-19 at 15:20 -0800, larsfp wrote:
>> hi
>> 
>> i use this code to copy files from one dir to another:
> 
>> but it prints:
>> copying /home/lars/temp/test1/testfil to /home/lars/temp/test2/
>> copy failed Win32 IO returned 82. Path: /home/lars/temp/test1/testfil" or
>> "/home/lars/temp/test2/
> 
> You're getting EISDIR, but we don't have a pretty error message for that
> at the moment.  I'll fix the exception text, but the original bug is
> yours.  FileInfo.CopyTo() expects a target filename, not a directory.
> 
> - Dick
> 
> 
>  
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 


you're absolutely right. thanks. i've been fighting this problem for a long
time. works now.
-- 
View this message in context: 
http://www.nabble.com/error-on-FileInfo.CopyTo%28%29---.MoveTo%28%29-tf3255821.html#a9178781
Sent from the Mono - General mailing list archive at Nabble.com.

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Interop problem: ** ERROR **: Type System.MarshalByRefObject which is passed to unmanaged code must have a StructLayout attribute

2007-02-28 Thread Frederik Carlier
Robert,

Thanks. So it is a "bug" (or at least something that could be improved
upon) in the MS framework, then. But indeed, the basic problem is this:
I need to set some callbacks from unmanaged code. The callback should
contain a stream (or a reference to it) as a parameter.

Is there any way this can be achieved (I heard about "pinning", but is
that something that I can use here)? Another solution would be to use a
dictionary in managed memory and use the key as the parameter on the
callback funcion, but then again that seems like some overkill to me.

Any ideas?

Frederik.

Robert Jordan schreef:
> Frederik Carlier wrote:
>   
>> Hi all,
>>
>> I have, unfortunately, another Interop problem with Mono. Using a struct
>> like this:
>>
>> [StructLayout(LayoutKind.Sequential)]
>> internal struct StreamSource
>> {
>> private TidyBuffer buffer;
>> private Stream stream;
>> }
>> , I have the following code:
>>
>> StreamSource data = new StreamSource();
>> data.stream = stream;
>> IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf(data));
>> Marshal.StructureToPtr(data, ptr, true);
>>
>> which runs fine on Windows and Microsoft .NET, but crashes badly on Mono:
>>
>> ** ERROR **: Type System.MarshalByRefObject which is passed to unmanaged
>> code must have a StructLayout attribute
>> aborting...
>> Stacktrace:
>>
>>   at (wrapper managed-to-native)
>> System.Runtime.InteropServices.Marshal.StructureToPtr
>> (object,intptr,bool) <0x4>
>>   at (wrapper managed-to-native)
>> System.Runtime.InteropServices.Marshal.StructureToPtr
>> (object,intptr,bool) <0x>
>>   at (...)
>>
>> So, obviously, the question is: what am I doing wrong, if anything?
>> 
>
> Your struct is containing a Stream object which can't be
> safely passed to unmanaged code. MS.NET 2.0 doesn't seem to
> care in this case (1.1 does), but the code will definitely break
> if you're relying on the stream being marshaled back correctly
> (MS.NET has a moving/compacting GC).
>
> Please file a bug for the ** ERROR ** on the 2.0 profile
> with a compilable test case, but also consider changing the
> struct because it's definitely not suitable for p/invoke.
>
> Robert
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>   

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mixed programming languages

2007-02-28 Thread Everaldo Canuto
Hey,

Yes. But for this you must have one solution with diferent projects
and for any project you can must use only one language.

Everaldo.

On 2/26/07, Pupeno <[EMAIL PROTECTED]> wrote:
> Is it possible to have a Mono project (MonoDevelop solution or whatever) with
> mixed programming languages? That is, one file in C# and another in Boo?
> --
> Pupeno <[EMAIL PROTECTED]> (http://pupeno.com)
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Patch for DataGridViewRowTest

2007-02-28 Thread Ben Joldersma

Patching this file enabled me to get quite a ways farther down the tests for
'make check'.  Here's the patch (fixes an ambiguous match between
ComponentModel and NUnit.Framework)

Index:
class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowTest.cs
===
---
class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowTest.cs
(revision 73343)
+++
class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowTest.cs
(working copy)
@@ -69,7 +69,7 @@
   }

   [Test]
-   [Category ("NotWorking")]
+   [NUnit.Framework.Category ("NotWorking")]
   public void MinimumHeight ()
   {
   DataGridViewRow row = new DataGridViewRow();


I think the error I ended up getting later might because I installed the
newest version of zlib, has anyone seen a similar problem?  Here's the error
(I'm maybe giving a bit extra, but that's because I'm not sure how much is
relevant to people)

make[8]: Entering directory `/home/ben/workspaces/mono/mcs/class/System'
ok=:; \
   MONO_REGISTRY_PATH="/home/ben/.mono/registry"
MONO_PATH="../../class/lib/net_2_0::$MONO_PATH"
/home/ben/workspaces/mono/mono/runtime/mono-wrapper --debug
../../class/lib/net_2_0/nunit-console.exe
/exclude:NotWorking,ValueAdd,CAS,InetAccess,PKITS
/output:TestResult-net_2_0.log /xml:TestResult-net_2_0.xml
System_test_net_2_0.dll || ok=false; \
   (echo ''; cat TestResult-net_2_0.log) | sed '1,/^Tests run: /d' ;
$ok
NUnit version 2.2.0
Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A.
Vorontsov, Charlie Poole.
Copyright (C) 2000-2003 Philip Craig.
All Rights Reserved.

OS Version: Unix 2.6.17.11Mono Version: 2.0.50727.42

Excluded categories: NotWorking,ValueAdd,CAS,InetAccess,PKITS
..N.N.NN..N...***
glibc detected *** /home/ben/workspaces/mono/mono/mono/mini/mono: free():
invalid pointer: 0x7fff ***
=== Backtrace: =
/lib/tls/i686/cmov/libc.so.6[0x401708bd]
/lib/tls/i686/cmov/libc.so.6(__libc_free+0x84)[0x40170a44]
/usr/lib/libz.so.1(zcfree+0x1d)[0x41fcfcbd]
/usr/lib/libz.so.1(inflateEnd+0x41)[0x41fcff81]
/home/ben/workspaces/mono/mono/support/.libs/libMonoPosixHelper.so(free_z_stream+0x48)[0x41fb6808]
[0x41f99753]
[0x41f996db]
[0x41f9962d]
[0x41f995ee]
[0x41f98a67]
[0x4133154b]
/home/ben/workspaces/mono/mono/mono/mini/mono(mono_runtime_invoke_array+0x19b)[0x809587b]
/home/ben/workspaces/mono/mono/mono/mini/mono[0x809b88b]
[0x4131a02d]
[0x41732aa2]
[0x4137c8eb]
[0x4173297f]
[0x41732d13]
[0x417326b3]
[0x417323d0]
[0x41731ed5]
[0x41731dc2]
[0x4172e3ac]
[0x4172d127]
[0x4172e3ac]
[0x4172d127]
[0x4172e3ac]
[0x4172d127]
[0x4172e3ac]
[0x4172d127]
[0x4172e3ac]
[0x

Re: [Mono-list] Simple Sandboxing API

2007-02-28 Thread Ben Joldersma

Thanks Sebastien.

I will go with what I can then, for now.  If my website gets enough traffic
then I would love to be able to get some good work contributed back into the
mono project.  Sounds like this might be a good area!

cheers,

--ben

On 2/22/07, Sebastien Pouliot <[EMAIL PROTECTED]> wrote:


Hello Ben,

The Simple Sanboxing API (2.0) depends on CAS to work properly. Current
CAS status is experimental (i.e. incomplete and unsupported).

It's unlikely this method will be (fully) implemented in the near
future. Contributions are welcomed :-)

On Mon, 2007-02-19 at 21:24 -0800, Ben Joldersma wrote:
> Hello mono-folk,
>
> I was wondering if this overload of CreateDomain was planned for
> inclusion into mono anytime soon?
>
>
> AppDomain.CreateDomain( string friendlyName,
> Evidence securityInfo,
> AppDomainSetup info,
> PermissionSet grantSet,
> params StrongName[] fullTrustAssemblies);
>
> Cheers!
>
> --ben
>
> http://blogs.msdn.com/shawnfa/archive/2005/08/08/449050.aspx
>
> --
> ben joldersma
> http://ben.creationsnetwork.org
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
--
Sebastien Pouliot  <[EMAIL PROTECTED]>
Blog: http://pages.infinit.net/ctech/





--
ben joldersma
http://ben.creationsnetwork.org
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mixed programming languages

2007-02-28 Thread Jonathan Pryor
On Wed, 2007-02-28 at 09:03 +, tom potts wrote:
> I've always felt slightly robbed when its said that a
> project has to be all in one language in .NET of all
> environments having mixed and matched languages in
> projects before - when we had .o in the build path.

It's not necessarily true that a project needs to be within a single
language.  That's an IDE limitation, not necessarily a compiler
limitation.

If all of your compilers support -target:module (which creates
a .netmodule file), you could compile different parts of the assembly in
different languages, then create the final assembly by "merging" the
different .netmodule files by providing -addmodule:filename.

(This of course requires that the compiler support -target:module, and
you can't mix languages within a single class, but this does allow
intermixing languages within an assembly.)

This mixing can only be done a class at a time, so you can't write part
of a class in C# and another part in VB.NET, but you can use inheritance
for similar functionality, i.e. write the base type in C# and the
derived type in VB.NET.

If you wanted to get _really_ tricky, you could mark to-be-merged types
with an attribute -- [WriteType("MergedType")] class CSharpMergedType
{...}, and a VB.NET VbMergedType -- and then write a Cecil program which
will take the two separate assemblies/.netmodule files, look for the
[WriteType] attribute, and merge all types with the specified attribute
into a new type.

(Why you'd want to work that hard is another matter, but it _could_ be
done...)

> Would it not be possible (with partial classes?) to
> actually have a project or a library built using
> different languages. 

No.  Partial classes are a compiler feature, not a CIL  feature.  The
compiler merges all "partial" classes into a single CIL type.

> Granted it might impose further requirements in the
> code but to have a VB.NET programmer extend something
> written in C# without having to convert the code could
> be a massive plus for mono.

This can already be done, though if you use an IDE this is done in
separate assemblies -- a VB.NET programmer writing assembly A.dll can
extend (inherit from) a C# class in assembly B.dll.

(Which is how ASP.NET works -- most of the class library is C#, while
ASP.NET can use VB.NET, Chrome, C#, Nemerle... any language with a
CodeDom provider.)

 - Jon


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] IDE for Mono

2007-02-28 Thread Jorge Bastos
Chrome seams very interesting, but it doesn't support forms design from what i 
saw, is it correct?

Jorge
  - Original Message - 
  From: James Mansion 
  To: Jorge Bastos ; 
  Sent: Tuesday, February 27, 2007 11:53 PM
  Subject: RE: [Mono-list] IDE for Mono


  http://www.omnicore.com/en/xdevelop.htm

  http://www.chromesville.com/ (suspect this isn't what you mean - but do check 
the version for mono)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jorge Bastos
Sent: 24 February 2007 15:12
To: Mono-list@lists.ximian.com
Subject: [Mono-list] IDE for Mono


Guys, a nice IDE for mono to build forms?
Without beeing monodevelop or sharpdevelop

Jorge___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mixed programming languages

2007-02-28 Thread tom potts
I've always felt slightly robbed when its said that a
project has to be all in one language in .NET of all
environments having mixed and matched languages in
projects before - when we had .o in the build path.
Would it not be possible (with partial classes?) to
actually have a project or a library built using
different languages. 
They all compile to the same underlying code and
certain languages make certain assumptions but there
is nothing theoretically impossible in the idea of
mixing languages.
Granted it might impose further requirements in the
code but to have a VB.NET programmer extend something
written in C# without having to convert the code could
be a massive plus for mono.
I say this as someone who had to learn VB.NET when I
was already fluent in C# and now stutter in both languages..





___ 
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at 
the Yahoo! Mail Championships. Plus: play games and win prizes. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list