mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:45:50 +00:00
[NETAPI32] Implement NetRegisterDomainNameChangeNotification() and NetUnregisterDomainNameChangeNotification().
This commit is contained in:
parent
5f235cc0cb
commit
c87482b1df
2 changed files with 54 additions and 2 deletions
|
@ -18,6 +18,38 @@ WINE_DEFAULT_DEBUG_CHANNEL(netapi32);
|
|||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NET_API_STATUS
|
||||
WINAPI
|
||||
NetRegisterDomainNameChangeNotification(
|
||||
_Out_ PHANDLE NotificationEventHandle)
|
||||
{
|
||||
HANDLE EventHandle;
|
||||
NTSTATUS Status;
|
||||
|
||||
TRACE("NetRegisterDomainNameChangeNotification(%p)\n",
|
||||
NotificationEventHandle);
|
||||
|
||||
if (NotificationEventHandle == NULL)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
EventHandle = CreateEventW(NULL, FALSE, FALSE, NULL);
|
||||
if (EventHandle == NULL)
|
||||
return GetLastError();
|
||||
|
||||
Status = LsaRegisterPolicyChangeNotification(PolicyNotifyDnsDomainInformation,
|
||||
NotificationEventHandle);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
CloseHandle(EventHandle);
|
||||
return NetpNtStatusToApiStatus(Status);
|
||||
}
|
||||
|
||||
*NotificationEventHandle = EventHandle;
|
||||
|
||||
return NERR_Success;
|
||||
}
|
||||
|
||||
|
||||
NET_API_STATUS
|
||||
WINAPI
|
||||
NetStatisticsGet(
|
||||
|
@ -83,6 +115,26 @@ NetStatisticsGet(
|
|||
}
|
||||
|
||||
|
||||
NET_API_STATUS
|
||||
WINAPI
|
||||
NetUnregisterDomainNameChangeNotification(
|
||||
_In_ HANDLE NotificationEventHandle)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
TRACE("NetUnregisterDomainNameChangeNotification(%p)\n",
|
||||
NotificationEventHandle);
|
||||
|
||||
if (NotificationEventHandle == NULL)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
Status = LsaUnregisterPolicyChangeNotification(PolicyNotifyDnsDomainInformation,
|
||||
NotificationEventHandle);
|
||||
|
||||
return NetpNtStatusToApiStatus(Status);
|
||||
}
|
||||
|
||||
|
||||
NET_API_STATUS
|
||||
WINAPI
|
||||
NetpNtStatusToApiStatus(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue