>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.htmThis library is free. Go for it.
Pat