mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NETAPI32] Add RPC binding code to remaining functions that require explicit binding
This commit is contained in:
parent
9525593660
commit
18a6d7c36f
1 changed files with 67 additions and 27 deletions
|
@ -211,8 +211,8 @@ NetAddAlternateComputerName(
|
||||||
_In_opt_ LPCWSTR DomainAccountPassword,
|
_In_opt_ LPCWSTR DomainAccountPassword,
|
||||||
_In_ ULONG Reserved)
|
_In_ ULONG Reserved)
|
||||||
{
|
{
|
||||||
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
|
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
|
||||||
handle_t BindingHandle;
|
handle_t BindingHandle = NULL;
|
||||||
NET_API_STATUS status;
|
NET_API_STATUS status;
|
||||||
|
|
||||||
TRACE("NetAddAlternateComputerName(%s %s %s %s 0x%lx)\n",
|
TRACE("NetAddAlternateComputerName(%s %s %s %s 0x%lx)\n",
|
||||||
|
@ -220,8 +220,14 @@ NetAddAlternateComputerName(
|
||||||
debugstr_w(DomainAccountPassword), Reserved);
|
debugstr_w(DomainAccountPassword), Reserved);
|
||||||
|
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
BindingHandle = NULL;
|
|
||||||
EncryptedPassword = NULL;
|
status = NetpBind(Server,
|
||||||
|
&BindingHandle);
|
||||||
|
if (status != NERR_Success)
|
||||||
|
{
|
||||||
|
ERR("NetpBind() failed (status 0x%lx)\n", status);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
|
@ -238,6 +244,8 @@ NetAddAlternateComputerName(
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
|
NetpUnbind(BindingHandle);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,15 +348,15 @@ NetGetJoinInformation(
|
||||||
NET_API_STATUS
|
NET_API_STATUS
|
||||||
WINAPI
|
WINAPI
|
||||||
NetGetJoinableOUs(
|
NetGetJoinableOUs(
|
||||||
_In_ LPCWSTR lpServer,
|
_In_opt_ LPCWSTR lpServer,
|
||||||
_In_ LPCWSTR lpDomain,
|
_In_ LPCWSTR lpDomain,
|
||||||
_In_ LPCWSTR lpAccount,
|
_In_opt_ LPCWSTR lpAccount,
|
||||||
_In_ LPCWSTR lpPassword,
|
_In_opt_ LPCWSTR lpPassword,
|
||||||
_Out_ DWORD *OUCount,
|
_Out_ DWORD *OUCount,
|
||||||
_Out_ LPWSTR **OUs)
|
_Out_ LPWSTR **OUs)
|
||||||
{
|
{
|
||||||
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
|
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
|
||||||
handle_t BindingHandle;
|
handle_t BindingHandle = NULL;
|
||||||
NET_API_STATUS status;
|
NET_API_STATUS status;
|
||||||
|
|
||||||
TRACE("NetGetJoinableOUs(%s %s %s %s %p %p)\n",
|
TRACE("NetGetJoinableOUs(%s %s %s %s %p %p)\n",
|
||||||
|
@ -356,8 +364,14 @@ NetGetJoinableOUs(
|
||||||
debugstr_w(lpPassword), OUCount, OUs);
|
debugstr_w(lpPassword), OUCount, OUs);
|
||||||
|
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
BindingHandle = NULL;
|
|
||||||
EncryptedPassword = NULL;
|
status = NetpBind(lpServer,
|
||||||
|
&BindingHandle);
|
||||||
|
if (status != NERR_Success)
|
||||||
|
{
|
||||||
|
ERR("NetpBind() failed (status 0x%lx)\n", status);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
|
@ -375,6 +389,8 @@ NetGetJoinableOUs(
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
|
NetpUnbind(BindingHandle);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,8 +456,8 @@ NetRemoveAlternateComputerName(
|
||||||
_In_opt_ LPCWSTR DomainAccountPassword,
|
_In_opt_ LPCWSTR DomainAccountPassword,
|
||||||
_In_ ULONG Reserved)
|
_In_ ULONG Reserved)
|
||||||
{
|
{
|
||||||
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
|
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
|
||||||
handle_t BindingHandle;
|
handle_t BindingHandle = NULL;
|
||||||
NET_API_STATUS status;
|
NET_API_STATUS status;
|
||||||
|
|
||||||
TRACE("NetRemoveAlternateComputerName(%s %s %s %s 0x%lx)\n",
|
TRACE("NetRemoveAlternateComputerName(%s %s %s %s 0x%lx)\n",
|
||||||
|
@ -449,8 +465,14 @@ NetRemoveAlternateComputerName(
|
||||||
debugstr_w(DomainAccountPassword), Reserved);
|
debugstr_w(DomainAccountPassword), Reserved);
|
||||||
|
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
BindingHandle = NULL;
|
|
||||||
EncryptedPassword = NULL;
|
status = NetpBind(Server,
|
||||||
|
&BindingHandle);
|
||||||
|
if (status != NERR_Success)
|
||||||
|
{
|
||||||
|
ERR("NetpBind() failed (status 0x%lx)\n", status);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
|
@ -467,6 +489,8 @@ NetRemoveAlternateComputerName(
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
|
NetpUnbind(BindingHandle);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,14 +498,14 @@ NetRemoveAlternateComputerName(
|
||||||
NET_API_STATUS
|
NET_API_STATUS
|
||||||
WINAPI
|
WINAPI
|
||||||
NetRenameMachineInDomain(
|
NetRenameMachineInDomain(
|
||||||
_In_ LPCWSTR lpServer,
|
_In_opt_ LPCWSTR lpServer,
|
||||||
_In_ LPCWSTR lpNewMachineName,
|
_In_opt_ LPCWSTR lpNewMachineName,
|
||||||
_In_ LPCWSTR lpAccount,
|
_In_opt_ LPCWSTR lpAccount,
|
||||||
_In_ LPCWSTR lpPassword,
|
_In_opt_ LPCWSTR lpPassword,
|
||||||
_In_ DWORD fRenameOptions)
|
_In_ DWORD fRenameOptions)
|
||||||
{
|
{
|
||||||
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
|
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
|
||||||
handle_t BindingHandle;
|
handle_t BindingHandle = NULL;
|
||||||
NET_API_STATUS status;
|
NET_API_STATUS status;
|
||||||
|
|
||||||
TRACE("NetRenameMachineInDomain(%s %s %s %s 0x%lx)\n",
|
TRACE("NetRenameMachineInDomain(%s %s %s %s 0x%lx)\n",
|
||||||
|
@ -489,8 +513,14 @@ NetRenameMachineInDomain(
|
||||||
debugstr_w(lpPassword), fRenameOptions);
|
debugstr_w(lpPassword), fRenameOptions);
|
||||||
|
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
BindingHandle = NULL;
|
|
||||||
EncryptedPassword = NULL;
|
status = NetpBind(lpServer,
|
||||||
|
&BindingHandle);
|
||||||
|
if (status != NERR_Success)
|
||||||
|
{
|
||||||
|
ERR("NetpBind() failed (status 0x%lx)\n", status);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
|
@ -507,6 +537,8 @@ NetRenameMachineInDomain(
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
|
NetpUnbind(BindingHandle);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -520,8 +552,8 @@ NetSetPrimaryComputerName(
|
||||||
_In_opt_ LPCWSTR DomainAccountPassword,
|
_In_opt_ LPCWSTR DomainAccountPassword,
|
||||||
_In_ ULONG Reserved)
|
_In_ ULONG Reserved)
|
||||||
{
|
{
|
||||||
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
|
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword = NULL;
|
||||||
handle_t BindingHandle;
|
handle_t BindingHandle = NULL;
|
||||||
NET_API_STATUS status;
|
NET_API_STATUS status;
|
||||||
|
|
||||||
TRACE("NetSetPrimaryComputerName(%s %s %s %s %lu)\n",
|
TRACE("NetSetPrimaryComputerName(%s %s %s %s %lu)\n",
|
||||||
|
@ -529,8 +561,14 @@ NetSetPrimaryComputerName(
|
||||||
debugstr_w(DomainAccountPassword), Reserved);
|
debugstr_w(DomainAccountPassword), Reserved);
|
||||||
|
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
BindingHandle = NULL;
|
|
||||||
EncryptedPassword = NULL;
|
status = NetpBind(Server,
|
||||||
|
&BindingHandle);
|
||||||
|
if (status != NERR_Success)
|
||||||
|
{
|
||||||
|
ERR("NetpBind() failed (status 0x%lx)\n", status);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
RpcTryExcept
|
RpcTryExcept
|
||||||
{
|
{
|
||||||
|
@ -547,6 +585,8 @@ NetSetPrimaryComputerName(
|
||||||
}
|
}
|
||||||
RpcEndExcept;
|
RpcEndExcept;
|
||||||
|
|
||||||
|
NetpUnbind(BindingHandle);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue