dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [DotGNU]PInvoke question...


From: Mark Easton
Subject: RE: [DotGNU]PInvoke question...
Date: Wed, 9 Jul 2003 23:46:05 +0100

Stupid me - of course you are right that Winelib doesn't run on PPC, or
anything other than x86 for that matter. 

Nonetheless, it doesn't really make any difference to what I'm trying to
do as I'm not actually trying to get the registry code working on MacOS,
but rather I'm just trying to get the code to throw a .NET exception
that I can handle gracefully.

Now it's certainly useful to know that dynlib.c is dealing with loading
dynamic libs and the error msg is certainly useful for answering stupid
emails from newbies like me.  However, I was under the assumption that
all error messages should be pushed through as .NET exceptions rather
than being written directly to the error stream?  

Now my big problem is that it doesn't seem to be throwing any kind of
.NET exception at the moment, so I guess I might have a little browse to
see how dynlib.c fits into the equation

M

-----Original Message-----
From: Gopal V [mailto:address@hidden 
Sent: 11 July 2003 07:23
To: address@hidden
Cc: Mark Easton
Subject: Re: [DotGNU]PInvoke question...

If memory serves me right, Mark Easton wrote:
> winelib installed on my MacOS X box, so when I run it with ilrun, I
get
> the following error message:

Does wine work on OS X ?.... I thought it was only for x86 ?... Binary
compatiblity and all that sort of thing ?

> libadvapi32.dylib: could not load dynamic library
> (NSObjectFileImageAccess)

pnet/support/dynlib.c:73
                        case NSObjectFileImageFormat:
                                msg = " (NSObjectFileImageFormat)";
break;
                        case NSObjectFileImageAccess:
                                msg = " (NSObjectFileImageAccess)";
break;
                        default:
                                msg = ""; break;
                }
                fprintf(stderr, "%s: could not load dynamic
library%s\n", name, msg);

does that answer your question ? 

> Now my code has a pair of try catch blocks that wrap all access to
> RegistryKey so what I'm wondering is why I'm getting the above error
> message rather than getting a DllNotFoundException or
TypeLoadException
> exception being raised?

If you really want to avoid seeing this ... we could put the fprintf
in some sort of #ifdef DYNLIB_DEBUG or something ... Personally I
kinda like to see some verbose output (especially when remote-debugging 
via email ;) rather than "Ok, it does nothing ... now what do I do ?"
mails ... 

And you should be getting a MissingMethodException there ...

Gopal
-- 
The difference between insanity and genius is measured by success




reply via email to

[Prev in Thread] Current Thread [Next in Thread]