Impossible de créer un raccourci !!!!!!!

cs_Gaelle Messages postés 41 Date d'inscription lundi 1 avril 2002 Statut Membre Dernière intervention 7 mars 2004 - 23 sept. 2002 à 14:29
cs_rene38 Messages postés 1858 Date d'inscription samedi 29 juin 2002 Statut Membre Dernière intervention 17 octobre 2013 - 23 sept. 2002 à 18:52
Voici mon problème j'utilise la fonction FCreateShellLink de Vb6stkit.dll mais j'ai une erreur de point d'entrée.

Voici ma déclaration :
Option explicit
Private Declare Function FCreateShellLink Lib "VB6stkit.dll" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArguments As String) As Long

'Ensuite ds un evt bouton_click je l'appelle
Private Sub Command1_Click()
Dim res As Integer

res = FCreateShellLink ("c:", "TestRaccourci", "c:\Gestion\BD.mdb", "")

End Sub

Merci à tous ceux qui pourront m'aider !!!
Gaëlle

2 réponses

MysTiK74 Messages postés 32 Date d'inscription vendredi 23 août 2002 Statut Membre Dernière intervention 7 mars 2003
23 sept. 2002 à 17:27
Adieu p'tit

Si la declaration de ta fonction est bonne elle retourne un "long" qui ne rentre pas forcément dans un "integer" comme "Res"

A r'vi pa...

Partager ce qu'on sait c'est laisser une trace de notre passage...
0
cs_rene38 Messages postés 1858 Date d'inscription samedi 29 juin 2002 Statut Membre Dernière intervention 17 octobre 2013 11
23 sept. 2002 à 18:52
Public Declare Function OSfCreateShellLink Lib "vb6stkit.dll" Alias "fCreateShellLink" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArguments As String, ByVal fPrivate As Long, ByVal sParent As String) As Long

Arguments=""
RetourFonction = OSfCreateShellLink(Chemin_du_raccourci & vbNullChar, NomduProgramme, Chemin_et_Nom_du_programme, Arguments & vbNullChar, True, DossierParentDuDossierProgramme)
0
Rejoignez-nous