Re: [Mono-list] What does the C method mono_gc_collect do?

2010-09-14 Thread petermonsson

Hi Rodrigo,

Thanks a lot. 

Personal Note: To get the generation I used "int mono_gc_max_generation();"
which seemed to kick off the garbage collector. mono-gc.h also has "int
mono_gc_get_generation(MonoObject *object);" but it is undocumented, so I'm
not sure whether it is supposed to be used.

Best Regards
Peter
-- 
View this message in context: 
http://mono.1490590.n4.nabble.com/What-does-the-C-method-mono-gc-collect-do-tp2538722p2539966.html
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


[Mono-list] Mono-2.8 monodis not compiling

2010-09-14 Thread Gunnar Sønsteby

Hi,

When compiling Mono-2.8, monodis is missing. Tried both the source download
and from git. Am I doing something wrong or might this be a little preview
issue? This also means that mono-debugger won't compile either. Everything
compiles fine with version 2.6.7.
Even if it is no big deal, gnome-sharp fails when the sample is compiled.
There is a reference to GetOptions which I understand is removed.

Thanks for any help or pointers.
-- 
View this message in context: 
http://mono.1490590.n4.nabble.com/Mono-2-8-monodis-not-compiling-tp2539690p2539690.html
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] What does the C method mono_gc_collect do?

2010-09-14 Thread Rodrigo Kumpera
It does init a gc.

>From the mono-gc.h header: void   mono_gc_collect (int generation);

On Tue, Sep 14, 2010 at 6:52 AM, petermonsson  wrote:

>
> Hi all,
>
> I'm trying to figure out what I'm doing wrong when using a C# Assembly from
> C. I suspect I'm screwing up some gchandle stuff since the documentation on
> gchandle isn't very clear. So I want to make the gchandle stuff work with a
> small program, but small programs don't always execute long enough to make
> the garbage collector kick in, thus I would like to invoke the garbage
> collector manually.
>
> They question is: Does mono_gc_collect actually invoke the garbage
> collector, and what is the function prototype?
>
> The documentation isn't of much help:
>
> http://go-mono.com/docs/monodoc.ashx?tlink...@xhtml%3adeploy%2fmono-api-gc.html
>
> Thanks in advance
> Peter
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/What-does-the-C-method-mono-gc-collect-do-tp2538722p2538722.html
> 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
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Right application data folder

2010-09-14 Thread Michael Hutchinson
2010/9/14 "José A. Salvador Vanaclocha" :
> Hi all,
>
> I am wondering what is the right place (folder) to store the application
> data
>
> The goal is to use the Environment.GetFolderPath(... facility in order
> to get good crossplatform behavior, however, if I use
> Environment.SpecialDolder.ApplicationData, in my Debian system, the
> folder is .config. I dont know if it is the best place when the most
> linux's applications store their application data files in a folder
> begining with .application_name.
>
> What is the best way to choose the right application data folder?

~/.config is the correct folder for modern apps that follow the XDG
spec. You should use a subdirectory in that folder for your app's
data, e.g.

var appDataDir = Path.Combine (Environment.GetFolderPath
(Environment.SpecialFolder.ApplicationData), applicationName);

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


[Mono-list] Right application data folder

2010-09-14 Thread José A. Salvador Vanaclocha
Hi all,

I am wondering what is the right place (folder) to store the application 
data

The goal is to use the Environment.GetFolderPath(... facility in order 
to get good crossplatform behavior, however, if I use 
Environment.SpecialDolder.ApplicationData, in my Debian system, the 
folder is .config. I dont know if it is the best place when the most 
linux's applications store their application data files in a folder 
begining with .application_name.

What is the best way to choose the right application data folder?

Greats.

Jose Salvador.


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


Re: [Mono-list] why is mono looking for this resource dll?

2010-09-14 Thread Eric Slosser
Maybe I should have mentioned that the resources were defined in FooText.resx.  
Using Reflector, I discovered that the resources were embedded in the namespace 
Foo.SomeFolder.FooText.resources.

In VisStudio, I moved FooText.resx up one level, which fixes things.   

Seems like a bug in my code, I constructed rMgr with the wrong 1st parameter.  
But this worked under .NET, and under installed-Mono, so maybe it's a Mono bug. 
 If someone closer to the innards wants a bug report, I'll write it up.


On Sep 14, 2010, at 11:02 AM, Eric Slosser wrote:

> I'm trying to configure my Mac app to include Mono inside it so I can run on 
> a machine that doesn't have Mono installed.
> 
> I'm launching it from the Terminal, with 'pwd' as 
> /MyApp.app/Contents/MacOS.  I've got MONO_PATH and DYLD_LIBRARY_PATH set 
> so assemblies and libraries are found.  My entry point is in a C-based 
> executable that calls mono_main().   Mono v. 2.6.4.
> 
> When I launch using my executable on a machine that doesn't have Mono 
> installed, eventually my Foo.dll  calls:
> 
> ResourceManager rMgr = new ResourceManager( "Foo.FooText", 
> Assembly.GetAssembly( typeof(Foo) ) );
> rMgr.GetString("FOO_STRINGS");
> 
> ... and mscorlib tells me:
> 
> Looking for assembly /Contents/Runtime/Satellite/Foo.resources.dll
> Main: Exception: Could not find any resources appropriate for the specified 
> culture or the neutral culture.  Make sure "Foo.FooText.resources" was 
> correctly embedded or linked into assembly "Foo" at compile time, or that all 
> the satellite assemblies required are loadable and fully signed. by mscorlib
>   at System.Resources.ResourceManager.AssemblyResourceMissing (System.String 
> fileName) [0x0] in :0 
>   at System.Resources.ResourceManager.InternalGetResourceSet 
> (System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean 
> tryParents) [0x0] in :0 
>   at System.Resources.ResourceManager.InternalGetResourceSet 
> (System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean 
> tryParents) [0x0] in :0 
>   at System.Resources.ResourceManager.InternalGetResourceSet 
> (System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean 
> tryParents) [0x0] in :0 
>   at System.Resources.ResourceManager.GetString (System.String name, 
> System.Globalization.CultureInfo culture) [0x0] in :0 
>   at System.Resources.ResourceManager.GetString (System.String name) 
> [0x0] in :0 
> 
> This bundle works fine when I launch it using an installed Mono, or if I 
> launch it using my executable on a machine that has Mono installed, so I'm 
> guessing that I've failed to copy some bit of Mono into my bundle, or that 
> I've failed to alter some configuration string.  
> 
> All pearls appreciated.
> 
> ___
> 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] why is mono looking for this resource dll?

2010-09-14 Thread Eric Slosser
I'm trying to configure my Mac app to include Mono inside it so I can run on a 
machine that doesn't have Mono installed.

I'm launching it from the Terminal, with 'pwd' as 
/MyApp.app/Contents/MacOS.  I've got MONO_PATH and DYLD_LIBRARY_PATH set so 
assemblies and libraries are found.  My entry point is in a C-based executable 
that calls mono_main().   Mono v. 2.6.4.

When I launch using my executable on a machine that doesn't have Mono 
installed, eventually my Foo.dll  calls:

ResourceManager rMgr = new ResourceManager( "Foo.FooText", 
Assembly.GetAssembly( typeof(Foo) ) );
rMgr.GetString("FOO_STRINGS");

... and mscorlib tells me:

Looking for assembly /Contents/Runtime/Satellite/Foo.resources.dll
Main: Exception: Could not find any resources appropriate for the specified 
culture or the neutral culture.  Make sure "Foo.FooText.resources" was 
correctly embedded or linked into assembly "Foo" at compile time, or that all 
the satellite assemblies required are loadable and fully signed. by mscorlib
  at System.Resources.ResourceManager.AssemblyResourceMissing (System.String 
fileName) [0x0] in :0 
  at System.Resources.ResourceManager.InternalGetResourceSet 
(System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean 
tryParents) [0x0] in :0 
  at System.Resources.ResourceManager.InternalGetResourceSet 
(System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean 
tryParents) [0x0] in :0 
  at System.Resources.ResourceManager.InternalGetResourceSet 
(System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean 
tryParents) [0x0] in :0 
  at System.Resources.ResourceManager.GetString (System.String name, 
System.Globalization.CultureInfo culture) [0x0] in :0 
  at System.Resources.ResourceManager.GetString (System.String name) [0x0] 
in :0 

This bundle works fine when I launch it using an installed Mono, or if I launch 
it using my executable on a machine that has Mono installed, so I'm guessing 
that I've failed to copy some bit of Mono into my bundle, or that I've failed 
to alter some configuration string.  

All pearls appreciated.

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


[Mono-list] What does the C method mono_gc_collect do?

2010-09-14 Thread petermonsson

Hi all,

I'm trying to figure out what I'm doing wrong when using a C# Assembly from
C. I suspect I'm screwing up some gchandle stuff since the documentation on
gchandle isn't very clear. So I want to make the gchandle stuff work with a
small program, but small programs don't always execute long enough to make
the garbage collector kick in, thus I would like to invoke the garbage
collector manually. 

They question is: Does mono_gc_collect actually invoke the garbage
collector, and what is the function prototype?

The documentation isn't of much help:
http://go-mono.com/docs/monodoc.ashx?tlink...@xhtml%3adeploy%2fmono-api-gc.html

Thanks in advance
Peter
-- 
View this message in context: 
http://mono.1490590.n4.nabble.com/What-does-the-C-method-mono-gc-collect-do-tp2538722p2538722.html
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] SslStream + mono == error

2010-09-14 Thread Aldo Prinzi


Are you using a "valid" certificate?
Valid means: a "real certificate", the one that came from a
certification authority.
Not valid means: a certificate issued by yourself.
In that case you must build an "accept all certificates routine", one
that can trust valid (from certification authorities) and invalid (your
own issued) certificates.

Take a look to
http://blog.jameshiggs.com/2008/05/01/c-how-to-accept-an-invalid-ssl-certificate-programmatically/
or googling for a solution
http://www.google.it/search?hl=&q=%2Baccept+%2Buntrusted+%2Bcertificates+%2B"c%23";

Hi,
Aldus.

Il 13/09/2010 19.44, astromag ha scritto:
>  Hi,
>  I wrotea small application (test) of type client - server(Tcp/Ip, SSL).
>  Unfortunately it doeas not work under linux (server on Linux - client on M$
>  Windows), in M$ Windows it works.
>  It turned out, that server stops on method AuthenticateAsServer of class
>  SslStream.

[...]

> --- End of inner exception stack trace ---
> at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback
>  (IAsyncResu
>  lt asyncResult) [0x0] in:0
>
>  I ask for help.


-- 
--
"If you are thinking one year ahead, sow seed.
If you are thinking ten years ahead, plant a tree.
If you are thinking one hundred years ahead, educate the people."
Kuan Tze, Chinese poet, 400 B.C.


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