NetShareCheck

The NetShareCheck function checks whether or not a server is sharing a device.

Security Requirements

No special group membership is required to successfully execute NetShareCheck.

NET_API_STATUS NetShareCheck(

LPTSTR servername,  
LPTSTR device,  
LPDWORD type  
);  

Parameters

servername

Pointer to a Unicode string containing the name of the remote server on which the function is to execute. A NULL pointer or string specifies the local computer.

device

Pointer to a Unicode string containing the name of the device to check for shared access.

type

Pointer to an address that contains the type of device share. On return the address pointed to by the type parameter contains the type of share the device is offered with. This parameter is set only if the function returned successfully.

See Also

NetShareEnum, NetShareGetInfo