Platform SDK: Network Management |
The NetGetJoinInformation function retrieves join status information for the specified computer.
No special group membership is required to successfully execute the NetGetJoinInformation function.
NET_API_STATUS NetGetJoinInformation( LPCWSTR lpServer, LPWSTR *lpNameBuffer, PNETSETUP_JOIN_STATUS BufferType );
typedef enum _NETSETUP_JOIN_STATUS { NetSetupUnknownStatus = 0, NetSetupUnjoined, NetSetupWorkgroupName, NetSetupDomainName } NETSETUP_JOIN_STATUS, *PNETSETUP_JOIN_STATUS;
These values have the following meanings.
Value | Meaning |
---|---|
NetSetupUnknownStatus | The status is unknown. |
NetSetupUnjoined | The computer is not joined. |
NetSetupWorkgroupName | The computer is joined to a workgroup. |
NetSetupDomainName | The computer is joined to a domain. |
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value can be the following error code or one of the Win32 error codes.
Value | Meaning |
---|---|
ERROR_NOT_ENOUGH_MEMORY | Not enough storage is available to process this command. |
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Lmjoin.h; include Lm.h.
Library: Use Netapi32.lib.
Network Management Overview, Network Management Functions, NetGetJoinableOUs