Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WNetAddConnection -- Declaration?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00166668
Message ID:
00166731
Vues:
17
>Ahh... CASE sensitive -- that was it!
>
>Okay, now I can't get WNetGetConnection to return me anything useful (keep getting a return code of 487, which I believe is ERROR_INVALID_ADDRESS). Anyone have an example of this in use?
>
>I've been passing it "Q:"+CHR(0), for example, to see what teh Q: drive is mapped to.
>
>-- jas
Hi Jeff,

Assuming you already have the declaration:
lcbuffer = SPACE(200) + CHR(0)
lnsize = LEN(lcbuffer)
lcdevice = "Q:" + CHR(0)
lnerr = WNetGetConnection(@lcdevice, @lcbuffer, @lnsize)
If lnerr = 0 then no error occurred. However, if the drive isn't mapped you'll probably get an error. You can check using either GetLogicalDrives or GetLogicalDriveStrings.

hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform