网站首页  词典首页

请输入您要查询的函数:

 

术语 netunjoindomain
释义 NetUnjoinDomain
语法:
C++
NET_API_STATUS NetUnjoinDomain(
__in LPCWSTR lpServer,
__in LPCWSTR lpAccount,
__in LPCWSTR lpPassword,
__in DWORD fUnjoinOptions
);
NetUnjoinDomain功能
该NetUnjoinDomain函数unjoins从一个工作组或域的计算机。
参数
lpServer [in]
一个常量字符串,它指定的DNS或NetBIOS计算机上的功能是执行名称的指针。如果该参数为NULL,则使用本地计算机。
lpAccount [in]
一个字符串常量,指定的帐户时所使用的名称连接到域控制器的指针。该字符串必须指定一个域的NetBIOS名称和用户帐户(例如,雷德蒙德\\用户)或用户主要名称(UPN)在一个互联网的形式向用户式(例如登录名,“有人@例子。 com“的)。如果该参数为NULL,则调用方的上下文被使用。
lpPassword [in]
如果lpAccount参数指定的帐户名,此参数必须指向要使用的密码当连接到域控制器。否则,此参数必须为NULL。
fUnjoinOptions [in]
指定unjoin选择。如果这个参数是NETSETUP_ACCT_DELETE的帐户被禁用时,unjoin发生。请注意,此选项不会删除该帐户。目前,有没有其他unjoin选项定义。
返回值
如果函数成功,返回值是NERR_Success。
如果函数失败,返回值可以是下面的错误代码或系统错误代码之一。
返回codeDescription
ERROR_INVALID_PARAMETERA参数不正确。
NERR_SetupNotJoinedThe计算机目前没有加入到域。
NERR_SetupDomainControllerThis计算机是一个域控制器,不能从一个域unjoined。
备注
Unjoining(和加入)一台计算机到域或工作组可以执行只能由管理员成员在目标计算机上的本地组。如果调用NetUnjoinDomain函数远程,您必须提供凭据,因为您不能在这些情况下委托证书。
不同的过程,或同一进程不同线程,不应该调用同时NetUnjoinDomain功能。这种情况可能会留在不一致的状态计算机。
重新启动系统后,需要调用的操作来完成NetRenameMachineInDomain功能。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderLmjoin.h(包括Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
参见
网络管理概述
网络管理功能
NetJoinDomain
NetRenameMachineInDomain
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月13日
==英文原文==NetUnjoinDomain Function
The NetUnjoinDomain function unjoins a computer from a workgroup or a domain.
Syntax
C++
NET_API_STATUS NetUnjoinDomain(
__in LPCWSTR lpServer,
__in LPCWSTR lpAccount,
__in LPCWSTR lpPassword,
__in DWORD fUnjoinOptions
);
Parameters
lpServer [in]
A pointer to a constant string that specifies the DNS or NetBIOS name of the computer on which the function is to execute. If this parameter is NULL, the local computer is used.
lpAccount [in]
A pointer to a constant string that specifies the account name to use when connecting to the domain controller. The string must specify either a domain NetBIOS name and user account (for example, REDMOND\\user) or the user principal name (UPN) of the user in the form of an Internet-style login name (for example, "someone@example.com"). If this parameter is NULL, the caller's context is used.
lpPassword [in]
If the lpAccount parameter specifies an account name, this parameter must point to the password to use when connecting to the domain controller. Otherwise, this parameter must be NULL.
fUnjoinOptions [in]
Specifies the unjoin options. If this parameter is NETSETUP_ACCT_DELETE, the account is disabled when the unjoin occurs. Note that this option does not delete the account. Currently, there are no other unjoin options defined.
Return Value
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value can be one of the following error codes or one of the system error codes .
Return codeDescription
ERROR_INVALID_PARAMETERA parameter is incorrect.
NERR_SetupNotJoinedThe computer is not currently joined to a domain.
NERR_SetupDomainControllerThis computer is a domain controller and cannot be unjoined from a domain.

Remarks
Unjoining (and joining) a computer to a domain or workgroup can be performed only by a member of the Administrators local group on the target computer. If you call the NetUnjoinDomain function remotely, you must supply credentials because you cannot delegate credentials under these circumstances.
Different processes, or different threads of the same process, should not call the NetUnjoinDomain function at the same time. This situation can leave the computer in an inconsistent state.
A system reboot is required after calling the NetRenameMachineInDomain function for the operation to complete.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderLmjoin.h (include Lm.h)
LibraryNetapi32.lib
DLLNetapi32.dll
See Also
Network Management Overview
Network Management Functions
NetJoinDomain
NetRenameMachineInDomain
Send comments about this topic to Microsoft
Build date: 8/13/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa370644(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:21:22