[NETAPI32] Implement NetRegisterDomainNameChangeNotification() and NetUnregisterDomainNameChangeNotification().

This commit is contained in:
Eric Kohl 2018-12-15 17:17:14 +01:00
parent 5f235cc0cb
commit c87482b1df
2 changed files with 54 additions and 2 deletions

View file

@ -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(