[Mono-list] P/Invoke question...
Tom Shelton
tom@mtogden.com
Tue, 26 Oct 2004 16:14:02 -0600
Jon...
Thanks for your reply... Boy am I an idiot. I am running this on Red =
Had
9, and only entering "program.exe". I'm so used to my Gentoo install, =
where
there is a startup script that registers mono exe's with the kernel, =
that I
forgot to do the "mono program.exe" thing. I realize this when I tried =
to
run a simple Hello, World app. Ok, p/invoke does work - at least for =
the
simple test app. The test app calling the data provider, is hanging - =
but
that's going to take a little debugging to figure out.
Thanks
Tom
-----Original Message-----
From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com] On Behalf Of Jonathan Pryor
Sent: Tuesday, October 26, 2004 3:47 PM
To: Tom Shelton
Cc: mono-list@lists.ximian.com
Subject: RE: [Mono-list] P/Invoke question...
On Tue, 2004-10-26 at 12:28, Tom Shelton wrote:
> Well, a it looks like there is more to this... I actually am getting=20
> the
> error:
>=20
> err:module:import_dll Library mscoree.dll (which is needed by
> L"F:\\dp\\test.exe") not found
> err:module:LdrInitializeThunk Main exe initialization for=20
> L"F:\\dp\\test.exe" failed, status c0000135
What platform are you running this on? It looks like you have =
Windows-style
drives and paths, which suggests you're on Windows.
How are you executing the program? Via "mono program.exe" or just
"program.exe"?
I suspect you're just doing "program.exe", and you DO NOT have .NET
installed. If this is the case, the reason is because .NET assemblies =
are
PE-formated object files, so Windows attempts to load the .exe as a =
normal
program. One of the dependent libraries is mscorlib.dll, and if you =
don't
have .NET installed, (1) this library won't be found, and (2) the =
program
won't launch, which is what you're seeing.
Bottom line, I don't think this is a P/Invoke issue, it's an =
installation
issue.
Fixes: install .NET, run your program as "mono program.exe", or =
contribute
support to Mono so that Mono behaves like .NET on Windows (allowing you =
to
use "program.exe" to launch your app).
- Jon
_______________________________________________
Mono-list maillist - Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list