Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-19 Thread Jonathan Pryor
On Jan 18, 2011, at 4:52 PM, mike wrote: Hey Jonathan P, I noticed that u wrote the 'Interop with Native Libraries' article on the mono web site. Very good stuff. I have a question, can mono link or inter op to a Linux static library instead of a shared object? (i.e mylib.a) _Maybe_. :-)

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-18 Thread mike
Hey Jonathan P, I noticed that u wrote the 'Interop with Native Libraries' article on the mono web site. Very good stuff. I have a question, can mono link or inter op to a Linux static library instead of a shared object? (i.e mylib.a) -- View this message in context:

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-17 Thread mike
Hey John, thanks for the reply. I was compiling the c# test app and test dlls above from within Visual Studio 2005, taking default options. Options listed below, although seems this is OBE for you now The PATH variable was one of the first things that I checked when I first ran into this

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-17 Thread mike
Update: In putting together the sample code for the above, I was able to finally get past this error by setting the PATH variable for *every* sub directory path required in the search path. For some reason, this was not required while running under .NET. example: set

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-07 Thread Jonathan Pryor
On Jan 6, 2011, at 5:13 PM, mike wrote: Thanks for the reply. Not sure what you mean as I'm not doing a LoadLibrary(). Yes, you are: it's implicit to P/Invoke. (OK, so .NET is doing it on your behalf under the covers, but a LoadLibrary() is still occurring.) Since you're on Windows,

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-06 Thread nekresh
On Wed, Jan 5, 2011 at 8:04 PM, mike mgu...@knology.net wrote: Not sure what you mean.  Actually, I was just refreshing the thread.  ;-) See previous post and example code, If I p/Invoke to a single native dll, all is fine. However if that dll depends on a secondary native dll, I get an

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-06 Thread mike
Thanks for the reply. Not sure what you mean as I'm not doing a LoadLibrary(). Compile the sample code(s) above in this post for an example of how to produce the error. Note that the sample runs fine under the .NET 2.0 CLR on Windows and fails under mono 2.9 under Windows. I tried setting the

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-05 Thread mike
Anybody else see this while using P/Invoke under mono? -- View this message in context: http://mono.1490590.n4.nabble.com/File-not-found-error-when-using-Activator-CreateInstanceFrom-tp3064104p3175616.html Sent from the Mono - Dev mailing list archive at Nabble.com.

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-05 Thread Robert Jordan
On 05.01.2011 15:25, mike wrote: Anybody else see this while using P/Invoke under mono? They do not even relate, so no one else will see this ;) Please explain what you're trying to do. Robert ___ Mono-devel-list mailing list

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-05 Thread Tom Spink
Are you still talking about Windows-only here? -- Spink On 5 January 2011 14:25, mike mgu...@knology.net wrote: Anybody else see this while using P/Invoke under mono? -- View this message in context:

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2011-01-05 Thread mike
Not sure what you mean. Actually, I was just refreshing the thread. ;-) See previous post and example code, If I p/Invoke to a single native dll, all is fine. However if that dll depends on a secondary native dll, I get an unhandled exception: System.DLLNotFoundException. Again, this

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2010-12-24 Thread mike
Ok, rewrote to use p/Invoke with a true native DLL (extern C, no name mangling here, Jon) and it appears that I am back to *square one* with the 'File not found exception'. If I p/Invoke to a single native dll, all is fine. However if that dll depends on a secondary native dll, I get an

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2010-12-21 Thread mike
Very interesting Jon, I will look into this. Thanks again for your assistance. -- View this message in context: http://mono.1490590.n4.nabble.com/File-not-found-error-when-using-Activator-CreateInstanceFrom-tp3064104p3153343.html Sent from the Mono - Dev mailing list archive at Nabble.com.

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2010-12-21 Thread mike
For readers of this thread, a good link on mixed (native and managed code) assemblies can be found here) http://msdn.microsoft.com/en-us/library/x0w2664k%28v=vs.80%29.aspx -- View this message in context:

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2010-12-20 Thread mike
Right Jon, it is a mixed mode C++/CLI assembly and I am trying to create an instance of a managed C++ object within, which in turn, accesses the legacy 'native' C++ code (which is also within this assembly). Original problem on this thread was the 'file not found error'. Since another dll was

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2010-12-20 Thread Jonathan Pryor
On Dec 19, 2010, at 4:57 PM, mike wrote: For some reason, I thought we chose this CreateInstance() approach over the P/Invoke for performance reasons. If you have concerns about P/Invoke performance, you might consider looking into the System.Security.SuppressUnmanagedCodeSecurityAttribute

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2010-12-17 Thread Jonathan Pryor
On Dec 16, 2010, at 3:24 PM, mike wrote: Thanks for the reply. Here is an example attached driver (test.cs) which calls the Activator.CreateInstanceFrom(). Runs fine under NET 2.0 but bombs under mono 2.8 with the 'implement type compare for 1b!' error message. You will need to construct

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2010-12-16 Thread mike
Thanks for the reply. Here is an example attached driver (test.cs) which calls the Activator.CreateInstanceFrom(). Runs fine under NET 2.0 but bombs under mono 2.8 with the 'implement type compare for 1b!' error message. You will need to construct asmall native C++ dll with a matching class name

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2010-12-08 Thread mike
Update: Code runs fine under .NET 2.0. Also tried statically linking the second .dll to the first which alleviated the 'file not found' exception, however I am now getting a implement type compare for 1b! message and mono crashes! Has anyone seen this!?? -- View this message in context:

Re: [Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2010-12-08 Thread Rodrigo Kumpera
On Wed, Dec 8, 2010 at 12:39 PM, mike mgu...@knology.net wrote: Update: Code runs fine under .NET 2.0. Also tried statically linking the second .dll to the first which alleviated the 'file not found' exception, however I am now getting a implement type compare for 1b! message and mono

[Mono-dev] File not found error when using Activator.CreateInstanceFrom()

2010-11-29 Thread mike
I am using Activator.CreateInstanceFrom() and am getting a FileNotFoundException. The dll path is good and the file exists. Running mono 2.8 under windows 7 -64 bit. Anyone else seen this? -- View this message in context: