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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Pryor
Sent: Tuesday, October 26, 2004 3:47 PM
To: Tom Shelton
Cc: [EMAIL PROTECTED]
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 
> the
> error:
> 
> 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 
> 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  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to