Re: [Mono-dev] How to stop and debug native code of a method?

2016-07-12 Thread Robert Jordan
On 12.07.2016 12:39, Pin Cheng wrote: Hi All, I am porting mono to a platform, I wander if I want to trace a method(compiled into native code) how do You stop the program running when entering into this method? Gdb can Watch the PC register, but it is very slow, I have wait for tens of

Re: [Mono-dev] about appdomain and threads.

2016-07-08 Thread Robert Jordan
On 08.07.2016 05:34, Zhanxing Ding wrote: Can anyone could tell me about the relationship between appdomain and threads? The details are that: If creating a new appdomian must create a new thread corresponding to it? It's not required to create a thread for the AppDomain, nor does the

Re: [Mono-list] Linux: RunAS with System.Diagnostics.Process fails

2016-07-03 Thread Robert Jordan
On 01.07.2016 01:17, web...@manfbraun.de wrote: Hello ! I am just trying this: Process p = new Process(); ProcessStartInfo psi = new ProcessStartInfo(); SecureString password = ReadPassword(); psi.UserName = args[0]; psi.FileName = args[1]; psi.UseShellExecute = false; psi.Password = password;

Re: [Mono-dev] mono_add_internal_call to mscorlib method

2016-06-10 Thread Robert Jordan
On 09.06.2016 15:37, nicob wrote: Hi Robert, thanks for the reply. I didn't explain my self correctly. Here's an example, I have a c# assembly with a method that prints the args to the console: I believe I didn't explain the workaround entirely. Parts of the Mono runtime are expecting that

Re: [Mono-dev] mono_add_internal_call to mscorlib method

2016-06-09 Thread Robert Jordan
On 08.06.2016 21:26, nicob wrote: Hi, I'm trying to use the Skype Sdk in mono embedded. I'm able to load the assemblies but when I try to create a instance of a class that internally calls System.Environment.GetCommandLineArgs it throws an exception. After digging a bit I found out the

Re: [Mono-dev] Embedded API: delegate type building

2016-03-04 Thread Robert Jordan
Hi Jonathan, You may want to have a look at this repo: https://github.com/robert-j/Mono.Embedding/tree/master/Mono.Embedding especially at UniversalDelegateServices. UniversalDelegateServices is able to wrap (almost) all delegate types with a UniversalDelegate with the following signature:

Re: [Mono-dev] Embedded API: .ctor method signature query [mono]

2016-03-03 Thread Robert Jordan
re if that would even fly. As a work around I will use an internal call. Shall I log this as a bug and reference this thread? Thanks a lot for replying. Jonathan On 3 Mar 2016, at 18:02, Robert Jordan <robe...@gmx.net> wrote: On 03.03.2016 14:36, Jonathan Mitchell wrote: HI I want

Re: [Mono-dev] Embedded API: .ctor method signature query

2016-03-03 Thread Robert Jordan
On 03.03.2016 14:36, Jonathan Mitchell wrote: HI I want to call the following constructor via the embedded API: public CloudClient(Func filePathCallback) All my other embedded method and constructor calls work okay but there is an issue with this one - it is the only place I

Re: [Mono-dev] DllMap default architecture for P/Invoke

2016-01-16 Thread Robert Jordan
On 16.01.2016 14:08, Jason Curl wrote: > > How would I handle this scenario within Mono? > The dllmap machinery does not probe for target dlls. It performs a solely textual mapping. You may want to have different configs with dllmaps for DEBUG and RELEASE builds. Robert

Re: [Mono-list] Mono, Windows Forms, and Headless operation

2016-01-08 Thread Robert Jordan
On 07.01.2016 22:24, George, Glover E ERDC-RDE-ITL-MS wrote: Hi all, We’re currently porting a Windows Forms Application to Mono, and have generally had great success. However, we have now hit a critical decision point, and were hoping for some guidance on the best route forward. If we don’t

Re: [Mono-list] Thunk generator

2015-11-14 Thread Robert Jordan
On 14.11.2015 15:31, Evgeny Pirogov wrote: Hello, Robert Jordan. Thank you for explanation. Is any differences in mono embedding from mono 2.8 to 4.2? I don't recall Mono 2.8, but if it has already provided the Mono 2 Embedded API (check it with "pkg-config --libs mono-2"), the A

Re: [Mono-dev] Loading AOT output using mono_domain_assembly_open

2015-11-14 Thread Robert Jordan
On 14.11.2015 18:13, zebrajap wrote: Hi, I am trying to load the .so file generated by AOT. When the .dll is passed to mono_domain_assembly_open it returns the assembly. However when I pass the .so path, it returns NULL. Is there a different API for AOT assembly loading? You're still supposed

Re: [Mono-list] Thunk generator

2015-11-13 Thread Robert Jordan
On 13.11.2015 13:24, Evgeny Pirogov wrote: Hello, Robert Jordan. Look like your utility make c++ code on the fly. Is it only generate .h files? Where code for C++ generation located in the project? It generates both C/C++ and H files but not on the fly. You have to generate the thunks

Re: [Mono-list] [embedding] "moving from mono_runtime_invoke() to mono_method_get_unmanaged_thunk()" or "how to call class method that takes and returns a string via thunks"

2015-11-12 Thread Robert Jordan
On 11.11.2015 21:41, Jonathan Mitchell wrote: On 11 Nov 2015, at 20:34, Rodrigo Kumpera wrote: How does it crash? Did you try debugging it? The invocation looks ok. Is It really? From reading the runtime source comments I would have tried something like: func(NULL,

Re: [Mono-list] [embedding] "moving from mono_runtime_invoke() to mono_method_get_unmanaged_thunk()" or "how to call class method that takes and returns a string via thunks"

2015-11-12 Thread Robert Jordan
On 12.11.2015 13:52, Jonathan Mitchell wrote: On 12 Nov 2015, at 12:41, Julian Mayer wrote: i didn't list any specific crash, because i tried in a million different ways and got a different crash each time. i've solved this now. it seems, a unmanaged thunk takes a

Re: [Mono-list] [embedding] "moving from mono_runtime_invoke() to mono_method_get_unmanaged_thunk()" or "how to call class method that takes and returns a string via thunks"

2015-11-12 Thread Robert Jordan
Hi Jonathan, On 12.11.2015 14:34, Jonathan Mitchell wrote: On 12 Nov 2015, at 13:11, Robert Jordan <robe...@gmx.net> wrote: On 12.11.2015 13:52, Jonathan Mitchell wrote: On 12 Nov 2015, at 12:41, Julian Mayer <jul...@corecode.at> wrote: i didn't list any specific crash, bec

[Mono-list] Thunk generator

2015-11-12 Thread Robert Jordan
Hi! It seems that thunks are seldom used by the community due to lack of documentation and samples. They remain cumbersome to consume even when someone has accidentally found out how to use them ;) Here is a simple tool which generates C/C++ code from an assembly whose members were marked with

Re: [Mono-list] Missing some symbols in Windows package.

2015-10-22 Thread Robert Jordan
On 22.10.2015 17:22, donggas90 wrote: How should I fix it? This is totally unrelated to Mono. Please check the docs of Assembly.Load(). AssemblyName is *not* a file name. Not "FullPath\__Intermediate.dll" and not "__Intermediate.dll". Just "__Intermediate". This is the (partial) assembly

Re: [Mono-list] Missing some symbols in Windows package.

2015-10-21 Thread Robert Jordan
On 21.10.2015 11:53, donggas90 wrote: Thanks again, Robert. I already known about that jit init and cleanup have to call only once. and I'd tried the scheme what you said. It's not quite what I wrote. You're not handling domain creation inside the managed world. You may want to search the

Re: [Mono-list] Missing some symbols in Windows package.

2015-10-20 Thread Robert Jordan
On 20.10.2015 06:37, donggas90 wrote: Thanks, moljac. That's reasonable. Ultimately, my purpose is that edit C#, recompile it and invoke it in C++ runtume with the Mono API. so I had found some article about it in this forum such as this

Re: [Mono-list] Missing some symbols in Windows package.

2015-10-16 Thread Robert Jordan
On 16.10.2015 09:47, donggas90 wrote: mono_thread_push_appdomain_ref mono_thread_pop_appdomain_ref and the other symbols in 'mono/metadata/threads-types.h' are missing in Windows(4.0.4.4). beacause the header had not included in the package. If this exclusion is normal, those symbols had not

Re: [Mono-dev] Problem with custim marshaller on list

2015-10-16 Thread Robert Jordan
Hey, On 15.10.2015 18:21, Guillaume wrote: when I call that method, I have this error: marshaling type 15 not implemented * Assertion: should not be reached at marshal.c:1952 The error most likely means that Mono's marshaller does not support generic types in structures supposed to be used

Re: [Mono-dev] Registry

2015-10-08 Thread Robert Jordan
On 08.10.2015 10:44, psant...@codicesoftware.com wrote: Hi there, Are you trying to run "on mono" or do you mean on mono + linux or mac? Mono's registry implementation is using native Windows APIs under Windows, so the concurrency issues Neale was speaking about do not apply here. Robert

Re: [Mono-list] Interop - PreserveSig

2015-10-04 Thread Robert Jordan
On 04.10.2015 00:25, lx42 wrote: So my question is, does mono respect PreserveSig? DllImportAttribute.PreserveSig = false is not supported. However, methods of COM interfaces do have "PreserveSig = false" semantics by default, unless they were marked with

Re: [Mono-list] COM Interop

2015-10-04 Thread Robert Jordan
On 03.10.2015 09:19, lx42 wrote: This is for Linux. Does Mono support COM interop now (just the base minimum, no things like dispatch, BSTR etc.)? The FAQ says no but it was referring to version 1.x. Have a look at this example: https://github.com/robert-j/MonoCom BSTRs are supported as

Re: [Mono-dev] boehm and pin to sgen and moveable

2015-10-04 Thread Robert Jordan
Hey Jonathan, On 03.10.2015 16:25, Jonathan Mitchell wrote: In my ObjC->Mono bridge I have been using the Boehm collector and pinned memory (as an expedient). I now want to move to SGEN and moveable memory. As a first step I have switched to SGEN and left pinning enabled. My ObjC code wraps a

Re: [Mono-dev] Class built by mono throws FileNotFoundException when run on windows

2015-09-02 Thread Robert Jordan
On 01.09.2015 22:04, Edward Ned Harvey (mono) wrote: The workaround I've found is to create a wrapper class MonoSpecific, so the if-clause and the Mono.Posix call are not in the same file. But this is clearly a hack. Is there a better way? You're depending on undefined behavior. The workaround

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-21 Thread Robert Jordan
On 21.08.2015 11:43, zebrajap wrote: Oh. I got your point. The build output have System.dll in multiple places. ./lib/mono/2.0/System.dll ./lib/mono/4.5/System.dll *./lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll* ./lib/mono/4.0/System.dll I was loading it from

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-21 Thread Robert Jordan
On 21.08.2015 06:44, zebrajap wrote: Now I am getting a different error. 104 MonoObject* pIcc = mono_runtime_invoke(pMethodCreateCompiler, pCodeProvider, NULL, NULL); (gdb) p pMethodCreateCompiler $1 = (MonoMethod *) 0x6aa288 (gdb) n Unhandled Exception:

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-20 Thread Robert Jordan
On 20.08.2015 11:17, zebrajap wrote: The build machine does not have mono installed. So I have copied the dlls from another similar machine to /home/sameeraj/assemblies/mono/1.0/. (I am not sure why I had to copy in to mono/1.0 but if I don't when the program runs it complains mscorlib should be

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-20 Thread Robert Jordan
On 19.08.2015 17:31, zebrajap wrote: Thanks Robert. It still does not work. Was it working in your case ? Now I begin to wonder if there are any issues with my system Please show us the code where you're initializing the runtime. Robert ___

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-19 Thread Robert Jordan
On 19.08.2015 08:39, zebrajap wrote: This code fails at MonoObject* pIcc = mono_runtime_invoke(pMethodCreateCompiler, pCodeProvider, NULL, NULL); line. What am I doing wrong. You're supposed to call mono_object_get_virtual_method () on the interface method prior to invoking it on a derived

Re: [Mono-dev] Embedded mono crash on exception

2015-08-06 Thread Robert Jordan
On 06.08.2015 08:12, Trigve wrote: I'm using embedded mono (using unity) in C++ DLL. I'm calling some managed functions using mono_runtime_invoke(). The function does throw an exception, which I caught with the MonoException argument. Then I want to unwind stack (in C++) so I throw my custom

Re: [Mono-list] Monodevelop made application not starting on ubuntu

2015-08-06 Thread Robert Jordan
On 06.08.2015 14:48, Edward Ned Harvey (mono) wrote: From: mono-list-boun...@lists.ximian.com [mailto:mono-list- boun...@lists.ximian.com] On Behalf Of Robert Jordan On 05.08.2015 18:40, Andres G. Aragoneses wrote: I hope you've considered the licensing implications. In particular, if you

Re: [Mono-list] Monodevelop made application not starting on ubuntu

2015-08-05 Thread Robert Jordan
On 05.08.2015 18:40, Andres G. Aragoneses wrote: I hope you've considered the licensing implications. In particular, if you distribute the mono runtime with an application, your application will need to be GPL. The runtime is LGPL. But AFAIU when you use mkbundle you're not linking anymore,

Re: [Mono-list] Mono Embedding - List enumeration

2015-07-28 Thread Robert Jordan
Hi, On 27.07.2015 19:53, Henry wrote: Can anyone shed some light on the best way to enumerate a List using mono embedding? I have a managed method that returns a List, I need to enumerate this list in c code using mono embedding. I can't seem to find any documentation or examples on this that

Re: [Mono-list] Anyone else missing reply-to?

2015-05-12 Thread Robert Jordan
On 12.05.2015 17:16, Maury Markowitz wrote: When I Reply it goes to the original poster, not the list. Looking at the headers it seems reply-to isn’t being sent to me. Is anyone else having this problem? Yes, but it isn't a problem. It's intentional.

Re: [Mono-list] Embedded API: Getting assembly version via MonoAssemblyName

2015-03-28 Thread Robert Jordan
On 28.03.2015 14:40, Robert Jordan wrote: There are a couple of *pubic* mono_assembly_name_* functions in Some public, too. Sorry! :) ___ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list

Re: [Mono-list] Embedded API: Getting assembly version via MonoAssemblyName

2015-03-28 Thread Robert Jordan
On 27.03.2015 13:44, Jonathan Mitchell wrote: HI I want to get the assembly version like so: MONO_API uint16_t mono_assembly_name_get_version (MonoAssemblyName *aname, uint16_t *minor, uint16_t *build, uint16_t *revision);

Re: [Mono-list] Mono Embedding: How can I use a Generic Class from mscorlib.dll

2015-03-23 Thread Robert Jordan
On 23.03.2015 15:13, LinWuxiang wrote: Hello everybody. How can I instantiate a generic type, like ListString from mscorlib? I thought I should use “mono_class_from_generic_parameter”, but not sure how to use this function. There used to be no embedding APIs for this in the past, and it

Re: [Mono-dev] Porting Mono to 'asm.js'

2015-03-15 Thread Robert Jordan
On 15.03.2015 10:59, Nirmal Lankathilaka wrote: I've been using Mono for developing desktop apps for a couple of years and would love to contribute to the project. Since I'm still a student, I think GSoC is a splendid opportunity to start. Porting Mono to `asm.js`, presented for GSoC, caught my

Re: [Mono-list] Debugging binding Obj-C?

2015-03-11 Thread Robert Jordan
On 11.03.2015 15:46, Michael McGlothlin wrote: I'm having problems binding a precompiled third party framework. I keep getting a dyld error about being unable to find the library but it only shows the error after I've done the binding, added the library to a project, compiled the project and

Re: [Mono-list] Generic class and mono_class_from_name

2015-03-11 Thread Robert Jordan
On 10.03.2015 20:24, mimi wrote: c++ MonoClass* classDictionary = NULL; classDictionary = mono_class_from_name(image, TestDictionary, Class1); I compiled TestDictionary.dll and Playstkop.Toolbox.exe. classDictionary returns NULL. I digged into mono_class_from_name and

Re: [Mono-list] Could not lookup zero argument constructor for class Ninject.StandardKernel

2015-03-06 Thread Robert Jordan
On 05.03.2015 23:18, mimi wrote: Thanks Robert! It worked out but I got another problem. classDictionary = mono_class_from_name(mono_get_corlib(), System.Collections.Generic, Dictionary' 2); NULL It's Dictionary`2. Notice the backtick. classDictionary =

Re: [Mono-list] Could not lookup zero argument constructor for class Ninject.StandardKernel

2015-03-05 Thread Robert Jordan
On 04.03.2015 20:04, mimi wrote: For Mono, if I insert 'mono_runtime_object_init(instanceStandardKernel)', we are trying to execute default argument-less ctor of StandardKernel that doesn't exist and I got the error which is normal. Here, how Mono will parse 'new StandardKernel()'? Default

Re: [Mono-list] Could not lookup zero argument constructor for class Ninject.StandardKernel

2015-03-04 Thread Robert Jordan
On 03.03.2015 21:57, mimi wrote: I embedded Mono to my c++ code and tested with basic stuffs (invoke c# methods wiht parameters and from multiple DLLs). I am trying to add Ninject stuff to my code (https://github.com/ninject/Ninject/blob/master/src/Ninject/StandardKernel.cs). The following is

Re: [Mono-list] Open multiple c# dlls inside the same MonoDomain

2015-02-27 Thread Robert Jordan
On 26.02.2015 15:51, mimi wrote: Hi, I am trying to embed Mono in my Qt app. In my c++ code, I managed to invoke the methods of a single c# dll. Right now, I need to invoke the methods from one c# dll which, in turn, invoke the methods from other c# dll, how can I implement this in my c++ code?

Re: [Mono-list] Help with embedded mono: mono_runtime_object_init

2015-02-24 Thread Robert Jordan
On 24.02.2015 18:19, mimi wrote: Hi Rod, Did you manage to fix the problem? I made some research and it seems to be fixed already (https://bugzilla.xamarin.com/show_bug.cgi?id=12541). In that link, it marks PC Linux. I got the same problem here on os x 10.8.5 and can't figure out why. Any idea?

Re: [Mono-dev] What will happen if Dispose() hangs?

2015-01-27 Thread Robert Jordan
On 27.01.2015 18:56, Edward Ned Harvey (mono) wrote: From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list- boun...@lists.ximian.com] On Behalf Of Robert Jordan You may want to look up how a sane IDisposable pattern has to be sensibly implemented in .NET. You'll find out

Re: [Mono-dev] What will happen if Dispose() hangs?

2015-01-27 Thread Robert Jordan
On 27.01.2015 15:46, Edward Ned Harvey (mono) wrote: The question still stands about what happens if Dispose() hangs during garbage collection... You may want to look up how a sane IDisposable pattern has to be sensibly implemented in .NET. You'll find out that Dispose() shouldn't be

Re: [Mono-list] Specific thread for event?

2015-01-12 Thread Robert Jordan
On 12.01.2015 08:53, Michael McGlothlin wrote: Obviously something has been done with iOS to make it possible to access the main thread. Am I missing something or is this pretty much a deadend? In iOS (and many other UI frameworks), the main thread runs a message/event loop which provides

Re: [Mono-dev] monolite URL

2014-12-11 Thread Robert Jordan
On 11.12.2014 07:33, Alex J Lennon wrote: The thing to keep in mind is that the corlib version inside monolite needs to match the runtime version or bootstrapping the classlib build won't work, so you can't just keep an old monolite and use it to build newer Mono (at least that's how I

Re: [Mono-list] Differences in GetHashCode() of Type between .NET and Mono

2014-12-08 Thread Robert Jordan
On 08.12.2014 09:21, Hüning, Christian wrote: However I found that Mono and .NET produce different hashcodes for the same type from the same DLL. On second thought, this is very clear to me, since up to recently we could have no idea how the GetHashCode() implementation in .NET looks like.

Re: [Mono-dev] List of cleanup candidates for Mono 4.0

2014-11-27 Thread Robert Jordan
On 27.11.2014 19:19, Alexander Köplinger wrote: Hey, * gmcs/dmcs - they just redirect to mcs now and without the 2.0 etc profiles it doesn't make sense to still have them It doesn't make sense to us, but removing them would just break thinks downstream. It's really annoying when such changes

Re: [Mono-dev] .NET Reference source terminology

2014-11-23 Thread Robert Jordan
On 23.11.2014 12:57, Martin Thwaites wrote: Hi All, Has anyone got any idea what FEATURE_PAL is? It's a define, and seems to have a lot of comments around IIS, and that if it's Enabled, then don't do IIS stuff. Seems like something that we could just add in our stuff to exclude alot of

Re: [Mono-dev] Webapp stuck with Key duplication when adding: httpModules

2014-10-23 Thread Robert Jordan
On 23.10.2014 13:25, Etienne Champetier wrote: After some more investigation, reading many lines of code with a collegue, we came to the conclusion that this exception is impossible :) (yet the web is stuck on it) Are you sure that this NameObjectCollection isn't mistakenly accessed from

Re: [Mono-dev] Unit Testing process: Community Contributions

2014-10-21 Thread Robert Jordan
On 21.10.2014 13:05, Edward Ned Harvey (mono) wrote: From: Miguel de Icaza [mailto:mig...@xamarin.com] There is no need to presume, the actual issue was just articulated on a thread, please read it. Pull requests do not work well with Mono. They need to be discussed in the mailing list Did

Re: [Mono-list] System.IO.Package

2014-10-16 Thread Robert Jordan
On 16.10.2014 15:09, Maury Markowitz wrote: So does anyone know of a PCL/Mono compatible ZIP library along those lines? DotNetZip: http://dotnetzip.codeplex.com/ Robert ___ Mono-list maillist - Mono-list@lists.ximian.com

Re: [Mono-dev] Resx files in Mono

2014-10-09 Thread Robert Jordan
On 08.10.2014 23:05, Martin Thwaites wrote: I've tried adding a reference to it, and I can't find that assembly, even in the mono directories. So the question is, does compiling Resx files work in mono? It does. The long story: Microsoft has implemented the ResX support in the

Re: [Mono-list] mono_runtime_invoke crash

2014-09-14 Thread Robert Jordan
On 13.09.2014 22:30, tbrooks wrote: I've broken everything down to an extremely simple test, this crashes for me about every other run with an access violation 0x0C (so a null pointer somewhere in mono_runtime_invoke). It seems related to Console.WriteLine; if it is removed the crashing

Re: [Mono-dev] mono_fntptr_to_delegate

2014-08-08 Thread Robert Jordan
Bruno, Marshal.GetDelegateFromFunctionPointer() and mono_ftnptr_to_delegate only work on functions with p/invoke-compatible signatures. This means that you can't pass MonoObjects* to these functions. You can only declare and pass p/invoke-compatible arguments. There is also no *this* pointer

Re: [Mono-list] Embedded API: calling explicit interface properties

2014-07-15 Thread Robert Jordan
On 15.07.2014 13:24, Jonathan Mitchell wrote: Hi I have a class that implements the following two interfaces and I am having trouble accessing explicit interface properties via the embedded API. My unit tests fail (see below). The explicit interface properties are found okay but the property

Re: [Mono-dev] Developing Mono

2014-05-13 Thread Robert Jordan
On 14.05.2014 00:55, Martin Thwaites wrote: So I've given in, and I'm now looking at using linux (ubuntu 14.04) to try and add some things to mono. I have the same issues with loading the net_4_5.sln file in MD as I do in VS, in that it won't compile. I'm assuming that the solution itself is

Re: [Mono-list] The assembly mscorlib.dll was not found or could not be loaded

2014-05-13 Thread Robert Jordan
On 13.05.2014 11:28, cocowalla wrote: I've discovered that mono is using mscorlib from `\lib\mono\4.5`, rather than `\lib\mono\4.0`. Now, `xbuild` is in `\lib\mono\4.5`, but my project targets .NET 4.0. Any ideas as to what is going on here? Try to preset a specific runtime version while

Re: [Mono-list] The assembly mscorlib.dll was not found or could not be loaded

2014-05-13 Thread Robert Jordan
On 13.05.2014 14:56, cocowalla wrote: I should have said I was using `--runtime=v4.0` when trying to run it. I tried the 2 difference versions you suggested, but get this for both: System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral,

Re: [Mono-list] Get binary directory in an mkbundle'd app

2014-05-12 Thread Robert Jordan
On 10.05.2014 23:35, cocowalla wrote: Yes, I'm afraid it's another mkbundle question :) I have an mkbundle'd app, and I need to get the directory of the binary (on Linux, if it matters). `Assembly.GetExecutingAssembly().CodeBase` doesn't work - it gives the path from where the binary was

Re: [Mono-list] Get binary directory in an mkbundle'd app

2014-05-12 Thread Robert Jordan
On 12.05.2014 11:25, cocowalla wrote: Great, I'll give this a try! Any idea how to achieve the same on Solaris? Hmm, IIRC it's /proc/$pid/path/a.out where $pid is the output of getpid(2). BTW, I wonder how long it takes to figure out that mkbundle is not suitable for complex applications

Re: [Mono-list] Creating a new AppDomain with mkbundle'd app

2014-05-07 Thread Robert Jordan
On 06.05.2014 23:15, cocowalla wrote: Is it possible to create a new AppDomain with an mkbundle'd app? In this particular case it's enough if the original assembly exists in the file system. A 0 bytes file will do the trick. You might want to file a bug stating that

Re: [Mono-list] How to use SSL with HttpListener with an mkbundle'd Mono app

2014-04-23 Thread Robert Jordan
On 23.04.2014 13:40, cocowalla wrote: I have a .NET application built with Mono, that I've bundled into a native (Linux) executable using `mkbundle`. This is so that end users don't need to mess around and install Mono themselves. The application uses ServiceStack, which under the hood uses

Re: [Mono-list] mono-service for mkbundle'd apps?

2014-04-22 Thread Robert Jordan
On 20.04.2014 15:00, cocowalla wrote: I have a Windows service that I want to run with Mono on Linux. I can run it as a service using mono-service, and this works fine. I also want to mkbundle the application to ease deployment for end-users, so they don't need to faff about installing Mono

Re: [Mono-list] mkbundle and reference assemblies

2014-04-22 Thread Robert Jordan
On 22.04.2014 17:01, Chris Tacke wrote: I'm trying to mkbundle a pretty complex application that has a lot of reference assemblies, but mkbundle is having trouble finding those assemblies. For example, here's part of the output: --

Re: [Mono-list] How to pass an object as ref or out

2014-04-17 Thread Robert Jordan
On 17.04.2014 06:26, carmack2000 wrote: Hi Robert, Thanks for your tips but I still don't understand how to unbox a ref-type. It looks mono_object_unbox only can handle valuetype, not ref-type. So could you please write more lines of code of implementation for an example for this void

Re: [Mono-list] How to pass an object as ref or out

2014-04-17 Thread Robert Jordan
On 17.04.2014 16:55, carmack2000 wrote: After I followed your code I got this error: Unhandled exception at 0x100b8c87 in MonoScriptingTest.exe: 0xC005: Access violation reading location 0x. I'll look into this. You said 'This is no better than the former non-ref version.' If I want

Re: [Mono-list] How to pass an object as ref or out

2014-04-17 Thread Robert Jordan
On 17.04.2014 18:33, Robert Jordan wrote: On 17.04.2014 16:55, carmack2000 wrote: After I followed your code I got this error: Unhandled exception at 0x100b8c87 in MonoScriptingTest.exe: 0xC005: Access violation reading location 0x. I'll look into this. You said 'This is no better

Re: [Mono-list] Mono on wikipedia

2014-04-17 Thread Robert Jordan
On 17.04.2014 10:29, BrayanA wrote: Hi, in Companies Using Mono page of mono-project website http://mono-project.com/Companies_Using_Mono Wikipedia is listed under Web Projects Using Mono. This is the exact text: WikiPedia uses Mono for its search facilities. The indexing and the actual

Re: [Mono-list] How to pass an object as ref or out

2014-04-16 Thread Robert Jordan
On 16.04.2014 22:31, carmack2000 wrote: I use mono_object_unbox to get an object instance (Vector2) passed from C# to C++. C++ __declspec(dllexport) void SetPosition(MonoString* ms, MonoObject* mo) { Vector2 pos = *(Vector2*)mono_object_unbox(mo); } C#

Re: [Mono-dev] .exe referencing itself ...

2014-04-10 Thread Robert Jordan
On 10.04.2014 13:59, etienne.champet...@free.fr wrote: It's looking for itself ... If I put it in the gac, it works, but is there a way to not put it in the gac? I'm building it with xbuild /p:Configuration=Release /target:rebuild, but it's the same with the Makefile (make install install it

Re: [Mono-dev] .exe referencing itself ...

2014-04-10 Thread Robert Jordan
On 10.04.2014 15:03, Robert Jordan wrote: On 10.04.2014 13:59, etienne.champet...@free.fr wrote: It's looking for itself ... If I put it in the gac, it works, but is there a way to not put it in the gac? I'm building it with xbuild /p:Configuration=Release /target:rebuild, but it's the same

Re: [Mono-dev] ***UNCHECKED*** Re: Ongoing Mono development / Mono roadmap

2014-04-09 Thread Robert Jordan
On 09.04.2014 23:17, Alex J Lennon wrote: A key component of what I was told toay is that Xamarin are unable to work on Mono due to contractual obligations to Attachmate. As a result they are (I am told) abandoning Mono and doing something else which is the (presumably) VM underneath the

Re: [Mono-list] Regression in WinForms support

2014-04-09 Thread Robert Jordan
On 08.04.2014 11:40, Baltasar García Perez-Schofield wrote: Hi, there. While trying to execute my app using WinForms (created with Mono and MonoDevelop, and working just right up until now), I have stumbled with this, using Windows 7: == Unhandled exception: ...snip... missing

Re: [Mono-list] Fun and games with Sqlite and System.Reflection

2014-04-09 Thread Robert Jordan
How about checking whether the IgnoreAttribute is applied to the property? for (int i = 0; i properties.Length - 1; i++) { // ignore props marked with [Ignore] if (properties[i].GetCustomAttributes(typeof(IgnoreAttribute), false).Length 0) next; } Robert On

Re: [Mono-list] Embedding Mono - A question about mono.dll

2014-03-10 Thread Robert Jordan
On 10.03.2014 06:34, KareemErgawy wrote: Hi, I want to use Mono as a scripting engine in a project (game engine) I am working on. I started reading the guide at: http://www.mono-project.com/Embedding_Mono. Starting with the first step Compiling and Linking, I created the mono.lib file as

Re: [Mono-dev] Library path bug in Makefile?

2014-03-05 Thread Robert Jordan
On 05.03.2014 15:31, Edward Ned Harvey (mono) wrote: It is a safe conclusion to draw, that *whatever* is specified by --libdir=DIR, the binary should be linked against libraries in that directory. (If not specified, libdir is derived from --exec-prefix=EPREFIX, which is derived from

Re: [Mono-list] Embedded API. Numeric Boxing and GC

2014-02-25 Thread Robert Jordan
On 25.02.2014 11:20, jonat...@mugginsoft.com wrote: I box my numeric primitives using a macro: #define DB_BOX_INT64( x ) ( mono_value_box(mono_domain_get(), mono_get_int64_class(), x) ) And use it like so: 1. - (void)box { MonoObject *monoObject = DB_BOX_INT64(value); } I save the

Re: [Mono-dev] Strange Crash with mono-3.2.3 + Qt-5.2.1

2014-02-17 Thread Robert Jordan
On 14.02.2014 21:35, Frank Fuchs wrote: I first noticed with my Qt based application and a 64 bit build of mono-3.2.3. However, I confirmed the very same problem with the offical binary releases fo Qt-5.2.1 (mingw) and mono-3.2.3. An application which embedds mono and initializes the runtime

Re: [Mono-aspnet-list] Mono keeps running old version, why?

2014-02-11 Thread Robert Jordan
On 11.02.2014 00:53, patrykmoura wrote: After installed via whm (mono 2), ive installed mono via this post here (1st answer): http://stackoverflow.com/questions/13184384/mono-3-0-0-build-on-centos-6 But when i ran a .net 3.5 script, ive seen that the error cames up, and in the footer i have

Re: [Mono-dev] Windows.Forms broken on Windows

2014-02-02 Thread Robert Jordan
On 01.02.2014 20:27, Frank Fuchs wrote: The offical mono-package (32 bit for Windows) from mono-project.com seem broken when it comes to Windows.Form apps. I tested the following for mono-3.0.10 and mono-3.2.3, with Windows 7 Professional 64bit. using System; using System.Windows.Forms; class

Re: [Mono-dev] Windows.Forms broken on Windows

2014-02-02 Thread Robert Jordan
On 02.02.2014 15:12, Robert Jordan wrote: This is caused by a wrong dll-map: dllmap dll=gdiplus target=@prefix@/lib/libgdiplus@libsuffix@ / dllmap dll=gdiplus.dll target=@prefix@/lib/libgdiplus@libsuffix@ / in $prefix/etc/mono/config. It should read dllmap dll=gdiplus target=@prefix@/lib

Re: [Mono-list] PDF generation

2014-01-10 Thread Robert Jordan
On 10.01.2014 13:21, jonat...@mugginsoft.com wrote: What PDF manipulation libraries are currently used by the Mono community? I have turned up: 1. itextsharp 2. pdfjet The popular pdfsharp is, it would seem, .NET only. iTextSharp can be used w/out any modifications under Mono. It just

Re: [Mono-dev] DllImport(__Internal) and libMonoPosixHelper static build

2014-01-03 Thread Robert Jordan
On 31.12.2013 10:34, mobin.seven wrote: Same here! Did you solve it? ralphbariz wrote Hi, I'm trying to compile a static one binary mono(Because the target system has an incompatible loader). First I got mono to build statically, but without libMonoPosixHelper in the archive. After a few

Re: [Mono-list] Data Protection

2014-01-03 Thread Robert Jordan
On 02.01.2014 15:15, Edward Ned Harvey (mono) wrote: In Windows, it's well documented what and how the DPAPI works. You can protect (encrypt) data to a specific user account (or machine)... And it's protected by the user's login credentials. How does this work in mono? If you use the

Re: [Mono-list] Mod_Mono crash * is not a valid virtual path - PLEASE help!

2013-12-19 Thread Robert Jordan
On 19.12.2013 03:56, acrym wrote: Please help! I will take any advice or suggestions! See https://bugzilla.novell.com/show_bug.cgi?id=509163 Robert ___ Mono-list maillist - Mono-list@lists.ximian.com

Re: [Mono-list] MKBundle and dllmaps

2013-12-18 Thread Robert Jordan
On 18.12.2013 13:10, James Nugent wrote: Hi All, I’m trying to build a package with mono statically linked - so far so good, I have an executable which works without mono being installed, but to achieve this I still need a dllmap for System.dll - currently that file looks like this: $ cat

Re: [Mono-list] crash in mono_jit_cleanup

2013-11-17 Thread Robert Jordan
On 16.11.2013 17:26, jonat...@mugginsoft.com wrote: My work around is to not call mono_jit_cleanup() at all. I terminate Mono when I terminate my app so I presume that nothing untoward can occur. If your app is depending on finalizers being executed at shutdown, then in place of

Re: [Mono-dev] Socket.IsBound wrong behavior

2013-11-12 Thread Robert Jordan
On 12.11.2013 11:29, Stifu wrote: Yeah, sometimes classes are in unexpected folders. Socket isn't under System.Net, but just System, for some reason. The reason is that Socket is implemented in the System assembly. $(Assembly)/$(Namespace)/$(Class).cs = System/System.Net.Sockets/Socket.cs

Re: [Mono-dev] mono mkbundle made file is Not working

2013-11-05 Thread Robert Jordan
On 03.11.2013 08:58, mobin.seven wrote: I tried to bundle my app with mkbundle command due to this help: http://www.mono-project.com/Guide:Running_Mono_Applications#Bundles http://www.mono-project.com/Guide:Running_Mono_Applications#Bundles but I don't understand this part of this doc: With

Re: [Mono-dev] why does DateTime.Now.IsDaylightSavingTime() returns false when it should be true.

2013-10-28 Thread Robert Jordan
On 28.10.2013 07:35, Alistair Bush wrote: I am trying to figure out why exactly running DateTime.Now.IsDaylightSavingTIme() returns false. I live in the Auckland/Pacific timezone and pretty much everywhere I look it confirms that yes it is daylight saving time. Unfortunately, I don't remember

Re: [Mono-list] Embedded API: create System.NullableT

2013-10-24 Thread Robert Jordan
Jonathan, On 23.10.2013 17:37, jonat...@mugginsoft.com wrote: What is the recommended way to create an instance of a nullable type, such as System.Nullableint64? I would prefer a method that used the embedded API as opposed to a C# helper method. There is still no API for this, AFAIK, so

Re: [Mono-dev] Embedded API: mono_array_element_size issue

2013-10-02 Thread Robert Jordan
Jonathan, On 02.10.2013 12:21, jonat...@mugginsoft.com wrote: The following raises so I presume that I have used it incorrectly: MonoClass *arrayClass = mono_get_byte_class(); int32_t elementSize = mono_array_element_size(arrayClass); * Assertion at class.c:8201, condition `ac-rank'

Re: [Mono-list] [Mono-dev] Embedded API: mono_array_element_size issue

2013-10-02 Thread Robert Jordan
Jonathan, On 02.10.2013 15:34, jonat...@mugginsoft.com wrote: I am vaguely confused by the usage of the MonoClass here and elsewhere. I have an object, monoArray, yet to query it I require a class reference. This sort of logic wouldn't generally apply in an OOP environment (certainly not in

  1   2   3   4   5   6   7   8   9   10   >