Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drive letter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00099536
Message ID:
00103013
Vues:
29
>If I know the name of a server and the shared drive for example \\ntserver\drivec , how can I found out the drive letter that is assigned to it? Assuming that it maybe mapped differently on each Win95 workstation.
>
>Thanks
>Matt

Matt,

As George suggested you you should use the WNetGetConnection() API service. Here is the code of FOCUS.FLL function that does it for you.

FOCUSFNC FW_NET_GetConnection( XBASE_PARAMETERS )
/*---------------------------------------------*/{
char cRemoteName[MAX_PATH];
DWORD Len = MAX_PATH;

_initparc(1);
if (WNetGetConnection( _parc(1),(LPTSTR) cRemoteName,(LPDWORD) &Len ) == 0)
{
_retc( cRemoteName );
}
else
{
_retc( "" );
}
_deinitparc(1);
FOCUSFNCRETURN();
}

You can download FOCUS.FLL from the web site of FastWrite : http://www.FastWrite.com/Focus/Focusfll.htm

This library is free. Go for it.

Pat
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform