Wine-Devel
Threads by month
- ----- 2026 -----
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 84515 discussions
[PATCH v2 1/2] include: Use nested namespace declaration in windows.foundation.idl.
by Rémi Bernon April 25, 2022
by Rémi Bernon April 25, 2022
April 25, 2022
From: Biswapriyo Nath <nathbappai(a)gmail.com>
And move generic instantiations forward.
Signed-off-by: Biswapriyo Nath <nathbappai(a)gmail.com>
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
v2: Use nested namespaces at the same time as reorganizing the file.
include/windows.foundation.idl | 293 ++++++++++++++++-----------------
1 file changed, 145 insertions(+), 148 deletions(-)
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
index c5f4c04a334..08a6af4ea7b 100644
--- a/include/windows.foundation.idl
+++ b/include/windows.foundation.idl
@@ -27,153 +27,150 @@ import "windowscontracts.idl";
/* import "ivectorchangedeventargs.idl"; */
import "windows.foundation.collections.idl";
-namespace Windows {
- namespace Foundation {
- interface IAsyncAction;
- }
-}
-
-namespace Windows {
- namespace Foundation {
- typedef enum PropertyType PropertyType;
- typedef struct Point Point;
- typedef struct Size Size;
- typedef struct Rect Rect;
- typedef struct DateTime DateTime;
- typedef struct TimeSpan TimeSpan;
-
- [
- contract(Windows.Foundation.FoundationContract, 1.0),
- uuid(a4ed5c81-76c9-40bd-8be6-b1d90fb20ae7)
- ]
- delegate HRESULT AsyncActionCompletedHandler([in] Windows.Foundation.IAsyncAction *action, [in] AsyncStatus status);
-
- [contract(Windows.Foundation.FoundationContract, 1.0)]
- enum PropertyType {
- Empty = 0,
- UInt8 = 1,
- Int16 = 2,
- UInt16 = 3,
- Int32 = 4,
- UInt32 = 5,
- Int64 = 6,
- UInt64 = 7,
- Single = 8,
- Double = 9,
- Char16 = 10,
- Boolean = 11,
- String = 12,
- Inspectable = 13,
- DateTime = 14,
- TimeSpan = 15,
- Guid = 16,
- Point = 17,
- Size = 18,
- Rect = 19,
- OtherType = 20,
- UInt8Array = 1025,
- Int16Array = 1026,
- UInt16Array = 1027,
- Int32Array = 1028,
- UInt32Array = 1029,
- Int64Array = 1030,
- UInt64Array = 1031,
- SingleArray = 1032,
- DoubleArray = 1033,
- Char16Array = 1034,
- BooleanArray = 1035,
- StringArray = 1036,
- InspectableArray = 1037,
- DateTimeArray = 1038,
- TimeSpanArray = 1039,
- GuidArray = 1040,
- PointArray = 1041,
- SizeArray = 1042,
- RectArray = 1043,
- OtherTypeArray = 1044
- };
-
- [contract(Windows.Foundation.FoundationContract, 1.0)]
- struct Point {
- FLOAT X;
- FLOAT Y;
- };
-
- [contract(Windows.Foundation.FoundationContract, 1.0)]
- struct Size {
- FLOAT Width;
- FLOAT Height;
- };
-
- [contract(Windows.Foundation.FoundationContract, 1.0)]
- struct Rect {
- FLOAT X;
- FLOAT Y;
- FLOAT Width;
- FLOAT Height;
- };
-
- [contract(Windows.Foundation.FoundationContract, 1.0)]
- struct DateTime {
- INT64 UniversalTime;
- };
-
- [contract(Windows.Foundation.FoundationContract, 1.0)]
- struct TimeSpan {
- INT64 Duration;
- };
-
- [
- contract(Windows.Foundation.FoundationContract, 1.0),
- uuid(96369f54-8eb6-48f0-abce-c1b211e627c3)
- ]
- interface IStringable : IInspectable
- {
- HRESULT ToString([out, retval] HSTRING *value);
- }
-
- [
- contract(Windows.Foundation.FoundationContract, 1.0),
- uuid(30d5a829-7fa4-4026-83bb-d75bae4ea99e)
- ]
- interface IClosable : IInspectable
- {
- HRESULT Close();
- }
-
- [
- contract(Windows.Foundation.FoundationContract, 1.0),
- uuid(5a648006-843a-4da9-865b-9d26e5dfad7b)
- ]
- interface IAsyncAction : IInspectable
- requires IAsyncInfo
- {
- [propput] HRESULT Completed([in] Windows.Foundation.AsyncActionCompletedHandler *handler);
- [propget] HRESULT Completed([out, retval] Windows.Foundation.AsyncActionCompletedHandler **handler);
- HRESULT GetResults();
- }
- }
-}
-
-namespace Windows {
- namespace Foundation {
- declare {
- interface Windows.Foundation.Collections.IIterable<HSTRING>;
- interface Windows.Foundation.Collections.IIterable<IInspectable *>;
- interface Windows.Foundation.Collections.IIterator<HSTRING>;
- interface Windows.Foundation.Collections.IIterator<IInspectable *>;
- interface Windows.Foundation.Collections.IVectorView<HSTRING>;
- interface Windows.Foundation.Collections.IVectorView<IInspectable *>;
- interface Windows.Foundation.Collections.IVector<HSTRING>;
- interface Windows.Foundation.Collections.IVector<IInspectable *>;
- interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Foundation.Collections.IVectorView<HSTRING>*>;
- interface Windows.Foundation.EventHandler<IInspectable *>;
- interface Windows.Foundation.AsyncOperationCompletedHandler<IInspectable *>;
- interface Windows.Foundation.AsyncOperationCompletedHandler<boolean>;
- interface Windows.Foundation.IAsyncOperation<IInspectable *>;
- interface Windows.Foundation.IAsyncOperation<boolean>;
- interface Windows.Foundation.IReference<INT32>;
- interface Windows.Foundation.TypedEventHandler<IInspectable *, IInspectable *>;
- }
+namespace Windows.Foundation {
+ typedef enum PropertyType PropertyType;
+ typedef struct Point Point;
+ typedef struct Size Size;
+ typedef struct Rect Rect;
+ typedef struct DateTime DateTime;
+ typedef struct TimeSpan TimeSpan;
+ interface IAsyncAction;
+ interface IClosable;
+ interface IStringable;
+
+ declare {
+ interface Windows.Foundation.Collections.IIterable<HSTRING>;
+ interface Windows.Foundation.Collections.IIterable<IInspectable *>;
+ interface Windows.Foundation.Collections.IIterator<HSTRING>;
+ interface Windows.Foundation.Collections.IIterator<IInspectable *>;
+ interface Windows.Foundation.Collections.IVectorView<HSTRING>;
+ interface Windows.Foundation.Collections.IVectorView<IInspectable *>;
+ interface Windows.Foundation.Collections.IVector<HSTRING>;
+ interface Windows.Foundation.Collections.IVector<IInspectable *>;
+ interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Foundation.Collections.IVectorView<HSTRING> *>;
+ interface Windows.Foundation.EventHandler<IInspectable *>;
+ interface Windows.Foundation.AsyncOperationCompletedHandler<IInspectable *>;
+ interface Windows.Foundation.AsyncOperationCompletedHandler<boolean>;
+ interface Windows.Foundation.IAsyncOperation<IInspectable *>;
+ interface Windows.Foundation.IAsyncOperation<boolean>;
+ interface Windows.Foundation.IReference<INT32>;
+ interface Windows.Foundation.TypedEventHandler<IInspectable *, IInspectable *>;
+ }
+
+ [
+ contract(Windows.Foundation.FoundationContract, 1.0),
+ uuid(a4ed5c81-76c9-40bd-8be6-b1d90fb20ae7)
+ ]
+ delegate HRESULT AsyncActionCompletedHandler([in] Windows.Foundation.IAsyncAction *action, [in] AsyncStatus status);
+
+ [contract(Windows.Foundation.FoundationContract, 1.0)]
+ enum PropertyType
+ {
+ Empty = 0,
+ UInt8 = 1,
+ Int16 = 2,
+ UInt16 = 3,
+ Int32 = 4,
+ UInt32 = 5,
+ Int64 = 6,
+ UInt64 = 7,
+ Single = 8,
+ Double = 9,
+ Char16 = 10,
+ Boolean = 11,
+ String = 12,
+ Inspectable = 13,
+ DateTime = 14,
+ TimeSpan = 15,
+ Guid = 16,
+ Point = 17,
+ Size = 18,
+ Rect = 19,
+ OtherType = 20,
+ UInt8Array = 1025,
+ Int16Array = 1026,
+ UInt16Array = 1027,
+ Int32Array = 1028,
+ UInt32Array = 1029,
+ Int64Array = 1030,
+ UInt64Array = 1031,
+ SingleArray = 1032,
+ DoubleArray = 1033,
+ Char16Array = 1034,
+ BooleanArray = 1035,
+ StringArray = 1036,
+ InspectableArray = 1037,
+ DateTimeArray = 1038,
+ TimeSpanArray = 1039,
+ GuidArray = 1040,
+ PointArray = 1041,
+ SizeArray = 1042,
+ RectArray = 1043,
+ OtherTypeArray = 1044,
+ };
+
+ [contract(Windows.Foundation.FoundationContract, 1.0)]
+ struct Point
+ {
+ FLOAT X;
+ FLOAT Y;
+ };
+
+ [contract(Windows.Foundation.FoundationContract, 1.0)]
+ struct Size
+ {
+ FLOAT Width;
+ FLOAT Height;
+ };
+
+ [contract(Windows.Foundation.FoundationContract, 1.0)]
+ struct Rect
+ {
+ FLOAT X;
+ FLOAT Y;
+ FLOAT Width;
+ FLOAT Height;
+ };
+
+ [contract(Windows.Foundation.FoundationContract, 1.0)]
+ struct DateTime
+ {
+ INT64 UniversalTime;
+ };
+
+ [contract(Windows.Foundation.FoundationContract, 1.0)]
+ struct TimeSpan
+ {
+ INT64 Duration;
+ };
+
+ [
+ contract(Windows.Foundation.FoundationContract, 1.0),
+ uuid(96369f54-8eb6-48f0-abce-c1b211e627c3)
+ ]
+ interface IStringable : IInspectable
+ {
+ HRESULT ToString([out, retval] HSTRING *value);
+ }
+
+ [
+ contract(Windows.Foundation.FoundationContract, 1.0),
+ uuid(30d5a829-7fa4-4026-83bb-d75bae4ea99e)
+ ]
+ interface IClosable : IInspectable
+ {
+ HRESULT Close();
+ }
+
+ [
+ contract(Windows.Foundation.FoundationContract, 1.0),
+ uuid(5a648006-843a-4da9-865b-9d26e5dfad7b)
+ ]
+ interface IAsyncAction : IInspectable
+ requires IAsyncInfo
+ {
+ [propput] HRESULT Completed([in] Windows.Foundation.AsyncActionCompletedHandler *handler);
+ [propget] HRESULT Completed([out, retval] Windows.Foundation.AsyncActionCompletedHandler **handler);
+ HRESULT GetResults();
}
}
--
2.35.1
1
1
Needed by windows.media.closedcaptioning.idl.
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com>
---
v2: - Use right aligned pointer.
- Use value instead of returnValue.
Wine doesn't seem to use return_value anywhere so this
change makes it more consistent with the Wine code style.
---
include/Makefile.in | 1 +
include/windows.ui.idl | 323 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 324 insertions(+)
create mode 100644 include/windows.ui.idl
diff --git a/include/Makefile.in b/include/Makefile.in
index b0a1d0e4880..837c6077fd9 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -800,6 +800,7 @@ SOURCES = \
windows.system.idl \
windows.system.power.idl \
windows.system.userprofile.idl \
+ windows.ui.idl \
windowscontracts.idl \
windowsx.h \
wine/debug.h \
diff --git a/include/windows.ui.idl b/include/windows.ui.idl
new file mode 100644
index 00000000000..5045d0b9ed2
--- /dev/null
+++ b/include/windows.ui.idl
@@ -0,0 +1,323 @@
+/*
+ * Copyright 2022 Mohamad Al-Jaf
+ *
+ * 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
+ */
+
+#ifdef __WIDL__
+#pragma winrt ns_prefix
+#endif
+
+import "inspectable.idl";
+import "asyncinfo.idl";
+import "eventtoken.idl";
+import "windowscontracts.idl";
+import "windows.foundation.idl";
+
+namespace Windows.UI {
+ typedef struct Color Color;
+ typedef struct WindowId WindowId;
+
+ interface IColorHelper;
+ interface IColorHelperStatics;
+ interface IColorHelperStatics2;
+ interface IColors;
+ interface IColorsStatics;
+ interface IUIContentRoot;
+ interface IUIContext;
+
+ runtimeclass ColorHelper;
+ runtimeclass Colors;
+ runtimeclass UIContentRoot;
+ runtimeclass UIContext;
+
+ declare {
+ interface Windows.Foundation.Collections.IIterable<Windows.UI.Color>;
+ interface Windows.Foundation.Collections.IIterable<Windows.UI.WindowId>;
+ interface Windows.Foundation.Collections.IIterator<Windows.UI.Color>;
+ interface Windows.Foundation.Collections.IIterator<Windows.UI.WindowId>;
+ interface Windows.Foundation.Collections.IVectorView<Windows.UI.WindowId>;
+ interface Windows.Foundation.IReference<Windows.UI.Color>;
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0)
+ ]
+ struct Color
+ {
+ BYTE A;
+ BYTE R;
+ BYTE G;
+ BYTE B;
+ };
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 12.0)
+ ]
+ struct WindowId
+ {
+ UINT64 Value;
+ };
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ exclusiveto(Windows.UI.ColorHelper),
+ uuid(193cfbe7-65c7-4540-ad08-6283ba76879a)
+ ]
+ interface IColorHelper : IInspectable
+ {
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ exclusiveto(Windows.UI.ColorHelper),
+ uuid(8504dbea-fb6a-4144-a6c2-33499c9284f5)
+ ]
+ interface IColorHelperStatics : IInspectable
+ {
+ HRESULT FromArgb([in] BYTE a, [in] BYTE r, [in] BYTE g, [in] BYTE b, [out, retval] Windows.UI.Color *value);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 4.0),
+ exclusiveto(Windows.UI.ColorHelper),
+ uuid(24d9af02-6eb0-4b94-855c-fcf0818d9a16)
+ ]
+ interface IColorHelperStatics2 : IInspectable
+ {
+ HRESULT ToDisplayName([in] Windows.UI.Color color, [out, retval] HSTRING *value);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ exclusiveto(Windows.UI.Colors),
+ uuid(9b8c9326-4ca6-4ce5-8994-9eff65cabdcc)
+ ]
+ interface IColors : IInspectable
+ {
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ exclusiveto(Windows.UI.Colors),
+ uuid(cff52e04-cca6-4614-a17e-754910c84a99)
+ ]
+ interface IColorsStatics : IInspectable
+ {
+ [propget] HRESULT AliceBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT AntiqueWhite([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Aqua([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Aquamarine([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Azure([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Beige([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Bisque([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Black([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT BlanchedAlmond([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Blue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT BlueViolet([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Brown([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT BurlyWood([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT CadetBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Chartreuse([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Chocolate([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Coral([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT CornflowerBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Cornsilk([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Crimson([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Cyan([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkCyan([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkGoldenrod([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkGray([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkKhaki([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkMagenta([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkOliveGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkOrange([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkOrchid([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkRed([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkSalmon([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkSeaGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkSlateBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkSlateGray([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkTurquoise([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DarkViolet([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DeepPink([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DeepSkyBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DimGray([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT DodgerBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Firebrick([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT FloralWhite([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT ForestGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Fuchsia([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Gainsboro([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT GhostWhite([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Gold([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Goldenrod([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Gray([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Green([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT GreenYellow([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Honeydew([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT HotPink([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT IndianRed([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Indigo([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Ivory([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Khaki([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Lavender([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LavenderBlush([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LawnGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LemonChiffon([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightCoral([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightCyan([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightGoldenrodYellow([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightGray([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightPink([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightSalmon([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightSeaGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightSkyBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightSlateGray([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightSteelBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LightYellow([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Lime([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT LimeGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Linen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Magenta([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Maroon([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MediumAquamarine([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MediumBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MediumOrchid([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MediumPurple([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MediumSeaGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MediumSlateBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MediumSpringGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MediumTurquoise([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MediumVioletRed([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MidnightBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MintCream([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT MistyRose([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Moccasin([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT NavajoWhite([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Navy([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT OldLace([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Olive([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT OliveDrab([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Orange([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT OrangeRed([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Orchid([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT PaleGoldenrod([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT PaleGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT PaleTurquoise([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT PaleVioletRed([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT PapayaWhip([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT PeachPuff([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Peru([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Pink([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Plum([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT PowderBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Purple([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Red([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT RosyBrown([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT RoyalBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT SaddleBrown([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Salmon([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT SandyBrown([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT SeaGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT SeaShell([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Sienna([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Silver([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT SkyBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT SlateBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT SlateGray([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Snow([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT SpringGreen([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT SteelBlue([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Tan([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Teal([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Thistle([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Tomato([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Transparent([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Turquoise([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Violet([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Wheat([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT White([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT WhiteSmoke([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT Yellow([out, retval] Windows.UI.Color *value);
+ [propget] HRESULT YellowGreen([out, retval] Windows.UI.Color *value);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 8.0),
+ exclusiveto(Windows.UI.UIContentRoot),
+ uuid(1dfcbac6-b36b-5cb9-9bc5-2b7a0eddc378)
+ ]
+ interface IUIContentRoot : IInspectable
+ {
+ [propget] HRESULT UIContext([out, retval] Windows.UI.UIContext **value);
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 8.0),
+ exclusiveto(Windows.UI.UIContext),
+ uuid(bb5cfacd-5bd8-59d0-a59e-1c17a4d6d243)
+ ]
+ interface IUIContext : IInspectable
+ {
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ marshaling_behavior(agile),
+ static(Windows.UI.IColorHelperStatics, Windows.Foundation.UniversalApiContract, 1.0),
+ static(Windows.UI.IColorHelperStatics2, Windows.Foundation.UniversalApiContract, 4.0),
+ threading(both)
+ ]
+ runtimeclass ColorHelper
+ {
+ [default] interface Windows.UI.IColorHelper;
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ marshaling_behavior(agile),
+ static(Windows.UI.IColorsStatics, Windows.Foundation.UniversalApiContract, 1.0),
+ threading(both)
+ ]
+ runtimeclass Colors
+ {
+ [default] interface Windows.UI.IColors;
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 8.0),
+ marshaling_behavior(agile),
+ threading(both)
+ ]
+ runtimeclass UIContentRoot
+ {
+ [default] interface Windows.UI.IUIContentRoot;
+ }
+
+ [
+ contract(Windows.Foundation.UniversalApiContract, 8.0),
+ marshaling_behavior(agile),
+ threading(both)
+ ]
+ runtimeclass UIContext
+ {
+ [default] interface Windows.UI.IUIContext;
+ }
+}
--
2.36.0
2
3
[PATCH] include: Add declarations of _alloca and alloca for MSVC mode
by Martin Storsjö April 25, 2022
by Martin Storsjö April 25, 2022
April 25, 2022
This fixes builds with recent Clang 15 (which still is in development),
which errors out on implicit declarations.
Signed-off-by: Martin Storsjö <martin(a)martin.st>
---
Doing this as two separate ifdef blocks, to get the plain C
function declaration (which actually is a builtin intrinsic, but
it needs to be declared) within the extern "C" scope.
---
include/msvcrt/malloc.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/msvcrt/malloc.h b/include/msvcrt/malloc.h
index 5bb843be5a6..fcbadbeb4e0 100644
--- a/include/msvcrt/malloc.h
+++ b/include/msvcrt/malloc.h
@@ -77,6 +77,10 @@ _ACRTIMP void* __cdecl _aligned_offset_realloc(void*,size_t,size_t,size_t);
_ACRTIMP size_t __cdecl _get_sbh_threshold(void);
_ACRTIMP int __cdecl _set_sbh_threshold(size_t size);
+#ifdef _MSC_VER
+void *_alloca(size_t size);
+#endif
+
#ifdef __cplusplus
}
#endif
@@ -84,6 +88,8 @@ _ACRTIMP int __cdecl _set_sbh_threshold(size_t size);
# ifdef __GNUC__
# define _alloca(x) __builtin_alloca((x))
# define alloca(x) __builtin_alloca((x))
+# elif defined(_MSC_VER)
+# define alloca(x) _alloca((x))
# endif
#endif /* __WINE_MALLOC_H */
--
2.25.1
1
0
[PATCH] include: Add a declaration of _InterlockedExchangeAdd64 for MSVC mode for aarch64
by Martin Storsjö April 25, 2022
by Martin Storsjö April 25, 2022
April 25, 2022
This matches the corresponding declaration for x86_64.
Signed-off-by: Martin Storsjö <martin(a)martin.st>
---
include/winnt.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/winnt.h b/include/winnt.h
index 31c6b7d69e9..e853ddbc7ae 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -6371,6 +6371,10 @@ static FORCEINLINE void MemoryBarrier(void)
#elif defined(__aarch64__)
+#pragma intrinsic(_InterlockedExchangeAdd64)
+
+long long _InterlockedExchangeAdd64(long long volatile *, long long);
+
static FORCEINLINE void MemoryBarrier(void)
{
__dmb(_ARM64_BARRIER_SY);
--
2.25.1
1
0
Required for Iragon: Prologue.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
v3: Supersede 233210. Remove unnecessary ordinal numbers.
v4: Supersede 233635. Add SetSocketMediaStreamingMode() stub. Thanks, Rémi.
configure.ac | 1 +
dlls/windows.networking/Makefile.in | 4 +++
dlls/windows.networking/main.c | 29 +++++++++++++++++
.../windows.networking.spec | 8 +++++
include/socketapi.h | 32 +++++++++++++++++++
5 files changed, 74 insertions(+)
create mode 100644 dlls/windows.networking/Makefile.in
create mode 100644 dlls/windows.networking/main.c
create mode 100644 dlls/windows.networking/windows.networking.spec
create mode 100644 include/socketapi.h
diff --git a/configure.ac b/configure.ac
index 75292210bc4..74c80fd7fa8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3098,6 +3098,7 @@ WINE_CONFIG_MAKEFILE(dlls/windows.media.devices)
WINE_CONFIG_MAKEFILE(dlls/windows.media.devices/tests)
WINE_CONFIG_MAKEFILE(dlls/windows.media.speech)
WINE_CONFIG_MAKEFILE(dlls/windows.media.speech/tests)
+WINE_CONFIG_MAKEFILE(dlls/windows.networking)
WINE_CONFIG_MAKEFILE(dlls/windowscodecs)
WINE_CONFIG_MAKEFILE(dlls/windowscodecs/tests)
WINE_CONFIG_MAKEFILE(dlls/windowscodecsext)
diff --git a/dlls/windows.networking/Makefile.in b/dlls/windows.networking/Makefile.in
new file mode 100644
index 00000000000..19ca237ec36
--- /dev/null
+++ b/dlls/windows.networking/Makefile.in
@@ -0,0 +1,4 @@
+MODULE = windows.networking.dll
+
+C_SRCS = \
+ main.c
diff --git a/dlls/windows.networking/main.c b/dlls/windows.networking/main.c
new file mode 100644
index 00000000000..3ac8a3042ab
--- /dev/null
+++ b/dlls/windows.networking/main.c
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2022 Zhiyi Zhang for CodeWeavers
+ *
+ * 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 <windef.h>
+#include <winnt.h>
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(winsock);
+
+HRESULT WINAPI SetSocketMediaStreamingMode(BOOL value)
+{
+ FIXME("value %d stub!\n", value);
+ return S_OK;
+}
diff --git a/dlls/windows.networking/windows.networking.spec b/dlls/windows.networking/windows.networking.spec
new file mode 100644
index 00000000000..49fdb3aab18
--- /dev/null
+++ b/dlls/windows.networking/windows.networking.spec
@@ -0,0 +1,8 @@
+1 stub @
+@ stub DllCanUnloadNow
+@ stub DllGetActivationFactory
+@ stub DllGetClassObject
+@ stub DllMain
+@ stub DllRegisterServer
+@ stub DllUnregisterServer
+@ stdcall SetSocketMediaStreamingMode(long)
diff --git a/include/socketapi.h b/include/socketapi.h
new file mode 100644
index 00000000000..a3e8220972f
--- /dev/null
+++ b/include/socketapi.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2022 Zhiyi Zhang for CodeWeavers
+ *
+ * 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 SOCKETAPI_H
+#define SOCKETAPI_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+HRESULT WINAPI SetSocketMediaStreamingMode(BOOL value);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* SOCKETAPI_H */
--
2.32.0
1
0
April 25, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/nsiproxy.sys/Makefile.in | 1 -
dlls/nsiproxy.sys/device.c | 10 +++++-----
dlls/nsiproxy.sys/tcp.c | 2 +-
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/nsiproxy.sys/Makefile.in b/dlls/nsiproxy.sys/Makefile.in
index 3b83a4ddaac..87f7e165ef4 100644
--- a/dlls/nsiproxy.sys/Makefile.in
+++ b/dlls/nsiproxy.sys/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = nsiproxy.sys
UNIXLIB = nsiproxy.so
IMPORTS = ntoskrnl
diff --git a/dlls/nsiproxy.sys/device.c b/dlls/nsiproxy.sys/device.c
index cc9b00d3359..d3845829a85 100644
--- a/dlls/nsiproxy.sys/device.c
+++ b/dlls/nsiproxy.sys/device.c
@@ -266,7 +266,7 @@ static NTSTATUS WINAPI nsi_ioctl( DEVICE_OBJECT *device, IRP *irp )
IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp );
NTSTATUS status;
- TRACE( "ioctl %x insize %u outsize %u\n",
+ TRACE( "ioctl %lx insize %lu outsize %lu\n",
irpsp->Parameters.DeviceIoControl.IoControlCode,
irpsp->Parameters.DeviceIoControl.InputBufferLength,
irpsp->Parameters.DeviceIoControl.OutputBufferLength );
@@ -290,7 +290,7 @@ static NTSTATUS WINAPI nsi_ioctl( DEVICE_OBJECT *device, IRP *irp )
break;
default:
- FIXME( "ioctl %x not supported\n", irpsp->Parameters.DeviceIoControl.IoControlCode );
+ FIXME( "ioctl %lx not supported\n", irpsp->Parameters.DeviceIoControl.IoControlCode );
status = STATUS_NOT_SUPPORTED;
break;
}
@@ -316,7 +316,7 @@ static int add_device( DRIVER_OBJECT *driver )
status = IoCreateSymbolicLink( &link, &name );
if (status)
{
- FIXME( "failed to create device error %x\n", status );
+ FIXME( "failed to create device error %lx\n", status );
return 0;
}
@@ -341,7 +341,7 @@ static DWORD WINAPI listen_thread_proc( void *arg )
params.reply_len = irpsp->Parameters.DeviceIoControl.OutputBufferLength;
status = nsiproxy_call( icmp_listen, ¶ms );
- TRACE( "icmp_listen rets %08x\n", status );
+ TRACE( "icmp_listen rets %08lx\n", status );
EnterCriticalSection( &nsiproxy_cs );
@@ -375,7 +375,7 @@ static void handle_queued_send_echo( IRP *irp )
params.dst = &in->dst;
status = nsiproxy_call( icmp_send_echo, ¶ms );
- TRACE( "icmp_send_echo rets %08x\n", status );
+ TRACE( "icmp_send_echo rets %08lx\n", status );
if (status != STATUS_PENDING)
{
diff --git a/dlls/nsiproxy.sys/tcp.c b/dlls/nsiproxy.sys/tcp.c
index 0dbee8418b9..5734c4d9ee0 100644
--- a/dlls/nsiproxy.sys/tcp.c
+++ b/dlls/nsiproxy.sys/tcp.c
@@ -404,7 +404,7 @@ unsigned int find_owning_pid( struct pid_map *map, unsigned int num_entries, UIN
unsigned int i, len_socket;
char socket[32];
- sprintf( socket, "socket:[%lu]", inode );
+ sprintf( socket, "socket:[%zu]", inode );
len_socket = strlen( socket );
for (i = 0; i < num_entries; i++)
{
--
2.23.0
1
0
[PATCH v2 5/6] nsiproxy: Add intermediate variables for sscanf on ULONG.
by Huw Davies April 25, 2022
by Huw Davies April 25, 2022
April 25, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/nsiproxy.sys/tcp.c | 7 +++++--
dlls/nsiproxy.sys/udp.c | 4 +++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/nsiproxy.sys/tcp.c b/dlls/nsiproxy.sys/tcp.c
index 8e2d7e749a7..0dbee8418b9 100644
--- a/dlls/nsiproxy.sys/tcp.c
+++ b/dlls/nsiproxy.sys/tcp.c
@@ -534,6 +534,7 @@ static NTSTATUS tcp_conns_enumerate_all( UINT filter, struct nsi_tcp_conn_key *k
FILE *fp;
char buf[512], *ptr;
int inode;
+ UINT laddr, raddr;
if (!(fp = fopen( "/proc/net/tcp", "r" ))) return ERROR_NOT_SUPPORTED;
@@ -547,15 +548,17 @@ static NTSTATUS tcp_conns_enumerate_all( UINT filter, struct nsi_tcp_conn_key *k
while ((ptr = fgets( buf, sizeof(buf), fp )))
{
if (sscanf( ptr, "%*x: %x:%hx %x:%hx %x %*s %*s %*s %*s %*s %d",
- &key.local.Ipv4.sin_addr.WS_s_addr, &key.local.Ipv4.sin_port,
- &key.remote.Ipv4.sin_addr.WS_s_addr, &key.remote.Ipv4.sin_port,
+ &laddr, &key.local.Ipv4.sin_port,
+ &raddr, &key.remote.Ipv4.sin_port,
&dyn.state, &inode ) != 6)
continue;
dyn.state = tcp_state_to_mib_state( dyn.state );
if (filter && filter != dyn.state ) continue;
key.local.Ipv4.sin_family = key.remote.Ipv4.sin_family = WS_AF_INET;
+ key.local.Ipv4.sin_addr.WS_s_addr = laddr;
key.local.Ipv4.sin_port = htons( key.local.Ipv4.sin_port );
+ key.remote.Ipv4.sin_addr.WS_s_addr = raddr;
key.remote.Ipv4.sin_port = htons( key.remote.Ipv4.sin_port );
if (num < *count)
diff --git a/dlls/nsiproxy.sys/udp.c b/dlls/nsiproxy.sys/udp.c
index 0ba2f835e44..2248d74234b 100644
--- a/dlls/nsiproxy.sys/udp.c
+++ b/dlls/nsiproxy.sys/udp.c
@@ -223,6 +223,7 @@ static NTSTATUS udp_endpoint_enumerate_all( void *key_data, UINT key_size, void
FILE *fp;
char buf[512], *ptr;
int inode;
+ UINT addr;
if (!(fp = fopen( "/proc/net/udp", "r" ))) return ERROR_NOT_SUPPORTED;
@@ -235,10 +236,11 @@ static NTSTATUS udp_endpoint_enumerate_all( void *key_data, UINT key_size, void
while ((ptr = fgets( buf, sizeof(buf), fp )))
{
if (sscanf( ptr, "%*u: %x:%hx %*s %*s %*s %*s %*s %*s %*s %d",
- &key.local.Ipv4.sin_addr.WS_s_addr, &key.local.Ipv4.sin_port, &inode ) != 3)
+ &addr, &key.local.Ipv4.sin_port, &inode ) != 3)
continue;
key.local.Ipv4.sin_family = WS_AF_INET;
+ key.local.Ipv4.sin_addr.WS_s_addr = addr;
key.local.Ipv4.sin_port = htons( key.local.Ipv4.sin_port );
stat.pid = find_owning_pid( pid_map, pid_map_size, inode );
--
2.23.0
1
0
April 25, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/nsiproxy.sys/device.c | 6 ++---
dlls/nsiproxy.sys/icmp_echo.c | 2 +-
dlls/nsiproxy.sys/ip.c | 50 +++++++++++++++++------------------
dlls/nsiproxy.sys/ndis.c | 30 ++++++++++-----------
dlls/nsiproxy.sys/nsi.c | 4 +--
dlls/nsiproxy.sys/tcp.c | 10 +++----
dlls/nsiproxy.sys/udp.c | 6 ++---
7 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/dlls/nsiproxy.sys/device.c b/dlls/nsiproxy.sys/device.c
index 9e0a1d1f6a1..cc9b00d3359 100644
--- a/dlls/nsiproxy.sys/device.c
+++ b/dlls/nsiproxy.sys/device.c
@@ -79,7 +79,7 @@ static NTSTATUS nsiproxy_enumerate_all( IRP *irp )
if (in_len != sizeof(*in)) return STATUS_INVALID_PARAMETER;
- if (out_len < sizeof(DWORD) + (in->key_size + in->rw_size + in->dynamic_size + in->static_size) * in->count)
+ if (out_len < sizeof(UINT) + (in->key_size + in->rw_size + in->dynamic_size + in->static_size) * in->count)
return STATUS_INVALID_PARAMETER;
enum_all.unknown[0] = 0;
@@ -88,7 +88,7 @@ static NTSTATUS nsiproxy_enumerate_all( IRP *irp )
enum_all.second_arg = in->second_arg;
enum_all.module = &in->module;
enum_all.table = in->table;
- enum_all.key_data = (BYTE *)out + sizeof(DWORD);
+ enum_all.key_data = (BYTE *)out + sizeof(UINT);
enum_all.key_size = in->key_size;
enum_all.rw_data = (BYTE *)enum_all.key_data + in->key_size * in->count;
enum_all.rw_size = in->rw_size;
@@ -102,7 +102,7 @@ static NTSTATUS nsiproxy_enumerate_all( IRP *irp )
if (status == STATUS_SUCCESS || status == STATUS_BUFFER_OVERFLOW)
{
irp->IoStatus.Information = out_len;
- *(DWORD *)out = enum_all.count;
+ *(UINT *)out = enum_all.count;
}
else irp->IoStatus.Information = 0;
diff --git a/dlls/nsiproxy.sys/icmp_echo.c b/dlls/nsiproxy.sys/icmp_echo.c
index 5f2b776745a..c3ce841c003 100644
--- a/dlls/nsiproxy.sys/icmp_echo.c
+++ b/dlls/nsiproxy.sys/icmp_echo.c
@@ -666,7 +666,7 @@ NTSTATUS icmp_send_echo( void *args )
return params->handle ? STATUS_PENDING : STATUS_NO_MEMORY;
}
-static int get_timeout( LARGE_INTEGER start, DWORD timeout )
+static int get_timeout( LARGE_INTEGER start, UINT timeout )
{
LARGE_INTEGER now, end;
diff --git a/dlls/nsiproxy.sys/ip.c b/dlls/nsiproxy.sys/ip.c
index 15c03985808..b8fff704f38 100644
--- a/dlls/nsiproxy.sys/ip.c
+++ b/dlls/nsiproxy.sys/ip.c
@@ -99,7 +99,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(nsi);
-static inline DWORD nsi_popcount( DWORD m )
+static inline UINT nsi_popcount( UINT m )
{
#ifdef HAVE___BUILTIN_POPCOUNT
return __builtin_popcount( m );
@@ -110,19 +110,19 @@ static inline DWORD nsi_popcount( DWORD m )
#endif
}
-static DWORD mask_v4_to_prefix( struct in_addr *addr )
+static UINT mask_v4_to_prefix( struct in_addr *addr )
{
return nsi_popcount( addr->s_addr );
}
-static DWORD mask_v6_to_prefix( struct in6_addr *addr )
+static UINT mask_v6_to_prefix( struct in6_addr *addr )
{
- DWORD ret;
+ UINT ret;
- ret = nsi_popcount( *(DWORD *)addr->s6_addr );
- ret += nsi_popcount( *(DWORD *)(addr->s6_addr + 4) );
- ret += nsi_popcount( *(DWORD *)(addr->s6_addr + 8) );
- ret += nsi_popcount( *(DWORD *)(addr->s6_addr + 12) );
+ ret = nsi_popcount( *(UINT *)addr->s6_addr );
+ ret += nsi_popcount( *(UINT *)(addr->s6_addr + 4) );
+ ret += nsi_popcount( *(UINT *)(addr->s6_addr + 8) );
+ ret += nsi_popcount( *(UINT *)(addr->s6_addr + 12) );
return ret;
}
@@ -159,7 +159,7 @@ static NTSTATUS ip_cmpt_get_all_parameters( UINT fam, const UINT *key, UINT key_
const NPI_MODULEID *ip_mod = (fam == AF_INET) ? &NPI_MS_IPV4_MODULEID : &NPI_MS_IPV6_MODULEID;
struct nsi_ip_cmpt_rw rw;
struct nsi_ip_cmpt_dynamic dyn;
- DWORD count;
+ UINT count;
memset( &rw, 0, sizeof(rw) );
memset( &dyn, 0, sizeof(dyn) );
@@ -367,7 +367,7 @@ static NTSTATUS ipv6_icmpstats_get_all_parameters( const void *key, UINT key_siz
struct data
{
const char *name;
- DWORD pos;
+ UINT pos;
};
static const struct data in_list[] =
{
@@ -406,7 +406,7 @@ static NTSTATUS ipv6_icmpstats_get_all_parameters( const void *key, UINT key_siz
{ "Icmp6OutMLDv2Reports", ICMP6_V2_MEMBERSHIP_REPORT },
};
char buf[512], *ptr, *value;
- DWORD res, i;
+ UINT res, i;
FILE *fp;
if (!(fp = fopen( "/proc/net/snmp6", "r" ))) return STATUS_NOT_SUPPORTED;
@@ -506,7 +506,7 @@ static NTSTATUS ipv4_ipstats_get_all_parameters( const void *key, UINT key_size,
if (!(ptr = fgets( buf, sizeof(buf), fp ))) break;
if (!ascii_strncasecmp( buf, hdr, sizeof(hdr) - 1 ))
{
- DWORD in_recv, in_hdr_errs, fwd_dgrams, in_delivers, out_reqs;
+ UINT in_recv, in_hdr_errs, fwd_dgrams, in_delivers, out_reqs;
ptr += sizeof(hdr);
sscanf( ptr, "%*u %*u %u %u %u %u %u %u %u %u %u %u %u %u %u %u %u %u %u",
&in_recv,
@@ -625,7 +625,7 @@ static NTSTATUS ipv6_ipstats_get_all_parameters( const void *key, UINT key_size,
};
NTSTATUS status = STATUS_NOT_SUPPORTED;
char buf[512], *ptr, *value;
- DWORD i;
+ UINT i;
FILE *fp;
if (!(fp = fopen( "/proc/net/snmp6", "r" ))) return STATUS_NOT_SUPPORTED;
@@ -665,7 +665,7 @@ static void unicast_fill_entry( struct ifaddrs *entry, void *key, struct nsi_ip_
{
struct nsi_ipv6_unicast_key placeholder, *key6 = key;
struct nsi_ipv4_unicast_key *key4 = key;
- DWORD scope_id = 0;
+ UINT scope_id = 0;
if (!key)
{
@@ -723,7 +723,7 @@ static NTSTATUS ip_unicast_enumerate_all( int family, void *key_data, UINT key_s
void *dynamic_data, UINT dynamic_size,
void *static_data, UINT static_size, UINT_PTR *count )
{
- DWORD num = 0;
+ UINT num = 0;
NTSTATUS status = STATUS_SUCCESS;
BOOL want_data = key_size || rw_size || dynamic_size || static_size;
struct ifaddrs *addrs, *entry;
@@ -815,7 +815,7 @@ struct ipv4_neighbour_data
UINT if_index;
struct in_addr addr;
BYTE phys_addr[IF_MAX_PHYS_ADDRESS_LENGTH];
- DWORD state;
+ UINT state;
USHORT phys_addr_len;
BOOL is_router;
BOOL is_unreachable;
@@ -854,7 +854,7 @@ static NTSTATUS ipv4_neighbour_enumerate_all( void *key_data, UINT key_size, voi
void *dynamic_data, UINT dynamic_size,
void *static_data, UINT static_size, UINT_PTR *count )
{
- DWORD num = 0;
+ UINT num = 0;
NTSTATUS status = STATUS_SUCCESS;
BOOL want_data = key_size || rw_size || dynamic_size || static_size;
struct ipv4_neighbour_data entry;
@@ -865,7 +865,7 @@ static NTSTATUS ipv4_neighbour_enumerate_all( void *key_data, UINT key_size, voi
#ifdef __linux__
{
char buf[512], *ptr;
- DWORD atf_flags;
+ UINT atf_flags;
FILE *fp;
if (!(fp = fopen( "/proc/net/arp", "r" ))) return STATUS_NOT_SUPPORTED;
@@ -1005,10 +1005,10 @@ struct ipv4_route_data
NET_LUID luid;
UINT if_index;
struct in_addr prefix;
- DWORD prefix_len;
+ UINT prefix_len;
struct in_addr next_hop;
- DWORD metric;
- DWORD protocol;
+ UINT metric;
+ UINT protocol;
BYTE loopback;
};
@@ -1060,7 +1060,7 @@ static NTSTATUS ipv4_forward_enumerate_all( void *key_data, UINT key_size, void
void *dynamic_data, UINT dynamic_size,
void *static_data, UINT static_size, UINT_PTR *count )
{
- DWORD num = 0;
+ UINT num = 0;
NTSTATUS status = STATUS_SUCCESS;
BOOL want_data = key_size || rw_size || dynamic_size || static_size;
struct ipv4_route_data entry;
@@ -1072,7 +1072,7 @@ static NTSTATUS ipv4_forward_enumerate_all( void *key_data, UINT key_size, void
{
char buf[512], *ptr;
struct in_addr mask;
- DWORD rtf_flags;
+ UINT rtf_flags;
FILE *fp;
if (!(fp = fopen( "/proc/net/route", "r" ))) return STATUS_NOT_SUPPORTED;
@@ -1249,7 +1249,7 @@ static struct module_table ipv4_tables[] =
{
NSI_IP_COMPARTMENT_TABLE,
{
- sizeof(DWORD), sizeof(struct nsi_ip_cmpt_rw),
+ sizeof(UINT), sizeof(struct nsi_ip_cmpt_rw),
sizeof(struct nsi_ip_cmpt_dynamic), 0
},
NULL,
@@ -1314,7 +1314,7 @@ static struct module_table ipv6_tables[] =
{
NSI_IP_COMPARTMENT_TABLE,
{
- sizeof(DWORD), sizeof(struct nsi_ip_cmpt_rw),
+ sizeof(UINT), sizeof(struct nsi_ip_cmpt_rw),
sizeof(struct nsi_ip_cmpt_dynamic), 0
},
NULL,
diff --git a/dlls/nsiproxy.sys/ndis.c b/dlls/nsiproxy.sys/ndis.c
index 34d20b4be7f..ba4933ff16b 100644
--- a/dlls/nsiproxy.sys/ndis.c
+++ b/dlls/nsiproxy.sys/ndis.c
@@ -95,14 +95,14 @@ struct if_entry
WCHAR *if_name;
char if_unix_name[IFNAMSIZ];
IF_PHYSICAL_ADDRESS if_phys_addr;
- DWORD if_index;
- DWORD if_type;
+ UINT if_index;
+ UINT if_type;
};
static struct list if_list = LIST_INIT( if_list );
static pthread_mutex_t if_list_lock = PTHREAD_MUTEX_INITIALIZER;
-static struct if_entry *find_entry_from_index( DWORD index )
+static struct if_entry *find_entry_from_index( UINT index )
{
struct if_entry *entry;
@@ -123,7 +123,7 @@ static struct if_entry *find_entry_from_luid( const NET_LUID *luid )
}
#if defined (SIOCGIFHWADDR) && defined (HAVE_STRUCT_IFREQ_IFR_HWADDR)
-static NTSTATUS if_get_physical( const char *name, DWORD *type, IF_PHYSICAL_ADDRESS *phys_addr )
+static NTSTATUS if_get_physical( const char *name, UINT *type, IF_PHYSICAL_ADDRESS *phys_addr )
{
int fd, size, i;
struct ifreq ifr;
@@ -132,7 +132,7 @@ static NTSTATUS if_get_physical( const char *name, DWORD *type, IF_PHYSICAL_ADDR
{
unsigned short ifi_type;
IFTYPE mib_type;
- DWORD addr_len;
+ UINT addr_len;
} types[] =
{
{ ARPHRD_LOOPBACK, MIB_IF_TYPE_LOOPBACK, 0 },
@@ -177,7 +177,7 @@ err:
#elif defined (HAVE_SYS_SYSCTL_H) && defined (HAVE_NET_IF_DL_H)
-static NTSTATUS if_get_physical( const char *name, DWORD *type, IF_PHYSICAL_ADDRESS *phys_addr )
+static NTSTATUS if_get_physical( const char *name, UINT *type, IF_PHYSICAL_ADDRESS *phys_addr )
{
struct if_msghdr *ifm;
struct sockaddr_dl *sdl;
@@ -245,7 +245,7 @@ static NTSTATUS if_get_physical( const char *name, DWORD *type, IF_PHYSICAL_ADDR
static WCHAR *strdupAtoW( const char *str )
{
WCHAR *ret = NULL;
- DWORD len;
+ SIZE_T len;
if (!str) return ret;
len = strlen( str ) + 1;
@@ -254,7 +254,7 @@ static WCHAR *strdupAtoW( const char *str )
return ret;
}
-static struct if_entry *add_entry( DWORD index, char *name )
+static struct if_entry *add_entry( UINT index, char *name )
{
struct if_entry *entry;
int name_len = strlen( name );
@@ -451,7 +451,7 @@ static NTSTATUS ifinfo_enumerate_all( void *key_data, UINT key_size, void *rw_da
void *static_data, UINT static_size, UINT_PTR *count )
{
struct if_entry *entry;
- DWORD num = 0;
+ UINT num = 0;
NTSTATUS status = STATUS_SUCCESS;
BOOL want_data = key_size || rw_size || dynamic_size || static_size;
@@ -509,7 +509,7 @@ static NTSTATUS ifinfo_get_all_parameters( const void *key, UINT key_size, void
return status;
}
-static NTSTATUS ifinfo_get_rw_parameter( struct if_entry *entry, void *data, DWORD data_size, DWORD data_offset )
+static NTSTATUS ifinfo_get_rw_parameter( struct if_entry *entry, void *data, UINT data_size, UINT data_offset )
{
switch (data_offset)
{
@@ -527,13 +527,13 @@ static NTSTATUS ifinfo_get_rw_parameter( struct if_entry *entry, void *data, DWO
return STATUS_INVALID_PARAMETER;
}
-static NTSTATUS ifinfo_get_static_parameter( struct if_entry *entry, void *data, DWORD data_size, DWORD data_offset )
+static NTSTATUS ifinfo_get_static_parameter( struct if_entry *entry, void *data, UINT data_size, UINT data_offset )
{
switch (data_offset)
{
case FIELD_OFFSET( struct nsi_ndis_ifinfo_static, if_index ):
- if (data_size != sizeof(DWORD)) return STATUS_INVALID_PARAMETER;
- *(DWORD *)data = entry->if_index;
+ if (data_size != sizeof(UINT)) return STATUS_INVALID_PARAMETER;
+ *(UINT *)data = entry->if_index;
return STATUS_SUCCESS;
case FIELD_OFFSET( struct nsi_ndis_ifinfo_static, if_guid ):
@@ -593,7 +593,7 @@ static NTSTATUS index_luid_get_parameter( const void *key, UINT key_size, UINT p
update_if_table();
- entry = find_entry_from_index( *(DWORD *)key );
+ entry = find_entry_from_index( *(UINT *)key );
if (entry)
{
*(NET_LUID *)data = entry->if_luid;
@@ -660,7 +660,7 @@ static const struct module_table tables[] =
{
NSI_NDIS_INDEX_LUID_TABLE,
{
- sizeof(DWORD), 0,
+ sizeof(UINT), 0,
0, sizeof(NET_LUID)
},
NULL,
diff --git a/dlls/nsiproxy.sys/nsi.c b/dlls/nsiproxy.sys/nsi.c
index fa997d2fe36..b9b04e63545 100644
--- a/dlls/nsiproxy.sys/nsi.c
+++ b/dlls/nsiproxy.sys/nsi.c
@@ -49,7 +49,7 @@ static const struct module *modules[] =
&udp_module,
};
-static const struct module_table *get_module_table( const NPI_MODULEID *id, DWORD table )
+static const struct module_table *get_module_table( const NPI_MODULEID *id, UINT table )
{
const struct module_table *entry;
int i;
@@ -65,7 +65,7 @@ static const struct module_table *get_module_table( const NPI_MODULEID *id, DWOR
NTSTATUS nsi_enumerate_all_ex( struct nsi_enumerate_all_ex *params )
{
const struct module_table *entry = get_module_table( params->module, params->table );
- DWORD sizes[4] = { params->key_size, params->rw_size, params->dynamic_size, params->static_size };
+ UINT sizes[4] = { params->key_size, params->rw_size, params->dynamic_size, params->static_size };
void *data[4] = { params->key_data, params->rw_data, params->dynamic_data, params->static_data };
int i;
diff --git a/dlls/nsiproxy.sys/tcp.c b/dlls/nsiproxy.sys/tcp.c
index 95f99c06f98..8e2d7e749a7 100644
--- a/dlls/nsiproxy.sys/tcp.c
+++ b/dlls/nsiproxy.sys/tcp.c
@@ -143,7 +143,7 @@ static NTSTATUS tcp_stats_get_all_parameters( const void *key, UINT key_size, vo
if (!(ptr = fgets( buf, sizeof(buf), fp ))) break;
if (!ascii_strncasecmp( buf, hdr, sizeof(hdr) - 1 ))
{
- DWORD in_segs, out_segs;
+ UINT in_segs, out_segs;
ptr += sizeof(hdr);
sscanf( ptr, "%u %u %u %u %u %u %u %u %u %u %u %u %u %u",
&stat.rto_algo,
@@ -248,7 +248,7 @@ struct ipv6_addr_scope *get_ipv6_addr_scope_table( unsigned int *size )
while ((ptr = fgets( buf, sizeof(buf), fp )))
{
WORD a[8];
- DWORD scope;
+ UINT scope;
struct ipv6_addr_scope *entry;
unsigned int i;
@@ -519,7 +519,7 @@ static NTSTATUS tcp_conns_enumerate_all( UINT filter, struct nsi_tcp_conn_key *k
struct nsi_tcp_conn_dynamic *dynamic_data, UINT dynamic_size,
struct nsi_tcp_conn_static *static_data, UINT static_size, UINT_PTR *count )
{
- DWORD num = 0;
+ UINT num = 0;
NTSTATUS status = STATUS_SUCCESS;
BOOL want_data = key_size || rw_size || dynamic_size || static_size;
struct nsi_tcp_conn_key key;
@@ -586,8 +586,8 @@ static NTSTATUS tcp_conns_enumerate_all( UINT filter, struct nsi_tcp_conn_key *k
ptr = fgets( buf, sizeof(buf), fp );
while ((ptr = fgets( buf, sizeof(buf), fp )))
{
- DWORD *local_addr = (DWORD *)&key.local.Ipv6.sin6_addr;
- DWORD *remote_addr = (DWORD *)&key.remote.Ipv6.sin6_addr;
+ UINT *local_addr = (UINT *)&key.local.Ipv6.sin6_addr;
+ UINT *remote_addr = (UINT *)&key.remote.Ipv6.sin6_addr;
if (sscanf( ptr, "%*u: %8x%8x%8x%8x:%hx %8x%8x%8x%8x:%hx %x %*s %*s %*s %*s %*s %*s %*s %d",
local_addr, local_addr + 1, local_addr + 2, local_addr + 3, &key.local.Ipv6.sin6_port,
diff --git a/dlls/nsiproxy.sys/udp.c b/dlls/nsiproxy.sys/udp.c
index 1bcbb2532bd..0ba2f835e44 100644
--- a/dlls/nsiproxy.sys/udp.c
+++ b/dlls/nsiproxy.sys/udp.c
@@ -154,7 +154,7 @@ static NTSTATUS udp_stats_get_all_parameters( const void *key, UINT key_size, vo
{ "Udp6OutDatagrams", &out_dgrams },
};
char buf[512], *ptr, *value;
- DWORD res, i;
+ UINT res, i;
FILE *fp;
if (!(fp = fopen( "/proc/net/snmp6", "r" ))) return STATUS_NOT_SUPPORTED;
@@ -206,7 +206,7 @@ static NTSTATUS udp_endpoint_enumerate_all( void *key_data, UINT key_size, void
void *dynamic_data, UINT dynamic_size,
void *static_data, UINT static_size, UINT_PTR *count )
{
- DWORD num = 0;
+ UINT num = 0;
NTSTATUS status = STATUS_SUCCESS;
BOOL want_data = key_size || rw_size || dynamic_size || static_size;
struct nsi_udp_endpoint_key key, *key_out = key_data;
@@ -266,7 +266,7 @@ static NTSTATUS udp_endpoint_enumerate_all( void *key_data, UINT key_size, void
ptr = fgets( buf, sizeof(buf), fp );
while ((ptr = fgets( buf, sizeof(buf), fp )))
{
- DWORD *local_addr = (DWORD *)&key.local.Ipv6.sin6_addr;
+ UINT *local_addr = (UINT *)&key.local.Ipv6.sin6_addr;
if (sscanf( ptr, "%*u: %8x%8x%8x%8x:%hx %*s %*s %*s %*s %*s %*s %*s %d",
local_addr, local_addr + 1, local_addr + 2, local_addr + 3,
--
2.23.0
1
0
[PATCH v2 3/6] nsiproxy: Don't use long types in internal structure / helpers.
by Huw Davies April 25, 2022
by Huw Davies April 25, 2022
April 25, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/nsiproxy.sys/ip.c | 84 ++++++++++++++--------------
dlls/nsiproxy.sys/ndis.c | 20 +++----
dlls/nsiproxy.sys/nsiproxy_private.h | 18 +++---
dlls/nsiproxy.sys/tcp.c | 32 +++++------
dlls/nsiproxy.sys/udp.c | 16 +++---
dlls/nsiproxy.sys/unix_private.h | 36 ++++++------
6 files changed, 103 insertions(+), 103 deletions(-)
diff --git a/dlls/nsiproxy.sys/ip.c b/dlls/nsiproxy.sys/ip.c
index 3194dd15524..15c03985808 100644
--- a/dlls/nsiproxy.sys/ip.c
+++ b/dlls/nsiproxy.sys/ip.c
@@ -151,10 +151,10 @@ static NTSTATUS read_sysctl_int( const char *file, int *val )
}
#endif
-static NTSTATUS ip_cmpt_get_all_parameters( DWORD fam, const DWORD *key, DWORD key_size,
- struct nsi_ip_cmpt_rw *rw_data, DWORD rw_size,
- struct nsi_ip_cmpt_dynamic *dynamic_data, DWORD dynamic_size,
- void *static_data, DWORD static_size )
+static NTSTATUS ip_cmpt_get_all_parameters( UINT fam, const UINT *key, UINT key_size,
+ struct nsi_ip_cmpt_rw *rw_data, UINT rw_size,
+ struct nsi_ip_cmpt_dynamic *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size )
{
const NPI_MODULEID *ip_mod = (fam == AF_INET) ? &NPI_MS_IPV4_MODULEID : &NPI_MS_IPV6_MODULEID;
struct nsi_ip_cmpt_rw rw;
@@ -219,8 +219,8 @@ static NTSTATUS ip_cmpt_get_all_parameters( DWORD fam, const DWORD *key, DWORD k
return STATUS_SUCCESS;
}
-static NTSTATUS ipv4_cmpt_get_all_parameters( const void *key, DWORD key_size, void *rw_data, DWORD rw_size,
- void *dynamic_data, DWORD dynamic_size, void *static_data, DWORD static_size )
+static NTSTATUS ipv4_cmpt_get_all_parameters( const void *key, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size, void *static_data, UINT static_size )
{
TRACE( "%p %d %p %d %p %d %p %d\n", key, key_size, rw_data, rw_size, dynamic_data, dynamic_size,
static_data, static_size );
@@ -228,8 +228,8 @@ static NTSTATUS ipv4_cmpt_get_all_parameters( const void *key, DWORD key_size, v
dynamic_data, dynamic_size, static_data, static_size );
}
-static NTSTATUS ipv6_cmpt_get_all_parameters( const void *key, DWORD key_size, void *rw_data, DWORD rw_size,
- void *dynamic_data, DWORD dynamic_size, void *static_data, DWORD static_size )
+static NTSTATUS ipv6_cmpt_get_all_parameters( const void *key, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size, void *static_data, UINT static_size )
{
TRACE( "%p %d %p %d %p %d %p %d\n", key, key_size, rw_data, rw_size, dynamic_data, dynamic_size,
static_data, static_size );
@@ -237,8 +237,8 @@ static NTSTATUS ipv6_cmpt_get_all_parameters( const void *key, DWORD key_size, v
dynamic_data, dynamic_size, static_data, static_size );
}
-static NTSTATUS ipv4_icmpstats_get_all_parameters( const void *key, DWORD key_size, void *rw_data, DWORD rw_size,
- void *dynamic_data, DWORD dynamic_size, void *static_data, DWORD static_size )
+static NTSTATUS ipv4_icmpstats_get_all_parameters( const void *key, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size, void *static_data, UINT static_size )
{
struct nsi_ip_icmpstats_dynamic dyn;
@@ -352,8 +352,8 @@ static NTSTATUS ipv4_icmpstats_get_all_parameters( const void *key, DWORD key_si
#endif
}
-static NTSTATUS ipv6_icmpstats_get_all_parameters( const void *key, DWORD key_size, void *rw_data, DWORD rw_size,
- void *dynamic_data, DWORD dynamic_size, void *static_data, DWORD static_size )
+static NTSTATUS ipv6_icmpstats_get_all_parameters( const void *key, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size, void *static_data, UINT static_size )
{
struct nsi_ip_icmpstats_dynamic dyn;
@@ -478,8 +478,8 @@ static NTSTATUS ipv6_icmpstats_get_all_parameters( const void *key, DWORD key_si
#endif
}
-static NTSTATUS ipv4_ipstats_get_all_parameters( const void *key, DWORD key_size, void *rw_data, DWORD rw_size,
- void *dynamic_data, DWORD dynamic_size, void *static_data, DWORD static_size )
+static NTSTATUS ipv4_ipstats_get_all_parameters( const void *key, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size, void *static_data, UINT static_size )
{
struct nsi_ip_ipstats_dynamic dyn;
struct nsi_ip_ipstats_static stat;
@@ -584,8 +584,8 @@ static NTSTATUS ipv4_ipstats_get_all_parameters( const void *key, DWORD key_size
#endif
}
-static NTSTATUS ipv6_ipstats_get_all_parameters( const void *key, DWORD key_size, void *rw_data, DWORD rw_size,
- void *dynamic_data, DWORD dynamic_size, void *static_data, DWORD static_size )
+static NTSTATUS ipv6_ipstats_get_all_parameters( const void *key, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size, void *static_data, UINT static_size )
{
struct nsi_ip_ipstats_dynamic dyn;
struct nsi_ip_ipstats_static stat;
@@ -719,9 +719,9 @@ static void unicast_fill_entry( struct ifaddrs *entry, void *key, struct nsi_ip_
if (stat) stat->creation_time = get_boot_time();
}
-static NTSTATUS ip_unicast_enumerate_all( int family, 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_PTR *count )
+static NTSTATUS ip_unicast_enumerate_all( int family, void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
DWORD num = 0;
NTSTATUS status = STATUS_SUCCESS;
@@ -756,25 +756,25 @@ static NTSTATUS ip_unicast_enumerate_all( int family, void *key_data, DWORD key_
return status;
}
-static NTSTATUS ipv4_unicast_enumerate_all( 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_PTR *count )
+static NTSTATUS ipv4_unicast_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
return ip_unicast_enumerate_all( AF_INET, key_data, key_size, rw_data, rw_size,
dynamic_data, dynamic_size, static_data, static_size, count );
}
-static NTSTATUS ipv6_unicast_enumerate_all( 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_PTR *count )
+static NTSTATUS ipv6_unicast_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
return ip_unicast_enumerate_all( AF_INET6, key_data, key_size, rw_data, rw_size,
dynamic_data, dynamic_size, static_data, static_size, count );
}
-static NTSTATUS ip_unicast_get_all_parameters( const void *key, DWORD key_size, void *rw_data, DWORD rw_size,
- void *dynamic_data, DWORD dynamic_size,
- void *static_data, DWORD static_size )
+static NTSTATUS ip_unicast_get_all_parameters( const void *key, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size )
{
int family = (key_size == sizeof(struct nsi_ipv4_unicast_key)) ? AF_INET : AF_INET6;
NTSTATUS status = STATUS_NOT_FOUND;
@@ -812,7 +812,7 @@ static NTSTATUS ip_unicast_get_all_parameters( const void *key, DWORD key_size,
struct ipv4_neighbour_data
{
NET_LUID luid;
- DWORD if_index;
+ UINT if_index;
struct in_addr addr;
BYTE phys_addr[IF_MAX_PHYS_ADDRESS_LENGTH];
DWORD state;
@@ -850,9 +850,9 @@ static void ipv4_neighbour_fill_entry( struct ipv4_neighbour_data *entry, struct
}
}
-static NTSTATUS ipv4_neighbour_enumerate_all( 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_PTR *count )
+static NTSTATUS ipv4_neighbour_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
DWORD num = 0;
NTSTATUS status = STATUS_SUCCESS;
@@ -992,9 +992,9 @@ static NTSTATUS ipv4_neighbour_enumerate_all( void *key_data, DWORD key_size, vo
return status;
}
-static NTSTATUS ipv6_neighbour_enumerate_all( 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_PTR *count )
+static NTSTATUS ipv6_neighbour_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
FIXME( "not implemented\n" );
return STATUS_NOT_IMPLEMENTED;
@@ -1003,7 +1003,7 @@ static NTSTATUS ipv6_neighbour_enumerate_all( void *key_data, DWORD key_size, vo
struct ipv4_route_data
{
NET_LUID luid;
- DWORD if_index;
+ UINT if_index;
struct in_addr prefix;
DWORD prefix_len;
struct in_addr next_hop;
@@ -1056,9 +1056,9 @@ static void ipv4_forward_fill_entry( struct ipv4_route_data *entry, struct nsi_i
}
}
-static NTSTATUS ipv4_forward_enumerate_all( 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_PTR *count )
+static NTSTATUS ipv4_forward_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
DWORD num = 0;
NTSTATUS status = STATUS_SUCCESS;
@@ -1235,9 +1235,9 @@ static NTSTATUS ipv4_forward_enumerate_all( void *key_data, DWORD key_size, void
return status;
}
-static NTSTATUS ipv6_forward_enumerate_all( 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_PTR *count )
+static NTSTATUS ipv6_forward_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
FIXME( "not implemented\n" );
*count = 0;
diff --git a/dlls/nsiproxy.sys/ndis.c b/dlls/nsiproxy.sys/ndis.c
index 036e8f1eb0c..34d20b4be7f 100644
--- a/dlls/nsiproxy.sys/ndis.c
+++ b/dlls/nsiproxy.sys/ndis.c
@@ -446,9 +446,9 @@ static void ifinfo_fill_entry( struct if_entry *entry, NET_LUID *key, struct nsi
}
}
-static NTSTATUS ifinfo_enumerate_all( 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_PTR *count )
+static NTSTATUS ifinfo_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
struct if_entry *entry;
DWORD num = 0;
@@ -483,9 +483,9 @@ static NTSTATUS ifinfo_enumerate_all( void *key_data, DWORD key_size, void *rw_d
return status;
}
-static NTSTATUS ifinfo_get_all_parameters( const void *key, DWORD key_size, void *rw_data, DWORD rw_size,
- void *dynamic_data, DWORD dynamic_size,
- void *static_data, DWORD static_size )
+static NTSTATUS ifinfo_get_all_parameters( const void *key, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size )
{
struct if_entry *entry;
NTSTATUS status = STATUS_OBJECT_NAME_NOT_FOUND;
@@ -547,8 +547,8 @@ static NTSTATUS ifinfo_get_static_parameter( struct if_entry *entry, void *data,
return STATUS_INVALID_PARAMETER;
}
-static NTSTATUS ifinfo_get_parameter( const void *key, DWORD key_size, DWORD param_type,
- void *data, DWORD data_size, DWORD data_offset )
+static NTSTATUS ifinfo_get_parameter( const void *key, UINT key_size, UINT param_type,
+ void *data, UINT data_size, UINT data_offset )
{
struct if_entry *entry;
NTSTATUS status = STATUS_OBJECT_NAME_NOT_FOUND;
@@ -578,8 +578,8 @@ static NTSTATUS ifinfo_get_parameter( const void *key, DWORD key_size, DWORD par
return status;
}
-static NTSTATUS index_luid_get_parameter( const void *key, DWORD key_size, DWORD param_type,
- void *data, DWORD data_size, DWORD data_offset )
+static NTSTATUS index_luid_get_parameter( const void *key, UINT key_size, UINT param_type,
+ void *data, UINT data_size, UINT data_offset )
{
struct if_entry *entry;
NTSTATUS status = STATUS_OBJECT_NAME_NOT_FOUND;
diff --git a/dlls/nsiproxy.sys/nsiproxy_private.h b/dlls/nsiproxy.sys/nsiproxy_private.h
index bdea1c6cf2e..4bd269a0691 100644
--- a/dlls/nsiproxy.sys/nsiproxy_private.h
+++ b/dlls/nsiproxy.sys/nsiproxy_private.h
@@ -30,7 +30,7 @@ struct icmp_send_echo_params
{
SOCKADDR_INET *dst;
void *request, *reply;
- DWORD request_size, reply_len;
+ UINT request_size, reply_len;
BYTE bits, ttl, tos;
HANDLE handle;
};
@@ -38,27 +38,27 @@ struct icmp_send_echo_params
/* output for IOCTL_NSIPROXY_WINE_ICMP_ECHO - cf. ICMP_ECHO_REPLY */
struct icmp_echo_reply_32
{
- ULONG addr;
- ULONG status;
- ULONG round_trip_time;
+ UINT addr;
+ UINT status;
+ UINT round_trip_time;
USHORT data_size;
USHORT num_of_pkts;
- ULONG data_ptr;
+ UINT data_ptr;
struct
{
BYTE ttl;
BYTE tos;
BYTE flags;
BYTE options_size;
- ULONG options_ptr;
+ UINT options_ptr;
} opts;
};
struct icmp_echo_reply_64
{
- ULONG addr;
- ULONG status;
- ULONG round_trip_time;
+ UINT addr;
+ UINT status;
+ UINT round_trip_time;
USHORT data_size;
USHORT num_of_pkts;
ULONGLONG data_ptr;
diff --git a/dlls/nsiproxy.sys/tcp.c b/dlls/nsiproxy.sys/tcp.c
index 491ac797100..95f99c06f98 100644
--- a/dlls/nsiproxy.sys/tcp.c
+++ b/dlls/nsiproxy.sys/tcp.c
@@ -111,8 +111,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(nsi);
-static NTSTATUS tcp_stats_get_all_parameters( const void *key, DWORD key_size, void *rw_data, DWORD rw_size,
- void *dynamic_data, DWORD dynamic_size, void *static_data, DWORD static_size )
+static NTSTATUS tcp_stats_get_all_parameters( const void *key, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size, void *static_data, UINT static_size )
{
struct nsi_tcp_stats_dynamic dyn;
struct nsi_tcp_stats_static stat;
@@ -322,7 +322,7 @@ failed:
return NULL;
}
-DWORD find_ipv6_addr_scope( const IN6_ADDR *addr, const struct ipv6_addr_scope *table, unsigned int size )
+UINT find_ipv6_addr_scope( const IN6_ADDR *addr, const struct ipv6_addr_scope *table, unsigned int size )
{
const BYTE multicast_scope_mask = 0x0F;
const BYTE multicast_scope_shift = 0;
@@ -514,10 +514,10 @@ unsigned int find_owning_pid( struct pid_map *map, unsigned int num_entries, UIN
#endif
}
-static NTSTATUS tcp_conns_enumerate_all( DWORD filter, struct nsi_tcp_conn_key *key_data, DWORD key_size,
- void *rw, DWORD rw_size,
- struct nsi_tcp_conn_dynamic *dynamic_data, DWORD dynamic_size,
- struct nsi_tcp_conn_static *static_data, DWORD static_size, DWORD_PTR *count )
+static NTSTATUS tcp_conns_enumerate_all( UINT filter, struct nsi_tcp_conn_key *key_data, UINT key_size,
+ void *rw, UINT rw_size,
+ struct nsi_tcp_conn_dynamic *dynamic_data, UINT dynamic_size,
+ struct nsi_tcp_conn_static *static_data, UINT static_size, UINT_PTR *count )
{
DWORD num = 0;
NTSTATUS status = STATUS_SUCCESS;
@@ -741,9 +741,9 @@ static NTSTATUS tcp_conns_enumerate_all( DWORD filter, struct nsi_tcp_conn_key *
return status;
}
-static NTSTATUS tcp_all_enumerate_all( 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_PTR *count )
+static NTSTATUS tcp_all_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
TRACE( "%p %d %p %d %p %d %p %d %p\n", key_data, key_size, rw_data, rw_size,
dynamic_data, dynamic_size, static_data, static_size, count );
@@ -752,9 +752,9 @@ static NTSTATUS tcp_all_enumerate_all( void *key_data, DWORD key_size, void *rw_
dynamic_data, dynamic_size, static_data, static_size, count );
}
-static NTSTATUS tcp_estab_enumerate_all( 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_PTR *count )
+static NTSTATUS tcp_estab_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
TRACE( "%p %d %p %d %p %d %p %d %p\n", key_data, key_size, rw_data, rw_size,
dynamic_data, dynamic_size, static_data, static_size, count );
@@ -763,9 +763,9 @@ static NTSTATUS tcp_estab_enumerate_all( void *key_data, DWORD key_size, void *r
dynamic_data, dynamic_size, static_data, static_size, count );
}
-static NTSTATUS tcp_listen_enumerate_all( 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_PTR *count )
+static NTSTATUS tcp_listen_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
TRACE( "%p %d %p %d %p %d %p %d %p\n", key_data, key_size, rw_data, rw_size,
dynamic_data, dynamic_size, static_data, static_size, count );
diff --git a/dlls/nsiproxy.sys/udp.c b/dlls/nsiproxy.sys/udp.c
index fe05bc875cf..1bcbb2532bd 100644
--- a/dlls/nsiproxy.sys/udp.c
+++ b/dlls/nsiproxy.sys/udp.c
@@ -83,9 +83,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(nsi);
-static DWORD udp_num_addrs( USHORT family )
+static UINT udp_num_addrs( USHORT family )
{
- DWORD endpoint_count = 0;
+ UINT endpoint_count = 0;
nsi_enumerate_all( 1, 0, &NPI_MS_UDP_MODULEID, NSI_UDP_ENDPOINT_TABLE,
NULL, 0, NULL, 0, NULL, 0, NULL, 0, &endpoint_count );
@@ -93,8 +93,8 @@ static DWORD udp_num_addrs( USHORT family )
return endpoint_count;
}
-static NTSTATUS udp_stats_get_all_parameters( const void *key, DWORD key_size, void *rw_data, DWORD rw_size,
- void *dynamic_data, DWORD dynamic_size, void *static_data, DWORD static_size )
+static NTSTATUS udp_stats_get_all_parameters( const void *key, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size, void *static_data, UINT static_size )
{
struct nsi_udp_stats_dynamic dyn;
const USHORT *family = key;
@@ -145,7 +145,7 @@ static NTSTATUS udp_stats_get_all_parameters( const void *key, DWORD key_size, v
struct
{
const char *name;
- DWORD *elem;
+ UINT *elem;
} udp_stat_list[] =
{
{ "Udp6InDatagrams", &in_dgrams },
@@ -202,9 +202,9 @@ static NTSTATUS udp_stats_get_all_parameters( const void *key, DWORD key_size, v
return STATUS_NOT_SUPPORTED;
}
-static NTSTATUS udp_endpoint_enumerate_all( 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_PTR *count )
+static NTSTATUS udp_endpoint_enumerate_all( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count )
{
DWORD num = 0;
NTSTATUS status = STATUS_SUCCESS;
diff --git a/dlls/nsiproxy.sys/unix_private.h b/dlls/nsiproxy.sys/unix_private.h
index ffb48cc7380..8ab56f6d9a3 100644
--- a/dlls/nsiproxy.sys/unix_private.h
+++ b/dlls/nsiproxy.sys/unix_private.h
@@ -22,10 +22,10 @@ NTSTATUS nsi_enumerate_all_ex( struct nsi_enumerate_all_ex *params ) DECLSPEC_HI
NTSTATUS nsi_get_all_parameters_ex( struct nsi_get_all_parameters_ex *params ) DECLSPEC_HIDDEN;
NTSTATUS nsi_get_parameter_ex( struct nsi_get_parameter_ex *params ) DECLSPEC_HIDDEN;
-static inline NTSTATUS nsi_enumerate_all( DWORD unk, DWORD unk2, 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 )
+static inline NTSTATUS nsi_enumerate_all( UINT unk, UINT unk2, const NPI_MODULEID *module, UINT table,
+ void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size, void *static_data, UINT static_size,
+ UINT *count )
{
struct nsi_enumerate_all_ex params;
NTSTATUS status;
@@ -54,7 +54,7 @@ static inline NTSTATUS nsi_enumerate_all( DWORD unk, DWORD unk2, const NPI_MODUL
BOOL convert_luid_to_unix_name( const NET_LUID *luid, const char **unix_name ) DECLSPEC_HIDDEN;
BOOL convert_unix_name_to_luid( const char *unix_name, NET_LUID *luid ) DECLSPEC_HIDDEN;
-static inline BOOL convert_luid_to_index( const NET_LUID *luid, DWORD *index )
+static inline BOOL convert_luid_to_index( const NET_LUID *luid, UINT *index )
{
struct nsi_get_parameter_ex params;
params.unknown[0] = 0;
@@ -73,7 +73,7 @@ static inline BOOL convert_luid_to_index( const NET_LUID *luid, DWORD *index )
return !nsi_get_parameter_ex( ¶ms );
}
-static inline BOOL convert_index_to_luid( DWORD index, NET_LUID *luid )
+static inline BOOL convert_index_to_luid( UINT index, NET_LUID *luid )
{
struct nsi_get_parameter_ex params;
params.unknown[0] = 0;
@@ -95,11 +95,11 @@ static inline BOOL convert_index_to_luid( DWORD index, NET_LUID *luid )
struct ipv6_addr_scope
{
IN6_ADDR addr;
- DWORD scope;
+ UINT scope;
};
struct ipv6_addr_scope *get_ipv6_addr_scope_table( unsigned int *size ) DECLSPEC_HIDDEN;
-DWORD find_ipv6_addr_scope( const IN6_ADDR *addr, const struct ipv6_addr_scope *table, unsigned int size ) DECLSPEC_HIDDEN;
+UINT find_ipv6_addr_scope( const IN6_ADDR *addr, const struct ipv6_addr_scope *table, unsigned int size ) DECLSPEC_HIDDEN;
struct pid_map
{
@@ -112,16 +112,16 @@ unsigned int find_owning_pid( struct pid_map *map, unsigned int num_entries, UIN
struct module_table
{
- DWORD table;
- DWORD sizes[4];
- NTSTATUS (*enumerate_all)( 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_PTR *count );
- NTSTATUS (*get_all_parameters)( const void *key, DWORD key_size, void *rw_data, DWORD rw_size,
- void *dynamic_data, DWORD dynamic_size,
- void *static_data, DWORD static_size );
- NTSTATUS (*get_parameter)( const void *key, DWORD key_size, DWORD param_type,
- void *data, DWORD data_size, DWORD data_offset );
+ UINT table;
+ UINT sizes[4];
+ NTSTATUS (*enumerate_all)( void *key_data, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size, UINT_PTR *count );
+ NTSTATUS (*get_all_parameters)( const void *key, UINT key_size, void *rw_data, UINT rw_size,
+ void *dynamic_data, UINT dynamic_size,
+ void *static_data, UINT static_size );
+ NTSTATUS (*get_parameter)( const void *key, UINT key_size, UINT param_type,
+ void *data, UINT data_size, UINT data_offset );
};
struct module
--
2.23.0
1
0
April 25, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/nsi/tests/Makefile.in | 1 -
dlls/nsi/tests/nsi.c | 196 ++++++++++++++++++-------------------
2 files changed, 98 insertions(+), 99 deletions(-)
diff --git a/dlls/nsi/tests/Makefile.in b/dlls/nsi/tests/Makefile.in
index f43da86076c..98129935198 100644
--- a/dlls/nsi/tests/Makefile.in
+++ b/dlls/nsi/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = nsi.dll
IMPORTS = nsi uuid iphlpapi
diff --git a/dlls/nsi/tests/nsi.c b/dlls/nsi/tests/nsi.c
index fc85d4ba8ff..b6dd8f2416d 100644
--- a/dlls/nsi/tests/nsi.c
+++ b/dlls/nsi/tests/nsi.c
@@ -62,19 +62,19 @@ static void test_nsi_api( void )
(void **)&stat_tbl, sizeof(*stat_tbl), &count, 0 );
if (!err) break;
}
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
rw_size = rw_sizes[i];
for (i = 0; i < count; i++)
{
- winetest_push_context( "%d", i );
+ winetest_push_context( "%ld", i );
rw = (struct nsi_ndis_ifinfo_rw *)((BYTE *)rw_tbl + i * rw_size);
dyn = dyn_tbl + i;
stat = stat_tbl + i;
err = NsiGetAllParameters( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl + i, sizeof(*luid_tbl),
&get_rw, rw_size, &get_dyn, sizeof(get_dyn), &get_stat, sizeof(get_stat) );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
/* test a selection of members */
ok( IsEqualGUID( &get_rw.network_guid, &rw->network_guid ), "mismatch\n" );
ok( get_rw.alias.Length == rw->alias.Length, "mismatch\n" );
@@ -103,7 +103,7 @@ static void test_nsi_api( void )
get_all_params.static_size = sizeof(get_stat);
err = NsiGetAllParametersEx( &get_all_params );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
/* test a selection of members */
ok( IsEqualGUID( &get_rw.network_guid, &rw->network_guid ), "mismatch\n" );
ok( get_rw.alias.Length == rw->alias.Length, "mismatch\n" );
@@ -121,20 +121,20 @@ static void test_nsi_api( void )
err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl + i, sizeof(*luid_tbl),
NSI_PARAM_TYPE_RW, &get_rw.alias, sizeof(get_rw.alias),
FIELD_OFFSET(struct nsi_ndis_ifinfo_rw, alias) );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ok( get_rw.alias.Length == rw->alias.Length, "mismatch\n" );
ok( !memcmp( get_rw.alias.String, rw->alias.String, rw->alias.Length ), "mismatch\n" );
err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl + i, sizeof(*luid_tbl),
NSI_PARAM_TYPE_STATIC, &get_stat.if_index, sizeof(get_stat.if_index),
FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_index) );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ok( get_stat.if_index == stat->if_index, "mismatch\n" );
err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl + i, sizeof(*luid_tbl),
NSI_PARAM_TYPE_STATIC, &get_stat.if_guid, sizeof(get_stat.if_guid),
FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_guid) );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ok( IsEqualGUID( &get_stat.if_guid, &stat->if_guid ), "mismatch\n" );
memset( &get_rw, 0xcc, sizeof(get_rw) );
@@ -153,7 +153,7 @@ static void test_nsi_api( void )
get_param.data_size = sizeof(get_rw.alias);
get_param.data_offset = FIELD_OFFSET(struct nsi_ndis_ifinfo_rw, alias);
err = NsiGetParameterEx( &get_param );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ok( get_rw.alias.Length == rw->alias.Length, "mismatch\n" );
ok( !memcmp( get_rw.alias.String, rw->alias.String, rw->alias.Length ), "mismatch\n" );
@@ -162,7 +162,7 @@ static void test_nsi_api( void )
get_param.data_size = sizeof(get_stat.if_index);
get_param.data_offset = FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_index);
err = NsiGetParameterEx( &get_param );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ok( get_stat.if_index == stat->if_index, "mismatch\n" );
get_param.param_type = NSI_PARAM_TYPE_STATIC;
@@ -170,7 +170,7 @@ static void test_nsi_api( void )
get_param.data_size = sizeof(get_stat.if_guid);
get_param.data_offset = FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_guid);
err = NsiGetParameterEx( &get_param );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ok( IsEqualGUID( &get_stat.if_guid, &stat->if_guid ), "mismatch\n" );
winetest_pop_context();
}
@@ -179,7 +179,7 @@ static void test_nsi_api( void )
err = NsiEnumerateObjectsAllParameters( 1, 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE,
NULL, 0, NULL, 0,
NULL, 0, NULL, 0, &enum_count );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ok( enum_count == count, "mismatch\n" );
enum_luid_tbl = malloc( count * sizeof(*enum_luid_tbl) );
@@ -191,12 +191,12 @@ static void test_nsi_api( void )
enum_luid_tbl, sizeof(*enum_luid_tbl), enum_rw_tbl, rw_size,
enum_dyn_tbl, sizeof(*enum_dyn_tbl), enum_stat_tbl, sizeof(*enum_stat_tbl),
&enum_count );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ok( enum_count == count, "mismatch\n" );
for (i = 0; i < count; i++)
{
- winetest_push_context( "%d", i );
+ winetest_push_context( "%ld", i );
rw = (struct nsi_ndis_ifinfo_rw *)((BYTE *)rw_tbl + i * rw_size);
enum_rw = (struct nsi_ndis_ifinfo_rw *)((BYTE *)enum_rw_tbl + i * rw_size);
dyn = dyn_tbl + i;
@@ -226,11 +226,11 @@ static void test_nsi_api( void )
enum_luid_tbl, sizeof(*enum_luid_tbl), enum_rw_tbl, rw_size,
enum_dyn_tbl, sizeof(*enum_dyn_tbl), enum_stat_tbl, sizeof(*enum_stat_tbl),
&enum_count );
- ok( err == ERROR_MORE_DATA, "got %d\n", err );
+ ok( err == ERROR_MORE_DATA, "got %ld\n", err );
ok( enum_count == count - 1, "mismatch\n" );
for (i = 0; i < enum_count; i++) /* for simplicity just check the luids */
- ok( enum_luid_tbl[i].Value == luid_tbl[i].Value, "%d: mismatch\n", i );
+ ok( enum_luid_tbl[i].Value == luid_tbl[i].Value, "%ld: mismatch\n", i );
}
memset( &enum_params, 0, sizeof(enum_params) );
@@ -249,7 +249,7 @@ static void test_nsi_api( void )
enum_params.count = count;
err = NsiEnumerateObjectsAllParametersEx( &enum_params );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ok( enum_params.count == count, "mismatch\n" );
free( enum_luid_tbl );
@@ -279,21 +279,21 @@ static void test_ndis_ifinfo( void )
(void **)&stat_tbl, sizeof(*stat_tbl), &count, 0 );
if (!err) break;
}
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
if (err) return;
rw_size = rw_sizes[i];
err = GetIfTable2( &table );
- ok( !err, "got %d\n", err );
- ok( table->NumEntries == count, "table entries %d count %d\n", table->NumEntries, count );
+ ok( !err, "got %ld\n", err );
+ ok( table->NumEntries == count, "table entries %ld count %ld\n", table->NumEntries, count );
/* Grab the dyn table again to provide an upper bound for the stats returned from GetIfTable2().
(The luids must be retrieved again otherwise NsiAllocateAndGetTable() fails). */
err = NsiAllocateAndGetTable( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, (void **)&luid_tbl_2, sizeof(*luid_tbl_2),
NULL, 0, (void **)&dyn_tbl_2, sizeof(*dyn_tbl_2),
NULL, 0, &count, 0 );
- ok( !err, "got %d\n", err );
- ok( table->NumEntries == count, "table entries %d count %d\n", table->NumEntries, count );
+ ok( !err, "got %ld\n", err );
+ ok( table->NumEntries == count, "table entries %ld count %ld\n", table->NumEntries, count );
for (i = 0; i < count; i++)
{
@@ -303,7 +303,7 @@ static void test_ndis_ifinfo( void )
struct nsi_ndis_ifinfo_dynamic *dyn = dyn_tbl + i, *dyn_2 = dyn_tbl_2 + i;
struct nsi_ndis_ifinfo_static *stat = stat_tbl + i;
- winetest_push_context( "%d", i );
+ winetest_push_context( "%ld", i );
ok( row->InterfaceLuid.Value == luid->Value, "mismatch\n" );
ok( row->InterfaceIndex == stat->if_index, "mismatch\n" );
ok( IsEqualGUID( &row->InterfaceGuid, &stat->if_guid ), "mismatch\n" );
@@ -367,25 +367,25 @@ static void test_ndis_ifinfo( void )
err = NsiGetAllParameters( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl, sizeof(*luid_tbl),
&rw_get, rw_size, &dyn_get, sizeof(dyn_get),
&stat_get, sizeof(stat_get) );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ok( IsEqualGUID( &stat_tbl[0].if_guid, &stat_get.if_guid ), "mismatch\n" );
err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, luid_tbl, sizeof(*luid_tbl),
NSI_PARAM_TYPE_STATIC, &stat_get.if_guid, sizeof(stat_get.if_guid),
FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_guid) );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
ok( IsEqualGUID( &stat_tbl[0].if_guid, &stat_get.if_guid ), "mismatch\n" );
luid_get.Value = ~0u;
err = NsiGetAllParameters( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, &luid_get, sizeof(luid_get),
&rw_get, rw_size, &dyn_get, sizeof(dyn_get),
&stat_get, sizeof(stat_get) );
- ok( err == ERROR_FILE_NOT_FOUND, "got %d\n", err );
+ ok( err == ERROR_FILE_NOT_FOUND, "got %ld\n", err );
err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, &luid_get, sizeof(luid_get),
NSI_PARAM_TYPE_STATIC, &stat_get.if_guid, sizeof(stat_get.if_guid),
FIELD_OFFSET(struct nsi_ndis_ifinfo_static, if_guid) );
- ok( err == ERROR_FILE_NOT_FOUND, "got %d\n", err );
+ ok( err == ERROR_FILE_NOT_FOUND, "got %ld\n", err );
FreeMibTable( table );
NsiFreeTable( luid_tbl_2, NULL, dyn_tbl_2, NULL );
@@ -403,22 +403,22 @@ static void test_ndis_index_luid( void )
/* first get the luids */
err = NsiAllocateAndGetTable( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_IFINFO_TABLE, (void **)&luids, sizeof(*luids),
NULL, 0, NULL, 0, NULL, 0, &count, 0 );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
for (i = 0; i < count; i++)
{
ConvertInterfaceLuidToIndex( luids + i, &index );
err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_INDEX_LUID_TABLE, &index, sizeof(index),
NSI_PARAM_TYPE_STATIC, &luid, sizeof(luid), 0 );
- ok( !err, "got %d\n", err );
- ok( luid.Value == luids[i].Value, "%d: luid mismatch\n", i );
+ ok( !err, "got %ld\n", err );
+ ok( luid.Value == luids[i].Value, "%ld: luid mismatch\n", i );
}
NsiFreeTable( luids, NULL, NULL, NULL );
index = ~0u;
err = NsiGetParameter( 1, &NPI_MS_NDIS_MODULEID, NSI_NDIS_INDEX_LUID_TABLE, &index, sizeof(index),
NSI_PARAM_TYPE_STATIC, &luid, sizeof(luid), 0 );
- ok( err == ERROR_FILE_NOT_FOUND, "got %d\n", err );
+ ok( err == ERROR_FILE_NOT_FOUND, "got %ld\n", err );
}
static void test_ip_cmpt( int family )
@@ -440,17 +440,17 @@ static void test_ip_cmpt( int family )
err = NsiGetAllParameters( 1, mod, 2, &key, sizeof(key), &rw, rw_sizes[i], &dyn, sizeof(dyn), NULL, 0 );
if (!err) break;
}
- ok( !err, "got %x\n", err );
+ ok( !err, "got %lx\n", err );
err = GetIpStatisticsEx( &table, family );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
if (err) goto err;
- ok( table.dwForwarding - 1 == rw.not_forwarding, "%x vs %x\n", table.dwForwarding, rw.not_forwarding );
- ok( table.dwDefaultTTL == rw.default_ttl, "%x vs %x\n", table.dwDefaultTTL, rw.default_ttl );
- ok( table.dwNumIf == dyn.num_ifs, "%x vs %x\n", table.dwNumIf, dyn.num_ifs );
- ok( table.dwNumAddr == dyn.num_addrs, "%x vs %x\n", table.dwNumAddr, dyn.num_addrs );
- ok( table.dwNumRoutes == dyn.num_routes, "%x vs %x\n", table.dwNumRoutes, dyn.num_routes );
+ ok( table.dwForwarding - 1 == rw.not_forwarding, "%lx vs %x\n", table.dwForwarding, rw.not_forwarding );
+ ok( table.dwDefaultTTL == rw.default_ttl, "%lx vs %x\n", table.dwDefaultTTL, rw.default_ttl );
+ ok( table.dwNumIf == dyn.num_ifs, "%lx vs %x\n", table.dwNumIf, dyn.num_ifs );
+ ok( table.dwNumAddr == dyn.num_addrs, "%lx vs %x\n", table.dwNumAddr, dyn.num_addrs );
+ ok( table.dwNumRoutes == dyn.num_routes, "%lx vs %x\n", table.dwNumRoutes, dyn.num_routes );
err:
winetest_pop_context();
@@ -466,15 +466,15 @@ static void test_ip_icmpstats( int family )
winetest_push_context( family == AF_INET ? "AF_INET" : "AF_INET6" );
err = NsiGetAllParameters( 1, mod, NSI_IP_ICMPSTATS_TABLE, NULL, 0, NULL, 0, &nsi_stats, sizeof(nsi_stats), NULL, 0 );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
if (err) goto err;
err = GetIcmpStatisticsEx( &table, family );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
if (err) goto err;
err = NsiGetAllParameters( 1, mod, NSI_IP_ICMPSTATS_TABLE, NULL, 0, NULL, 0, &nsi_stats2, sizeof(nsi_stats2), NULL, 0 );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
expect_bounded( "icmpInStats.dwMsgs", table.icmpInStats.dwMsgs, nsi_stats.in_msgs, nsi_stats2.in_msgs );
expect_bounded( "icmpInStats.dwErrors", table.icmpInStats.dwErrors, nsi_stats.in_errors, nsi_stats2.in_errors );
@@ -482,7 +482,7 @@ static void test_ip_icmpstats( int family )
expect_bounded( "icmpOutStats.dwErrors", table.icmpOutStats.dwErrors, nsi_stats.out_errors, nsi_stats2.out_errors );
for (i = 0; i < ARRAY_SIZE(nsi_stats.in_type_counts); i++)
{
- winetest_push_context( "%d", i );
+ winetest_push_context( "%ld", i );
expect_bounded( "icmpInStats.rgdwTypeCount", table.icmpInStats.rgdwTypeCount[i], nsi_stats.in_type_counts[i], nsi_stats2.in_type_counts[i] );
expect_bounded( "icmpOutStats.rgdwTypeCount", table.icmpOutStats.rgdwTypeCount[i], nsi_stats.out_type_counts[i], nsi_stats2.out_type_counts[i] );
winetest_pop_context();
@@ -505,14 +505,14 @@ static void test_ip_ipstats( int family )
/* The table appears to consist of a single object without a key. The rw data does exist but
isn't part of GetIpStatisticsEx() and isn't yet tested */
err = NsiGetAllParameters( 1, mod, NSI_IP_IPSTATS_TABLE, NULL, 0, NULL, 0, &dyn, sizeof(dyn), &stat, sizeof(stat) );
- ok( !err, "got %x\n", err );
+ ok( !err, "got %lx\n", err );
if (err) goto err;
err = GetIpStatisticsEx( &table, family );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
err = NsiGetAllParameters( 1, mod, NSI_IP_IPSTATS_TABLE, NULL, 0, NULL, 0, &dyn2, sizeof(dyn2), NULL, 0 );
- ok( !err, "got %x\n", err );
+ ok( !err, "got %lx\n", err );
/* dwForwarding and dwDefaultTTL come from the compartment table */
expect_bounded( "dwInReceives", table.dwInReceives, dyn.in_recv, dyn2.in_recv );
@@ -526,7 +526,7 @@ static void test_ip_ipstats( int family )
expect_bounded( "dwRoutingDiscards", table.dwRoutingDiscards, dyn.routing_discards, dyn2.routing_discards );
expect_bounded( "dwOutDiscards", table.dwOutDiscards, dyn.out_discards, dyn2.out_discards );
expect_bounded( "dwOutNoRoutes", table.dwOutNoRoutes, dyn.out_no_routes, dyn2.out_no_routes );
- ok( table.dwReasmTimeout == stat.reasm_timeout, "bad timeout %d != %d\n", table.dwReasmTimeout, stat.reasm_timeout );
+ ok( table.dwReasmTimeout == stat.reasm_timeout, "bad timeout %ld != %d\n", table.dwReasmTimeout, stat.reasm_timeout );
expect_bounded( "dwReasmReqds", table.dwReasmReqds, dyn.reasm_reqds, dyn2.reasm_reqds );
expect_bounded( "dwReasmOks", table.dwReasmOks, dyn.reasm_oks, dyn2.reasm_oks );
expect_bounded( "dwReasmFails", table.dwReasmFails, dyn.reasm_fails, dyn2.reasm_fails );
@@ -561,12 +561,12 @@ static void test_ip_unicast( int family )
(void **)&stat_tbl, sizeof(*stat_tbl), &count, 0 );
if (!err) break;
}
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
rw_size = rw_sizes[i];
err = GetUnicastIpAddressTable( family, &table );
- ok( !err, "got %d\n", err );
- ok( table->NumEntries == count, "table entries %d count %d\n", table->NumEntries, count );
+ ok( !err, "got %ld\n", err );
+ ok( table->NumEntries == count, "table entries %ld count %ld\n", table->NumEntries, count );
for (i = 0; i < count; i++)
{
@@ -574,7 +574,7 @@ static void test_ip_unicast( int family )
rw = (struct nsi_ip_unicast_rw *)((BYTE *)rw_tbl + i * rw_size);
dyn = dyn_tbl + i;
stat = stat_tbl + i;
- winetest_push_context( "%d", i );
+ winetest_push_context( "%ld", i );
ok( row->Address.si_family == family, "mismatch\n" );
@@ -606,7 +606,7 @@ static void test_ip_unicast( int family )
get_key.addr.s_addr = 0;
err = NsiGetAllParameters( 1, &NPI_MS_IPV4_MODULEID, NSI_IP_UNICAST_TABLE, &get_key, sizeof(get_key),
&get_rw, rw_size, &get_dyn, sizeof(get_dyn), &get_stat, sizeof(get_stat) );
- ok( err == ERROR_NOT_FOUND, "got %d\n", err );
+ ok( err == ERROR_NOT_FOUND, "got %ld\n", err );
FreeMibTable( table );
NsiFreeTable( key_tbl, rw_tbl, dyn_tbl, stat_tbl );
@@ -632,22 +632,22 @@ static void test_ip_neighbour( int family )
(void **)&rw_tbl, sizeof(*rw), (void **)&dyn_tbl, sizeof(*dyn),
NULL, 0, &count, 0 );
todo_wine_if( family == AF_INET6 )
- ok( !err, "got %x\n", err );
+ ok( !err, "got %lx\n", err );
if (err) goto err;
err = GetIpNetTable2( family, &table );
- ok( !err, "got %x\n", err );
+ ok( !err, "got %lx\n", err );
err = NsiAllocateAndGetTable( 1, mod, NSI_IP_NEIGHBOUR_TABLE, (void **)&key_tbl_2, key_size,
NULL, 0, (void **)&dyn_tbl_2, sizeof(*dyn),
NULL, 0, &count2, 0 );
- ok( !err, "got %x\n", err );
+ ok( !err, "got %lx\n", err );
if (count == count2 && !memcmp( dyn_tbl, dyn_tbl_2, count * sizeof(*dyn) )) break;
NsiFreeTable( key_tbl_2, NULL, dyn_tbl_2, NULL );
NsiFreeTable( key_tbl, rw_tbl, dyn_tbl, NULL );
}
- ok( count == table->NumEntries, "%d vs %d\n", count, table->NumEntries );
+ ok( count == table->NumEntries, "%ld vs %ld\n", count, table->NumEntries );
for (i = 0; i < count; i++)
{
@@ -658,7 +658,7 @@ static void test_ip_neighbour( int family )
if (family == AF_INET)
{
key4 = key_tbl + i;
- ok( key4->addr.s_addr == row->Address.Ipv4.sin_addr.s_addr, "%08x vs %08x\n", key4->addr.s_addr,
+ ok( key4->addr.s_addr == row->Address.Ipv4.sin_addr.s_addr, "%08lx vs %08lx\n", key4->addr.s_addr,
row->Address.Ipv4.sin_addr.s_addr );
ok( key4->luid.Value == row->InterfaceLuid.Value, "%s vs %s\n", wine_dbgstr_longlong( key4->luid.Value ),
wine_dbgstr_longlong( row->InterfaceLuid.Value ) );
@@ -677,7 +677,7 @@ static void test_ip_neighbour( int family )
ok( dyn->state == row->State, "%x vs %x\n", dyn->state, row->State );
ok( dyn->flags.is_router == row->IsRouter, "%x vs %x\n", dyn->flags.is_router, row->IsRouter );
ok( dyn->flags.is_unreachable == row->IsUnreachable, "%x vs %x\n", dyn->flags.is_unreachable, row->IsUnreachable );
- ok( dyn->time == row->ReachabilityTime.LastReachable, "%x vs %x\n", dyn->time, row->ReachabilityTime.LastReachable );
+ ok( dyn->time == row->ReachabilityTime.LastReachable, "%x vs %lx\n", dyn->time, row->ReachabilityTime.LastReachable );
}
NsiFreeTable( key_tbl_2, NULL, dyn_tbl_2, NULL );
@@ -716,7 +716,7 @@ static void test_ip_forward( int family )
NULL, 0, &count, 0 );
if (!err) break;
}
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
if (err) { winetest_pop_context(); return; }
rw_size = rw_sizes[i];
NsiFreeTable( key_tbl, rw_tbl, NULL, NULL );
@@ -728,19 +728,19 @@ static void test_ip_forward( int family )
(void **)&stat_tbl, sizeof(*stat_tbl), &count, 0 );
if (!err) break;
}
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
dyn_size = dyn_sizes[i];
err = GetIpForwardTable2( family, &table );
- ok( !err, "got %d\n", err );
- ok( table->NumEntries == count, "table entries %d count %d\n", table->NumEntries, count );
+ ok( !err, "got %ld\n", err );
+ ok( table->NumEntries == count, "table entries %ld count %ld\n", table->NumEntries, count );
for (i = 0; i < count; i++)
{
MIB_IPFORWARD_ROW2 *row = table->Table + i;
rw = (struct nsi_ip_forward_rw *)((BYTE *)rw_tbl + i * rw_size);
stat = stat_tbl + i;
- winetest_push_context( "%d", i );
+ winetest_push_context( "%ld", i );
ok( row->DestinationPrefix.Prefix.si_family == family, "mismatch\n" );
@@ -811,31 +811,31 @@ static void test_tcp_stats( int family )
err = NsiGetAllParameters( 1, &NPI_MS_TCP_MODULEID, NSI_TCP_STATS_TABLE, &key, sizeof(key), NULL, 0,
&dyn, sizeof(dyn), &stat, sizeof(stat) );
- ok( !err, "got %x\n", err );
+ ok( !err, "got %lx\n", err );
err = GetTcpStatisticsEx( &table, family );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
err = NsiGetAllParameters( 1, &NPI_MS_TCP_MODULEID, NSI_TCP_STATS_TABLE, &key, sizeof(key), NULL, 0,
&dyn2, sizeof(dyn), NULL, 0 );
- ok( !err, "got %x\n", err );
+ ok( !err, "got %lx\n", err );
- ok( table.dwRtoAlgorithm == stat.rto_algo, "%d vs %d\n", table.dwRtoAlgorithm, stat.rto_algo );
- ok( table.dwRtoMin == stat.rto_min, "%d vs %d\n", table.dwRtoMin, stat.rto_min );
- ok( table.dwRtoMax == stat.rto_max, "%d vs %d\n", table.dwRtoMax, stat.rto_max );
- ok( table.dwMaxConn == stat.max_conns, "%d vs %d\n", table.dwMaxConn, stat.max_conns );
+ ok( table.dwRtoAlgorithm == stat.rto_algo, "%ld vs %d\n", table.dwRtoAlgorithm, stat.rto_algo );
+ ok( table.dwRtoMin == stat.rto_min, "%ld vs %d\n", table.dwRtoMin, stat.rto_min );
+ ok( table.dwRtoMax == stat.rto_max, "%ld vs %d\n", table.dwRtoMax, stat.rto_max );
+ ok( table.dwMaxConn == stat.max_conns, "%ld vs %d\n", table.dwMaxConn, stat.max_conns );
- ok( unstable( table.dwActiveOpens == dyn.active_opens ), "%d vs %d\n", table.dwActiveOpens, dyn.active_opens );
- ok( unstable( table.dwPassiveOpens == dyn.passive_opens ), "%d vs %d\n", table.dwPassiveOpens, dyn.passive_opens );
+ ok( unstable( table.dwActiveOpens == dyn.active_opens ), "%ld vs %d\n", table.dwActiveOpens, dyn.active_opens );
+ ok( unstable( table.dwPassiveOpens == dyn.passive_opens ), "%ld vs %d\n", table.dwPassiveOpens, dyn.passive_opens );
expect_bounded( "dwAttemptFails", table.dwAttemptFails, dyn.attempt_fails, dyn2.attempt_fails );
expect_bounded( "dwEstabResets", table.dwEstabResets, dyn.est_rsts, dyn2.est_rsts );
- ok( unstable( table.dwCurrEstab == dyn.cur_est ), "%d vs %d\n", table.dwCurrEstab, dyn.cur_est );
+ ok( unstable( table.dwCurrEstab == dyn.cur_est ), "%ld vs %d\n", table.dwCurrEstab, dyn.cur_est );
expect_bounded( "dwInSegs", table.dwInSegs, dyn.in_segs, dyn2.in_segs );
expect_bounded( "dwOutSegs", table.dwOutSegs, dyn.out_segs, dyn2.out_segs );
expect_bounded( "dwRetransSegs", table.dwRetransSegs, dyn.retrans_segs, dyn2.retrans_segs );
expect_bounded( "dwInErrs", table.dwInErrs, dyn.in_errs, dyn2.in_errs );
expect_bounded( "dwOutRsts", table.dwOutRsts, dyn.out_rsts, dyn2.out_rsts );
- ok( unstable( table.dwNumConns == dyn.num_conns ), "%d vs %d\n", table.dwNumConns, dyn.num_conns );
+ ok( unstable( table.dwNumConns == dyn.num_conns ), "%ld vs %d\n", table.dwNumConns, dyn.num_conns );
winetest_pop_context();
}
@@ -868,7 +868,7 @@ static void test_tcp_tables( int family, int table_type )
(void **)&dyn_tbl, dyn_sizes[i], (void **)&stat, sizeof(*stat), &count, 0 );
if (!err) break;
}
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
dyn_size = dyn_sizes[i];
size = 0;
@@ -877,7 +877,7 @@ static void test_tcp_tables( int family, int table_type )
table = malloc( size );
table6 = (MIB_TCP6TABLE_OWNER_MODULE *)table;
err = GetExtendedTcpTable( table, &size, 0, family, table_type, 0 );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
row = table->table;
row6 = table6->table;
@@ -889,16 +889,16 @@ static void test_tcp_tables( int family, int table_type )
if (family == AF_INET)
{
- ok( unstable( row->dwLocalAddr == keys[i].local.Ipv4.sin_addr.s_addr ), "%08x vs %08x\n",
+ ok( unstable( row->dwLocalAddr == keys[i].local.Ipv4.sin_addr.s_addr ), "%08lx vs %08lx\n",
row->dwLocalAddr, keys[i].local.Ipv4.sin_addr.s_addr );
- ok( unstable( row->dwLocalPort == keys[i].local.Ipv4.sin_port ), "%d vs %d\n",
+ ok( unstable( row->dwLocalPort == keys[i].local.Ipv4.sin_port ), "%ld vs %d\n",
row->dwLocalPort, keys[i].local.Ipv4.sin_port );
- ok( unstable( row->dwRemoteAddr == keys[i].remote.Ipv4.sin_addr.s_addr ), "%08x vs %08x\n",
+ ok( unstable( row->dwRemoteAddr == keys[i].remote.Ipv4.sin_addr.s_addr ), "%08lx vs %08lx\n",
row->dwRemoteAddr, keys[i].remote.Ipv4.sin_addr.s_addr );
- ok( unstable( row->dwRemotePort == keys[i].remote.Ipv4.sin_port ), "%d vs %d\n",
+ ok( unstable( row->dwRemotePort == keys[i].remote.Ipv4.sin_port ), "%ld vs %d\n",
row->dwRemotePort, keys[i].remote.Ipv4.sin_port );
- ok( unstable( row->dwState == dyn->state ), "%x vs %x\n", row->dwState, dyn->state );
- ok( unstable( row->dwOwningPid == stat[i].pid ), "%x vs %x\n", row->dwOwningPid, stat[i].pid );
+ ok( unstable( row->dwState == dyn->state ), "%lx vs %x\n", row->dwState, dyn->state );
+ ok( unstable( row->dwOwningPid == stat[i].pid ), "%lx vs %x\n", row->dwOwningPid, stat[i].pid );
ok( unstable( row->liCreateTimestamp.QuadPart == stat[i].create_time ), "mismatch\n" );
ok( unstable( row->OwningModuleInfo[0] == stat[i].mod_info ), "mismatch\n");
row++;
@@ -907,18 +907,18 @@ static void test_tcp_tables( int family, int table_type )
{
ok( unstable( !memcmp( row6->ucLocalAddr, keys[i].local.Ipv6.sin6_addr.s6_addr, sizeof(IN6_ADDR) ) ),
"mismatch\n" );
- ok( unstable( row6->dwLocalScopeId == keys[i].local.Ipv6.sin6_scope_id ), "%x vs %x\n",
+ ok( unstable( row6->dwLocalScopeId == keys[i].local.Ipv6.sin6_scope_id ), "%lx vs %lx\n",
row6->dwLocalScopeId, keys[i].local.Ipv6.sin6_scope_id );
- ok( unstable( row6->dwLocalPort == keys[i].local.Ipv6.sin6_port ), "%d vs %d\n",
+ ok( unstable( row6->dwLocalPort == keys[i].local.Ipv6.sin6_port ), "%ld vs %d\n",
row6->dwLocalPort, keys[i].local.Ipv6.sin6_port );
ok( unstable( !memcmp( row6->ucRemoteAddr, keys[i].remote.Ipv6.sin6_addr.s6_addr, sizeof(IN6_ADDR) ) ),
"mismatch\n" );
- ok( unstable( row6->dwRemoteScopeId == keys[i].remote.Ipv6.sin6_scope_id ), "%x vs %x\n",
+ ok( unstable( row6->dwRemoteScopeId == keys[i].remote.Ipv6.sin6_scope_id ), "%lx vs %lx\n",
row6->dwRemoteScopeId, keys[i].remote.Ipv6.sin6_scope_id );
- ok( unstable( row6->dwRemotePort == keys[i].remote.Ipv6.sin6_port ), "%d vs %d\n",
+ ok( unstable( row6->dwRemotePort == keys[i].remote.Ipv6.sin6_port ), "%ld vs %d\n",
row6->dwRemotePort, keys[i].remote.Ipv6.sin6_port );
- ok( unstable( row6->dwState == dyn->state ), "%x vs %x\n", row6->dwState, dyn->state );
- ok( unstable( row6->dwOwningPid == stat[i].pid ), "%x vs %x\n", row6->dwOwningPid, stat[i].pid );
+ ok( unstable( row6->dwState == dyn->state ), "%lx vs %x\n", row6->dwState, dyn->state );
+ ok( unstable( row6->dwOwningPid == stat[i].pid ), "%lx vs %x\n", row6->dwOwningPid, stat[i].pid );
ok( unstable( row6->liCreateTimestamp.QuadPart == stat[i].create_time ), "mismatch\n" );
ok( unstable( row6->OwningModuleInfo[0] == stat[i].mod_info ), "mismatch\n");
row6++;
@@ -941,20 +941,20 @@ static void test_udp_stats( int family )
err = NsiGetAllParameters( 1, &NPI_MS_UDP_MODULEID, NSI_UDP_STATS_TABLE, &key, sizeof(key), NULL, 0,
&dyn, sizeof(dyn), NULL, 0 );
- ok( !err, "got %x\n", err );
+ ok( !err, "got %lx\n", err );
err = GetUdpStatisticsEx( &table, family );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
err = NsiGetAllParameters( 1, &NPI_MS_UDP_MODULEID, NSI_UDP_STATS_TABLE, &key, sizeof(key), NULL, 0,
&dyn2, sizeof(dyn2), NULL, 0 );
- ok( !err, "got %x\n", err );
+ ok( !err, "got %lx\n", err );
expect_bounded( "dwInDatagrams", table.dwInDatagrams, dyn.in_dgrams, dyn2.in_dgrams );
expect_bounded( "dwNoPorts", table.dwNoPorts, dyn.no_ports, dyn2.no_ports );
expect_bounded( "dwInErrors", table.dwInErrors, dyn.in_errs, dyn2.in_errs );
expect_bounded( "dwOutDatagrams", table.dwOutDatagrams, dyn.out_dgrams, dyn2.out_dgrams );
- ok( unstable( table.dwNumAddrs == dyn.num_addrs ), "%d %d\n", table.dwNumAddrs, dyn.num_addrs );
+ ok( unstable( table.dwNumAddrs == dyn.num_addrs ), "%ld %d\n", table.dwNumAddrs, dyn.num_addrs );
winetest_pop_context();
}
@@ -973,7 +973,7 @@ static void test_udp_tables( int family )
err = NsiAllocateAndGetTable( 1, &NPI_MS_UDP_MODULEID, NSI_UDP_ENDPOINT_TABLE, (void **)&keys, sizeof(*keys),
NULL, 0, NULL, 0, (void **)&stat, sizeof(*stat), &count, 0 );
- ok( !err, "got %x\n", err );
+ ok( !err, "got %lx\n", err );
size = 0;
err = GetExtendedUdpTable( NULL, &size, 0, family, UDP_TABLE_OWNER_MODULE, 0 );
@@ -981,7 +981,7 @@ static void test_udp_tables( int family )
table = malloc( size );
table6 = (MIB_UDP6TABLE_OWNER_MODULE *)table;
err = GetExtendedUdpTable( table, &size, 0, family, UDP_TABLE_OWNER_MODULE, 0 );
- ok( !err, "got %d\n", err );
+ ok( !err, "got %ld\n", err );
row = table->table;
row6 = table6->table;
@@ -992,11 +992,11 @@ static void test_udp_tables( int family )
if (family == AF_INET)
{
- ok( unstable( row->dwLocalAddr == keys[i].local.Ipv4.sin_addr.s_addr ), "%08x vs %08x\n",
+ ok( unstable( row->dwLocalAddr == keys[i].local.Ipv4.sin_addr.s_addr ), "%08lx vs %08lx\n",
row->dwLocalAddr, keys[i].local.Ipv4.sin_addr.s_addr );
- ok( unstable( row->dwLocalPort == keys[i].local.Ipv4.sin_port ), "%d vs %d\n",
+ ok( unstable( row->dwLocalPort == keys[i].local.Ipv4.sin_port ), "%ld vs %d\n",
row->dwLocalPort, keys[i].local.Ipv4.sin_port );
- ok( unstable( row->dwOwningPid == stat[i].pid ), "%x vs %x\n", row->dwOwningPid, stat[i].pid );
+ ok( unstable( row->dwOwningPid == stat[i].pid ), "%lx vs %x\n", row->dwOwningPid, stat[i].pid );
ok( unstable( row->liCreateTimestamp.QuadPart == stat[i].create_time ), "mismatch\n" );
ok( unstable( row->dwFlags == stat[i].flags ), "%x vs %x\n", row->dwFlags, stat[i].flags );
ok( unstable( row->OwningModuleInfo[0] == stat[i].mod_info ), "mismatch\n");
@@ -1006,11 +1006,11 @@ static void test_udp_tables( int family )
{
ok( unstable( !memcmp( row6->ucLocalAddr, keys[i].local.Ipv6.sin6_addr.s6_addr, sizeof(IN6_ADDR) ) ),
"mismatch\n" );
- ok( unstable( row6->dwLocalScopeId == keys[i].local.Ipv6.sin6_scope_id ), "%x vs %x\n",
+ ok( unstable( row6->dwLocalScopeId == keys[i].local.Ipv6.sin6_scope_id ), "%lx vs %lx\n",
row6->dwLocalScopeId, keys[i].local.Ipv6.sin6_scope_id );
- ok( unstable( row6->dwLocalPort == keys[i].local.Ipv6.sin6_port ), "%d vs %d\n",
+ ok( unstable( row6->dwLocalPort == keys[i].local.Ipv6.sin6_port ), "%ld vs %d\n",
row6->dwLocalPort, keys[i].local.Ipv6.sin6_port );
- ok( unstable( row6->dwOwningPid == stat[i].pid ), "%x vs %x\n", row6->dwOwningPid, stat[i].pid );
+ ok( unstable( row6->dwOwningPid == stat[i].pid ), "%lx vs %x\n", row6->dwOwningPid, stat[i].pid );
ok( unstable( row6->liCreateTimestamp.QuadPart == stat[i].create_time ), "mismatch\n" );
ok( unstable( row6->dwFlags == stat[i].flags ), "%x vs %x\n", row6->dwFlags, stat[i].flags );
ok( unstable( row6->OwningModuleInfo[0] == stat[i].mod_info ), "mismatch\n");
--
2.23.0
1
0