Re: [Mono-dev] [PATCH] MS.NET compatible Path.GetTempFileName

2006-01-07 Thread Miguel de Icaza
Hello,

 How about just appending .tmp to the temp file name while
 still using ints for the pattern?

Yes, lets do this.

This is a particular case where an application depended on this bit.
The rest (the actual format of the filename) is something that we will
not copy.

Miguel
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] RE: Com Interop Patch

2006-01-07 Thread Miguel de Icaza
Hello,

My comments are as follows:

* Please provide a ChangeLog for all the changes.

* New fields in structures need to include documentation.
  I know that we have not done this in the past, but we are
  trying to rectify this, so for new patches, we should include
  a description of the field, and any potential notes on its
  use.

* Any new public methods need to be documented using the 
  format that can be seen in files like object.c:

/**
 * method: 
 * arg1: bla bla
 * arg2: bla bla
 *
 * Description
 *
 * Returns bla bla
 */

Miguel
 The patch was too big. Attached is the patch to mono. The next email
 will have the patch to mcs.
 
 -Original Message-
 From: Jonathan S. Chambers 
 Sent: Friday, January 06, 2006 11:33 AM
 To: mono-devel-list@lists.ximian.com
 Subject: Com Interop Patch
 
   Here's a first attempt at a patch for COM Interop. This only
 provides support for RCWs (Runtime Callable Wrappers), i.e. using
 unmanaged COM components from managed code. This should support both
 classes used from Interop Assemblies (where metadata is known), as well
 as bare interface pointers (with no metadata) who are wrapped using
 __ComObject.
 
   The patch doesn't seem to introduce any regression failures, and
 theoretically no code in this patch should even be hit unless you are
 using COM Interop functionality.
 
   Just as a quick update, as much functionality as possible has
 been moved to managed code (either in the Marshal or COMInteropHelpers
 classes). This helps maintenance, doesn't bloat the runtime with
 component specific code, removes compile time dependencies, etc. I'm
 hoping for all code in the runtime to be generic component support code.
 All specific component code (COM, XPCOM, Mainwin COM) will be in
 managed. 
 
   There's lots left to do, but this provides basic functionality.
 I'm sure the patch needs cleanup before commit, so please let me know
 what needs changed.
 
 Thanks,
 Jonathan
 
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
-- 
Miguel de Icaza [EMAIL PROTECTED]
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


RE: [Mono-dev] RE: Com Interop Patch

2006-01-07 Thread Jonathan S. Chambers
Alexandre,
 I have no clue. I have never used Wine. I believe that Wine uses a binary 
compatible implementation of COM. If so, in my ignorance I don't see why it 
would not be possible. It may need some additional setup, there may be 
threading issues, etc. I'll try it out when I have free time; or you can. As 
long as the mono runtime can find ole32 (and maybe oleaut32) I think you should 
be ok. If Wine needs intialized you may need to pinvoke that routine before 
doing any COM stuff.

- Jonathan


-Original Message-
From:   Alexandre Miguel Pedro Gomes [mailto:[EMAIL PROTECTED]
Sent:   Sat 1/7/2006 8:53 AM
To: Jonathan S. Chambers
Cc: mono-devel-list@lists.ximian.com
Subject:Re: [Mono-dev] RE: Com Interop Patch

Would it be possible to use COM in Linux, using Wine for instance?

On 1/6/06, Jonathan S. Chambers [EMAIL PROTECTED] wrote:

 The patch was too big. Attached is the patch to mono. The next email
 will have the patch to mcs.

 -Original Message-
 From: Jonathan S. Chambers
 Sent: Friday, January 06, 2006 11:33 AM
 To: mono-devel-list@lists.ximian.com
 Subject: Com Interop Patch

 Here's a first attempt at a patch for COM Interop. This only
 provides support for RCWs (Runtime Callable Wrappers), i.e. using
 unmanaged COM components from managed code. This should support both
 classes used from Interop Assemblies (where metadata is known), as well
 as bare interface pointers (with no metadata) who are wrapped using
 __ComObject.

 The patch doesn't seem to introduce any regression failures, and
 theoretically no code in this patch should even be hit unless you are
 using COM Interop functionality.

 Just as a quick update, as much functionality as possible has
 been moved to managed code (either in the Marshal or COMInteropHelpers
 classes). This helps maintenance, doesn't bloat the runtime with
 component specific code, removes compile time dependencies, etc. I'm
 hoping for all code in the runtime to be generic component support code.
 All specific component code (COM, XPCOM, Mainwin COM) will be in
 managed.

 There's lots left to do, but this provides basic functionality.
 I'm sure the patch needs cleanup before commit, so please let me know
 what needs changed.

 Thanks,
 Jonathan



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






--
Alexandre Gomes, Portugal



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


Re: [Mono-dev] RE: Com Interop Patch

2006-01-07 Thread Alexandre Miguel Pedro Gomes
I was just wondering :) That would be very nice because it could enable us to run such things as WebMatrix or SharpDevelop, since they use IE to asp.net stuff. Of course the ultimate goal would be to run 
VS.Net :POn 1/7/06, Miguel de Icaza [EMAIL PROTECTED] wrote:
 Would it be possible to use COM in Linux, using Wine for instance?Mono and Wine do not work really well together (Mono in the past usedWine in library form to implement its Windows.Forms library, read the
archives to find out the kinds of issues involved).Running Mono and Wine on the same address space *reliably* would have tobe addressed first.Miguel.
-- Alexandre Gomes, Portugal
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


