dotgnu-pnet
[Top][All Lists]
Advanced

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

Re: RE : RE : RE : RE : RE : [Pnet-developers] System.NotImplementedExce


From: Rhys Weatherley
Subject: Re: RE : RE : RE : RE : RE : [Pnet-developers] System.NotImplementedException when implementing Environment.GetSpecialFolder
Date: Thu, 24 Jul 2003 17:54:11 +1000
User-agent: KMail/1.4.3

On Thursday 24 July 2003 05:55 pm, Yannis BRES wrote:

>      If I guess well in assuming that PInvoke is similar to
> LoadLibrary+GetProcAddress (or dlopen+dlsym for Unix-speaking guys), well,
> we would have the overhead I have mentionned earlier, but I do understand
> your concern with reducing dependencies with non "ubiquitous" DLLs.

The runtime engine will finese the overhead a little - it will load the DLL on 
the first reference to the method.  On the second and subsequent calls, it 
will go directly there.

>      Would you want me to do that or do you have already taken over "my"
> code ?

Not yet. :-)  Got for it.

You can look at the "Microsoft.Win32.Win32KeyProvider" class for inspiration 
as to how to write the PInvoke logic.  You can also use 
"Environment.OSVersion" to detect if you are on Windows or Unix (If you 
aren't on Windows, then there's no point calling the PInvoke method).

Cheers,

Rhys.



reply via email to

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