dotgnu-pnet
[Top][All Lists]
Advanced

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

RE : RE : RE : RE : [Pnet-developers] System.NotImplementedException whe


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

     Hi !

> However, I was unable to find any mention of 
> "SHGetFolderPath" in the MSVC documentation.  What .dll
> does it come from?  I did find a "SHGetSpecialFolderPath"
> function.  Since this function is *way* outside the core
> Win32 .dll's, it makes me a little uneasy about using it.
     You may find documentation on msdn.microsoft.com
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pl
atform/shell/reference/functions/shgetfolderpath.asp).
     This function is in "shell32.dll version 5.0 or later" and the minimum
operating systems are :
       - Windows 95 with Internet Explorer 5.0
       - Windows 98 with Internet Explorer 5.0
       - Windows 98 Second Edition (SE)
       - Windows NT 4.0 with Internet Explorer 5.0
       - Windows NT 4.0 with Service Pack 4 (SP4)
     I guess that this is okay for all non-CE Windows.  However, I do agree
that there seems to be a problem for Windows CE machines.  Maybe you could
protect the code I have submitted with a stronger #ifdef ?  On another hand,
I can send you an update that will link against shell32.dll only at runtime,
but there will be an important overhead on all calls to GetSpecialFolder...

> Just return null to the C# layer and do "if(value == null) return 
> String.Empty".  You'll get the shared string that way.
     That's the way I should have done it...

> In any case, since portable programs should *not* be using
> "GetFolderPath", the impact of extra string copies should
> be minimal.
     I have always recognized that the impact of such a use of String.Empty
would be minimal, it was just for the principle ;-) .

     Best regards,
          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]