The NetShareCheck function checks whether or not a server is sharing a device.
No special group membership is required to successfully execute NetShareCheck.
NET_API_STATUS NetShareCheck(
LPTSTR servername, | |
LPTSTR device, | |
LPDWORD type | |
); |
If the function returns account information, the return value is NERR_Success.
If the function fails, the return value is one of the following error codes.
Value |
Meaning |
ERROR_INVALID_LEVEL |
The value specified for the Level parameter is invalid. |
ERROR_NOT_ENOUGH_MEMORY |
Insufficient memory is available. |
NERR_DeviceNotShared |
The device is not shared. |