RE: [Mono-dev] RE: Com Interop Patch - mcs

2006-01-07 Thread Daniel Morgan
Now, I added some code to navigate to a web  page. I built with vs.net 2005. It runs on .net 2.0  okay. It fails to run on Mono with your COM interop patch. IWebBrowser2 ie = new InternetExplorerClass();   object o = null;   ie.Navigate(@"http://www.mono-project.com",   ref o, ref o, ref o, ref o);   ie.Visible = true;Here is the exception I get:$ mono ConsoleApplication1.exe  COMInteropHelpers.CreateInstance before returnUnhandled Exception: System.NullReferenceException: Object reference not set to  an instance of an
 object  in 0x0002a System.Variant:VariantFromObject (System.Object obj)  in 0x00021 System.Runtime.InteropServices.Marshal:GetNativeVariantForObject (S  ystem.Object obj, IntPtr pDstNativeVariant)  in (wrapper managed-to-native) ie_tester.InternetExplorerClass:Navigate (string,  object,object,object,object)  in 0x00050 ie_tester.Program:Main (System.String[] args)What do I do?"Jonathan S. Chambers" [EMAIL PROTECTED] wrote:  Here is a zip of a simple program to launch ie. I defined the interface and class in C#, so you don't need an interop assembly.If  you want to compile the source, compile with the MS compiler. The mono  compilers appear to not work correctly. The included exe was compiled  with VS.2005, and works with both 
 mono
 (with my patch) and .Net. An  .exe produced by the mono compilers doesn't run on mono or .Net. Not  sure if the issue is with my COM stuff, or the compilers.- Jonathan-Original Message-From: Daniel Morgan [mailto:[EMAIL PROTECTED]Sent: Fri 1/6/2006 8:01 PMTo: Jonathan S. Chambers; mono-devel-list@lists.ximian.comCc: Subject: Re: [Mono-dev] RE: Com Interop Patch - mcsCan you provide some examples that work on Mono?  "Jonathan S. Chambers"  wrote:  Here the patch for the class libs.-Original Message-From: Jonathan S. Chambers Sent: Friday, January 06, 2006 11:33 AMTo: mono-devel-list@lists.ximian.comSubject: Com Interop Patch Here's a first attempt at a patch for COM Interop. This onlyprovides support for RCWs (Runtime Callable Wrappers), i.e. usingunmanaged COM components from managed code. This should support bothclasses us
 ed from
 Interop Assemblies (where metadata is known), as wellas bare interface pointers (with no metadata) who are wrapped using__ComObject. The patch doesn't seem to introduce any regression failures, andtheoretically no code in this patch should even be hit unless you areusing COM Interop functionality. Just as a quick update, as much functionality as possible hasbeen moved to managed code (either in the Marshal or COMInteropHelpersclasses). This helps maintenance, doesn't bloat the runtime withcomponent specific code, removes compile time dependencies, etc. I'mhoping for all code in the runtime to be generic component support code.All specific component code (COM, XPCOM, Mainwin COM) will be inmanaged.  There's lots left to do, but this provides basic functionality.I'm sure the patch needs cleanup before commit, so please let me knowwhat needs
 changed.Thanks,Jonathan___Mono-devel-list mailing listMono-devel-list@lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-devel-list  -Yahoo! Photos – Showcase holiday pictures in hardcover Photo Books. You design it and we’ll bind it!
		Yahoo! Photos 
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] RE: Com Interop Patch

2006-01-07 Thread Daniel Morgan
I tried it a different way this time. This works on .net 2.0 too, but not mono. IWebBrowser2 ie = new InternetExplorerClass();   IntPtr p = IntPtr.Zero;   object o = (object)p; ie.Navigate(@"http://www.mono-project.com",   ref o, ref o, ref o, ref o);   ie.Visible = true;$ mono ConsoleApplication1.exe  COMInteropHelpers.CreateInstance before returnUnhandled Exception: System.NotImplementedException: Unsupported VARIANT type: V  T_EMPTY  in 0x00179
 System.Variant:VariantFromObject (System.Object obj)  in 0x00021 System.Runtime.InteropServices.Marshal:GetNativeVariantForObject (S  ystem.Object obj, IntPtr pDstNativeVariant)  in (wrapper managed-to-native) ie_tester.InternetExplorerClass:Navigate (string,  object,object,object,object)  in 0x00061 ie_tester.Program:Main (System.String[] args)Daniel Morgan [EMAIL PROTECTED] wrote:  Date: Sat, 7 Jan 2006 07:23:38 -0800 (PST)From: Daniel Morgan [EMAIL PROTECTED]Subject: RE: [Mono-dev] RE: Com Interop Patch - mcsTo: "Jonathan S. Chambers" [EMAIL PROTECTED], mono-devel-list@lists.ximian.com  Now, I added some code to navigate to a web  page. I built with vs.net 2005. It runs o
 n .net
 2.0  okay. It fails to run on Mono with your COM interop patch. IWebBrowser2 ie = new InternetExplorerClass();   object o = null;   ie.Navigate(@"http://www.mono-project.com",   ref o, ref o, ref o, ref o);   ie.Visible = true;Here is the exception I get:$ mono ConsoleApplication1.exe  COMInteropHelpers.CreateInstance before returnUnhandled Exception: System.NullReferenceException: Object reference not set to  an instance of an   object  in 0x0002a System.Variant:VariantFromObject (System.Object obj)  in 0x00021
 System.Runtime.InteropServices.Marshal:GetNativeVariantForObject (S  ystem.Object obj, IntPtr pDstNativeVariant)  in (wrapper managed-to-native) ie_tester.InternetExplorerClass:Navigate (string,  object,object,object,object)  in 0x00050 ie_tester.Program:Main (System.String[] args)What do I do?"Jonathan S. Chambers" [EMAIL PROTECTED] wrote:  Here is a zip of a simple program to launch ie. I defined the interface  and class in C#, so you don't need an interop assembly.If you  want to compile the source, compile with the MS compiler. The mono  compilers appear to not work correctly. The included exe was compiled  with VS.2005, and works with both mono (with my patch) and .Net. An  .exe produced by the mono compilers doesn't run on mono or .Net. Not  su
 re if
 the issue is with my COM stuff, or the compilers.- Jonathan-Original Message-From: Daniel Morgan [mailto:[EMAIL PROTECTED]Sent: Fri 1/6/2006 8:01 PMTo: Jonathan S. Chambers; mono-devel-list@lists.ximian.comCc: Subject: Re: [Mono-dev] RE: Com Interop Patch - mcsCan you provide some examples that work on Mono?  "Jonathan S. Chambers"  wrote:  Here the patch for the class libs.-Original Message-From: Jonathan S. Chambers Sent: Friday, January 06, 2006 11:33 AMTo: mono-devel-list@lists.ximian.comSubject: Com Interop Patch Here's a first attempt at a patch for COM Interop. This onlyprovides support for RCWs (Runtime Callable Wrappers), i.e. usingunmanaged COM components from managed code. This should support bothclasses used from   Interop Assemblies (where metadata is known), as wellas bare interface pointers (with no metad
 ata) who
 are wrapped using__ComObject. The patch doesn't seem to introduce any regression failures, andtheoretically no code in this patch should even be hit unless you areusing COM Interop functionality. Just as a quick update, as much functionality as possible hasbeen moved to managed code (either in the Marshal or COMInteropHelpersclasses). This helps maintenance, doesn't bloat the runtime withcomponent specific code, removes compile time dependencies, etc. I'mhoping for all code in the runtime to be generic component support code.All specific component code (COM, XPCOM, Mainwin COM) will be inmanaged.  There's lots left to do, but this provides basic functionality.I'm sure the patch needs cleanup before commit, so please let me knowwhat needs   changed.Thanks,Jonathan___Mono-devel-list mailing
 listMono-devel-list@lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-devel-list  -Yahoo! Photos – Showcase holiday pictures in hardcover Photo Books. You design it and we’ll bind it!Yahoo! Photos   Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
	
		Yahoo! Photos 
Got holiday prints? See all the ways to get quality prints in your hands ASAP.___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


RE: [Mono-dev] RE: Com Interop Patch - mcs

2006-01-07 Thread Jonathan S. Chambers
Go to Variant.cs, in VariantFromObject. Change the top to the following (forgot 
the null check): 

Variant vt = new Variant();
if (obj == null) {
vt.vt = (ushort)System.Runtime.InteropServices.VarEnum.VT_EMPTY;
return vt;
}
Type t = obj.GetType();

- Jonathan


-Original Message-
From:   Daniel Morgan [mailto:[EMAIL PROTECTED]
Sent:   Sat 1/7/2006 10:23 AM
To: Jonathan S. Chambers; mono-devel-list@lists.ximian.com
Cc: 
Subject:RE: [Mono-dev] RE: Com Interop Patch - mcs

Now, I added some code to navigate to a web  page.  I built with vs.net 2005.  
It runs on .net 2.0  okay.  It fails to run on Mono with your COM interop patch.
  
  IWebBrowser2 ie = new InternetExplorerClass();
  object o = null;
  ie.Navigate(@http://www.mono-project.com;,
  ref o, ref o, ref o, ref o);
  ie.Visible = true;
  
  Here is the exception I get:
  
  $ mono ConsoleApplication1.exe
  COMInteropHelpers.CreateInstance before return
  
  Unhandled Exception: System.NullReferenceException: Object reference not set 
to
  an instance of an object
  in 0x0002a System.Variant:VariantFromObject (System.Object obj)
  in 0x00021 System.Runtime.InteropServices.Marshal:GetNativeVariantForObject 
(S
  ystem.Object obj, IntPtr pDstNativeVariant)
  in (wrapper managed-to-native) ie_tester.InternetExplorerClass:Navigate 
(string,
  object,object,object,object)
  in 0x00050 ie_tester.Program:Main (System.String[] args)
  
  What do I do?
  
  

Jonathan S. Chambers [EMAIL PROTECTED] wrote:  Here is a zip of a simple 
program to launch ie. I defined the interface and class in C#, so you don't 
need an interop assembly.

If  you want to compile the source, compile with the MS compiler. The mono  
compilers appear to not work correctly. The included exe was compiled  with 
VS.2005, and works with both mono (with my patch) and .Net. An  .exe produced 
by the mono compilers doesn't run on mono or .Net. Not  sure if the issue is 
with my COM stuff, or the compilers.

- Jonathan


-Original Message-
From: Daniel Morgan [mailto:[EMAIL PROTECTED]
Sent: Fri 1/6/2006 8:01 PM
To: Jonathan S. Chambers; mono-devel-list@lists.ximian.com
Cc: 
Subject: Re: [Mono-dev] RE: Com Interop Patch - mcs

Can you provide some examples that work on Mono?
  
Jonathan S. Chambers  wrote:  Here the patch for the class libs.

-Original Message-
From: Jonathan S. Chambers 
Sent: Friday, January 06, 2006 11:33 AM
To: mono-devel-list@lists.ximian.com
Subject: Com Interop Patch

 Here's a first attempt at a patch for COM Interop. This only
provides support for RCWs (Runtime Callable Wrappers), i.e. using
unmanaged COM components from managed code. This should support both
classes used from Interop Assemblies (where metadata is known), as well
as bare interface pointers (with no metadata) who are wrapped using
__ComObject.

 The patch doesn't seem to introduce any regression failures, and
theoretically no code in this patch should even be hit unless you are
using COM Interop functionality.

 Just as a quick update, as much functionality as possible has
been moved to managed code (either in the Marshal or COMInteropHelpers
classes). This helps maintenance, doesn't bloat the runtime with
component specific code, removes compile time dependencies, etc. I'm
hoping for all code in the runtime to be generic component support code.
All specific component code (COM, XPCOM, Mainwin COM) will be in
managed. 

 There's lots left to do, but this provides basic functionality.
I'm sure the patch needs cleanup before commit, so please let me know
what needs changed.

Thanks,
Jonathan

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



  
-
Yahoo! Photos – Showcase holiday pictures in hardcover
 Photo Books. You design it and we’ll bind it!







-
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, 
whatever.


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


[Mono-dev] Embedding Mono

2006-01-07 Thread Janne Rantala
Hasn't anyone used Visual Studio 2005 for running Mono embed samples? I'm still trying to figure why I get Access violation reading location -error messages when I try to run my program. I've located the error in GetSystemTimeAsFileTime -method which is called from __security_init_cookie(), but have absolutely no idea why this error occurs. It defiinitely has something to do with Mono classes though.
Any help would be much appreciated.Janne
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Invalid IL code (sub.ovf) generated by mcs 1.1.12.1

2006-01-07 Thread Sebastian Nowozin
Hello,

I filed a bug report at
   http://bugzilla.ximian.com/show_bug.cgi?id=77180
together with a reproducing sample file.

Thanks,
Sebastian
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list