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.NotImplementedExc


From: Yannis BRES
Subject: RE : RE : RE : RE : RE : RE : [Pnet-developers] System.NotImplementedException when implementing Environment.GetSpecialFolder
Date: Thu, 24 Jul 2003 11:21:25 +0200

> 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).
    Okay, so if (Environment.OSVersion.Platform != PlatformID.Unix) then use
a DllImported function from shell32.dll else return String.Empty.
    Where should I implement that ?  Directly in System.Environement ?
Currently, this methods calls InfoMethods.GetSpecialFolder which is an
internal function.  Should I remove this internal method ?  If so, shall I
protect the code with an #if CONFIG_WIN32_SPECIFICS as in
Microsoft.Win32.Win32KeyProvider or would the if
(Environment.OSVersion.Platform != PlatformID.Unix) be enough ?
          Yannis


======================================================================
ESSI                                    http://www.essi.fr
Attaché Temporaire d'Enseignement et de Recherche
----------------------------------------------------------------------
INRIA  -  Equipe Mimosa                 http://www-sop.inria.fr/mimosa
Collaborateur Extérieur                 +33 (4) 92 38 79 67
----------------------------------------------------------------------
+33 (6) 60 38 79 52                     http://www.yannis.bres.name
======================================================================



reply via email to

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