[PATCH 0/2] MR10940: Include ndfapi
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> --- include/Makefile.in | 1 + include/ndattrib.idl | 98 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 include/ndattrib.idl diff --git a/include/Makefile.in b/include/Makefile.in index 2a92170c459..0d55497815e 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -730,6 +730,7 @@ SOURCES = \ natupnp.idl \ nb30.h \ ncrypt.h \ + ndattrib.idl \ ndrtypes.h \ netcfgx.idl \ netcon.idl \ diff --git a/include/ndattrib.idl b/include/ndattrib.idl new file mode 100644 index 00000000000..444bf8fbbac --- /dev/null +++ b/include/ndattrib.idl @@ -0,0 +1,98 @@ +/* +* Copyright 2026 Alistair Leslie-Hughes + * + * 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 + */ + +import "unknwn.idl"; +import "objidl.idl"; +import "oaidl.idl"; + +typedef [v1_enum] enum +{ + UIT_INVALID, + UIT_NONE, + UIT_SHELL_COMMAND, + UIT_HELP_PANE, + UIT_DUI +} UI_INFO_TYPE; + +typedef [v1_enum] enum tagREPAIR_SCOPE +{ + RS_SYSTEM, + RS_USER, + RS_APPLICATION, + RS_PROCESS +} REPAIR_SCOPE; + +cpp_quote("#define PREPAIR_SCOPE *REPAIR_SCOPE") + +typedef [v1_enum] enum +{ + RR_NOROLLBACK, + RR_ROLLBACK, + RR_NORISK +} REPAIR_RISK; + +typedef struct tagShellCommandInfo +{ + [string] LPWSTR pwszOperation; + [string] LPWSTR pwszFile; + [string] LPWSTR pwszParameters; + [string] LPWSTR pwszDirectory; + ULONG nShowCmd; +} ShellCommandInfo, *PShellCommandInfo; + +typedef struct tagUiInfo +{ + UI_INFO_TYPE type; + [switch_type(UI_INFO_TYPE), switch_is(type) ] union + { + [ case(UIT_NONE) ] LPWSTR pwzNull; + [ case(UIT_SHELL_COMMAND) ] ShellCommandInfo ShellInfo; + [ case(UIT_HELP_PANE) ] LPWSTR pwzHelpUrl; + [ case(UIT_DUI) ] LPWSTR pwzDui; + }; +} UiInfo, *PUiInfo; + +typedef struct tagRepairInfo +{ + GUID guid; + [string] LPWSTR pwszClassName; + [string] LPWSTR pwszDescription; + DWORD sidType; + long cost; + ULONG flags; + REPAIR_SCOPE scope; + REPAIR_RISK risk; + UiInfo UiInfo; + int rootCauseIndex; +} RepairInfo, *PRepairInfo; + +typedef struct tagRepairInfoEx +{ + RepairInfo repair; + USHORT repairRank; +} RepairInfoEx, *PRepairInfoEx; + +typedef struct tagRootCauseInfo +{ + [string] LPWSTR pwszDescription; + GUID rootCauseID; + DWORD rootCauseFlags; + GUID networkInterfaceID; + [size_is(repairCount)] RepairInfoEx *pRepairs; + USHORT repairCount; +} RootCauseInfo, *PRootCauseInfo; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10940
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> --- include/Makefile.in | 1 + include/ndfapi.h | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 include/ndfapi.h diff --git a/include/Makefile.in b/include/Makefile.in index 0d55497815e..9e4ef779ae5 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -731,6 +731,7 @@ SOURCES = \ nb30.h \ ncrypt.h \ ndattrib.idl \ + ndfapi.h \ ndrtypes.h \ netcfgx.idl \ netcon.idl \ diff --git a/include/ndfapi.h b/include/ndfapi.h new file mode 100644 index 00000000000..48058961333 --- /dev/null +++ b/include/ndfapi.h @@ -0,0 +1,41 @@ +/* +* Copyright 2026 Alistair Leslie-Hughes + * + * 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 __NDFAPI_H__ +#define __NDFAPI_H__ + +#include "minwindef.h" +#include "winsock2.h" +#include "ndattrib.h" + +typedef PVOID NDFHANDLE; + +STDAPI NdfCloseIncident(NDFHANDLE handle); +STDAPI NdfCreateConnectivityIncident(NDFHANDLE *handle); +STDAPI NdfCreateWebIncident(LPCWSTR url, NDFHANDLE *handle); +STDAPI NdfCreateWinSockIncident(SOCKET sock, LPCWSTR host, USHORT port, LPCWSTR appId, SID *userId, NDFHANDLE *handle); + +#ifdef __cplusplus +STDAPI NdfDiagnoseIncident(NDFHANDLE Handle, ULONG *RootCauseCount, RootCauseInfo **RootCauses, DWORD dwWait=INFINITE, DWORD dwFlags=0); +#else +STDAPI NdfDiagnoseIncident(NDFHANDLE Handle, ULONG *RootCauseCount, RootCauseInfo **RootCauses, DWORD dwWait, DWORD dwFlags); +#endif + +STDAPI NdfExecuteDiagnosis(NDFHANDLE handle, HWND hwnd); + + +#endif -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10940
participants (2)
-
Alistair Leslie-Hughes -
Alistair Leslie-Hughes (@alesliehughes)