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(
LPWSTR servername,
LPWSTR 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. |
Windows NT: Requires version 3.1 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in lmshare.h.
Import Library: Use netapi32.lib.
Networking (Net) Overview, Net Functions, NetShareEnum, NetShareGetInfo