Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
API Help!
Message
Information générale
Forum:
Visual Basic
Catégorie:
Fonctions API de Windows
Titre:
Divers
Thread ID:
00421727
Message ID:
00421829
Vues:
19
>>I'm using API GetSystemDirectory, it returns a Long. How I get the name of that long? I mean, how I get "c:\Windows\System"....
>>
>>Anyone knows the answer???
>>
>>Thanks.
>
>This way:
>
>
Private Declare Function GetSystemDirectory _
>                Lib "kernel32" _
>                Alias "GetSystemDirectoryA" _
>                (ByVal lpBuffer As String, _
>                 ByVal nSize As Long _
>                ) As Long
>
>Public function GetWindowsDir() as string
>Dim lngResult As Long
>Dim strDir As String
>
>   strDir = Space$(260)
>   lngResult = GetSystemDirectory(strDir, Len(strDir))
>   GetWindowsDir = Left$(strDir, lngResult)
>   MsgBox GetWindowsDir
>End Sub
I have just updated this API call in the API tab with this example.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform