Module: wine
Branch: master
Commit: b85df9aab0094209d15c9e3d44a8d8da4b588d7a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b85df9aab0094209d15c9e3d…
Author: Huw Davies <huw(a)codeweavers.com>
Date: Fri Jun 25 10:22:44 2021 +0100
nsi: Add stub implementations of NsiAllocateAndGetTable() and NsiFreeTable().
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/nsi/Makefile.in | 3 +++
dlls/nsi/nsi.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
dlls/nsi/nsi.spec | 4 ++--
include/wine/nsi.h | 28 ++++++++++++++++++++++++++++
4 files changed, 77 insertions(+), 2 deletions(-)
diff --git a/dlls/nsi/Makefile.in b/dlls/nsi/Makefile.in
index 634c4011ed9..68126cab6c6 100644
--- a/dlls/nsi/Makefile.in
+++ b/dlls/nsi/Makefile.in
@@ -2,3 +2,6 @@ MODULE = nsi.dll
IMPORTLIB = nsi
EXTRADLLFLAGS = -mno-cygwin
+
+C_SRCS = \
+ nsi.c
diff --git a/dlls/nsi/nsi.c b/dlls/nsi/nsi.c
new file mode 100644
index 00000000000..d55445a3dd7
--- /dev/null
+++ b/dlls/nsi/nsi.c
@@ -0,0 +1,44 @@
+/*
+ * Network Store Interface
+ *
+ * Copyright 2021 Huw Davies
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+#include "winsock2.h"
+#include "winternl.h"
+#include "ws2ipdef.h"
+#include "iphlpapi.h"
+#include "netioapi.h"
+#include "iptypes.h"
+#include "netiodef.h"
+#include "wine/nsi.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(nsi);
+
+DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWORD table, void **key_data, DWORD key_size,
+ void **rw_data, DWORD rw_size, void **dynamic_data, DWORD dynamic_size,
+ void **static_data, DWORD static_size, DWORD *count, DWORD unk2 )
+{
+ FIXME( "%d %p %d %p %d %p %d %p %d %p %d %p %d: stub\n", unk, module, table, key_data, key_size,
+ rw_data, rw_size, dynamic_data, dynamic_size, static_data, static_size, count, unk2 );
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+void WINAPI NsiFreeTable( void *key_data, void *rw_data, void *dynamic_data, void *static_data )
+{
+ FIXME( "%p %p %p %p: stub\n", key_data, rw_data, dynamic_data, static_data );
+}
diff --git a/dlls/nsi/nsi.spec b/dlls/nsi/nsi.spec
index 2d500d30e94..fc2db9e35c1 100644
--- a/dlls/nsi/nsi.spec
+++ b/dlls/nsi/nsi.spec
@@ -1,5 +1,5 @@
@ stub NsiAllocateAndGetPersistentDataWithMaskTable
-@ stub NsiAllocateAndGetTable
+@ stdcall NsiAllocateAndGetTable(long ptr long ptr long ptr long ptr long ptr long ptr long)
@ stub NsiCancelChangeNotification
@ stub NsiDeregisterChangeNotification
@ stub NsiDeregisterChangeNotificationEx
@@ -7,7 +7,7 @@
@ stub NsiEnumerateObjectsAllParametersEx
@ stub NsiEnumerateObjectsAllPersistentParametersWithMask
@ stub NsiFreePersistentDataWithMaskTable
-@ stub NsiFreeTable
+@ stdcall NsiFreeTable(ptr ptr ptr ptr)
@ stub NsiGetAllParameters
@ stub NsiGetAllParametersEx
@ stub NsiGetAllPersistentParametersWithMask
diff --git a/include/wine/nsi.h b/include/wine/nsi.h
new file mode 100644
index 00000000000..594d6f9ea5d
--- /dev/null
+++ b/include/wine/nsi.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2021 Huw Davies
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_NSI_H
+#define __WINE_NSI_H
+
+/* Undocumented Nsi api */
+DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWORD table, void **key_data, DWORD key_size,
+ void **rw_data, DWORD rw_size, void **dynamic_data, DWORD dynamic_size,
+ void **static_data, DWORD static_size, DWORD *count, DWORD unk2 );
+void WINAPI NsiFreeTable( void *key_data, void *rw_data, void *dynamic_data, void *static_data );
+
+#endif /* __WINE_NSI_H */
Module: wine
Branch: master
Commit: bfdf115cd6d17059fc1102ca5dce6ca9e8942910
URL: https://source.winehq.org/git/wine.git/?a=commit;h=bfdf115cd6d17059fc1102ca…
Author: Huw Davies <huw(a)codeweavers.com>
Date: Fri Jun 25 10:22:41 2021 +0100
include: Add netiodef.h.
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
include/Makefile.in | 1 +
include/netiodef.h | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 61 insertions(+)
diff --git a/include/Makefile.in b/include/Makefile.in
index 5b84d7858ff..4a8c261bb8f 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -524,6 +524,7 @@ SOURCES = \
netcon.idl \
netfw.idl \
netioapi.h \
+ netiodef.h \
netlistmgr.idl \
newdev.h \
nldef.h \
diff --git a/include/netiodef.h b/include/netiodef.h
new file mode 100644
index 00000000000..611359c49f8
--- /dev/null
+++ b/include/netiodef.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2021 Huw Davies
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_NETIODEF_H
+#define __WINE_NETIODEF_H
+
+typedef enum _NPI_MODULEID_TYPE
+{
+ MIT_GUID = 1,
+ MIT_IF_LUID
+} NPI_MODULEID_TYPE;
+
+typedef struct _NPI_MODULEID
+{
+ USHORT Length;
+ NPI_MODULEID_TYPE Type;
+ union
+ {
+ GUID Guid;
+ LUID IfLuid;
+ };
+} NPI_MODULEID;
+
+typedef const NPI_MODULEID *PNPI_MODULEID;
+
+static inline BOOLEAN NmrIsEqualNpiModuleId( const NPI_MODULEID *mod1, const NPI_MODULEID *mod2 )
+{
+ if (mod1->Type == mod2->Type)
+ {
+ if (mod1->Type == MIT_GUID)
+ {
+#ifdef __cplusplus
+ return IsEqualGUID( mod1->Guid, mod2->Guid );
+#else
+ return IsEqualGUID( &mod1->Guid, &mod2->Guid );
+#endif
+ }
+ else if (mod1->Type == MIT_IF_LUID)
+ return mod1->IfLuid.HighPart == mod2->IfLuid.HighPart &&
+ mod1->IfLuid.LowPart == mod2->IfLuid.LowPart;
+ }
+ return FALSE;
+}
+
+#endif /* __WINE_NETIODEF_H */