Expand Minimize

NetGetJoinInformation function

The NetGetJoinInformation function retrieves join status information for the specified computer.

Syntax


NET_API_STATUS NetGetJoinInformation(
  _In_   LPCWSTR lpServer,
  _Out_  LPWSTR *lpNameBuffer,
  _Out_  PNETSETUP_JOIN_STATUS BufferType
);

Parameters

lpServer [in]

Pointer to a constant string that specifies the DNS or NetBIOS name of the computer on which to call the function. If this parameter is NULL, the local computer is used.

lpNameBuffer [out]

Pointer to the buffer that receives the NetBIOS name of the domain or workgroup to which the computer is joined. This buffer is allocated by the system and must be freed using the NetApiBufferFree function. For more information, see Network Management Function Buffers and Network Management Function Buffer Lengths.

BufferType [out]

Receives the join status of the specified computer. This parameter can have one of the following values.


typedef enum _NETSETUP_JOIN_STATUS {

    NetSetupUnknownStatus = 0,
    NetSetupUnjoined,
    NetSetupWorkgroupName,
    NetSetupDomainName

} NETSETUP_JOIN_STATUS, *PNETSETUP_JOIN_STATUS;


These values have the following meanings.

ValueMeaning
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.

 

Return value

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 system error codes.

Return codeDescription
ERROR_NOT_ENOUGH_MEMORY

Not enough storage is available to process this command.

 

Remarks

No special group membership is required to successfully execute the NetGetJoinInformation function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Lmjoin.h (include Lm.h)

Library

Netapi32.lib

DLL

Netapi32.dll

See also

Network Management Overview
Network Management Functions
NetGetJoinableOUs

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.