cs_Willi
Messages postés2375Date d'inscriptionjeudi 12 juillet 2001StatutModérateurDernière intervention15 décembre 2018
-
18 mai 2006 à 15:59
cs_Willi
Messages postés2375Date d'inscriptionjeudi 12 juillet 2001StatutModérateurDernière intervention15 décembre 2018
-
18 mai 2006 à 17:06
Bonjour amis CSharpiens,
D'après la msdn en vb.net je déclare SHSetFolderPath de cette manière:
Private
Declare
Unicode
Function SHSetFolderPathW
Lib
"shell32"
Alias
"#232" (
ByVal csidl
As
Integer,
ByVal hToken
As
Integer,
ByVal dwFlags
As
Integer,
ByVal pszPath
As IntPtr)
As
Integer
En C# je ne vois pas comment la déclarer.
Quelqu'un à t-il une idée ?
Lutinore
Messages postés3246Date d'inscriptionlundi 25 avril 2005StatutMembreDernière intervention27 octobre 201241 18 mai 2006 à 16:50
lol je viens de lire ça dans la MSDN.. bon attends alors..
Remarks
SHSetFolderPath is not exported by name from Shell32.dll. To use the function, you must call GetProcAddress with ordinal 231 for SHSetFolderPathA (for ANSI strings) or ordinal 232 for SHSetFolderPathW (for Unicode strings) to obtain a function pointer.
It is recommended that the paths be expressed as Unicode strings because folder names may contain Unicode characters not expressible in ANSI.
cs_Willi
Messages postés2375Date d'inscriptionjeudi 12 juillet 2001StatutModérateurDernière intervention15 décembre 201822 18 mai 2006 à 17:02
Sa aurait été simple si la déclaration pour SHSetFolderPath se faisait de cette manière en c#.
Mais il est bien dit dans la msdn que SHSetFolderPath dans Shell32 n'a pas de point d'entrée par ce nom.
C'est pourquoi j'ai utiliser l'ordinal 232 dans ma déclaration vb.