This is needed by Moku (software for scientific instrument): https://www.liquidinstruments.com/products/desktop-apps/
Related to: Wine-Bug: https://forum.winehq.org/viewtopic.php?p=143283
---
First contribution here, I will happily make change if needed!
From: Lucas Chollet lucas.chollet@free.fr
This is needed by Moku (software for scientific instrument): https://www.liquidinstruments.com/products/desktop-apps/
Related to: Wine-Bug: https://forum.winehq.org/viewtopic.php?p=143283 --- dlls/dnsapi/dnsapi.spec | 1 + dlls/dnsapi/main.c | 10 ++++++++++ include/windns.h | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+)
diff --git a/dlls/dnsapi/dnsapi.spec b/dlls/dnsapi/dnsapi.spec index 0d50c56ec68..a8ffa40a0ae 100644 --- a/dlls/dnsapi/dnsapi.spec +++ b/dlls/dnsapi/dnsapi.spec @@ -103,6 +103,7 @@ @ stub DnsReplaceRecordSet_UTF8 @ stdcall DnsReplaceRecordSetW(ptr long ptr ptr ptr) @ stub DnsReplaceRecordSet_W +@ stdcall DnsServiceBrowse(ptr ptr) @ stub DnsServiceNotificationDeregister_A @ stub DnsServiceNotificationDeregister_UTF8 @ stub DnsServiceNotificationDeregister_W diff --git a/dlls/dnsapi/main.c b/dlls/dnsapi/main.c index 6324d46e173..f925ddc64c2 100644 --- a/dlls/dnsapi/main.c +++ b/dlls/dnsapi/main.c @@ -233,3 +233,13 @@ DNS_STATUS WINAPI DnsReplaceRecordSetW( DNS_RECORDW *set, DWORD options, HANDLE FIXME( "(%p, %#lx, %p, %p, %p) stub\n", set, options, context, servers, reserved ); return ERROR_SUCCESS; } + +/****************************************************************************** + * DnsServiceBrowse [DNSAPI.@] + * + */ +DNS_STATUS WINAPI DnsServiceBrowse( PDNS_SERVICE_BROWSE_REQUEST pRequest, PDNS_SERVICE_CANCEL pCancel) +{ + FIXME( "(%p, %p) stub\n", pRequest, pCancel ); + return ERROR_SUCCESS; +} diff --git a/include/windns.h b/include/windns.h index b0b14df1b4f..3df1dcc7557 100644 --- a/include/windns.h +++ b/include/windns.h @@ -760,6 +760,24 @@ typedef struct _DNS_CACHE_ENTRY ULONG Flags; } DNS_CACHE_ENTRY, *PDNS_CACHE_ENTRY;
+typedef struct _DNS_SERVICE_BROWSE_CALLBACK { +} DNS_SERVICE_BROWSE_CALLBACK, *PDNS_SERVICE_BROWSE_CALLBACK; + +typedef struct _DNS_SERVICE_BROWSE_REQUEST { + ULONG Version; + ULONG InterfaceIndex; + PCWSTR QueryName; + union { + PDNS_SERVICE_BROWSE_CALLBACK pBrowseCallback; + DNS_QUERY_COMPLETION_ROUTINE *pBrowseCallbackV2; + }; + PVOID pQueryContext; +} DNS_SERVICE_BROWSE_REQUEST, *PDNS_SERVICE_BROWSE_REQUEST; + +typedef struct _DNS_SERVICE_CANCEL { + PVOID reserved; +} DNS_SERVICE_CANCEL, *PDNS_SERVICE_CANCEL; + DNS_STATUS WINAPI DnsAcquireContextHandle_A(DWORD,PVOID,PHANDLE); DNS_STATUS WINAPI DnsAcquireContextHandle_W(DWORD,PVOID,PHANDLE); #define DnsAcquireContextHandle WINELIB_NAME_AW(DnsAcquireContextHandle_) @@ -790,6 +808,7 @@ void WINAPI DnsReleaseContextHandle(HANDLE); DNS_STATUS WINAPI DnsReplaceRecordSetA(PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID); DNS_STATUS WINAPI DnsReplaceRecordSetW(PDNS_RECORDW,DWORD,HANDLE,PVOID,PVOID); DNS_STATUS WINAPI DnsReplaceRecordSetUTF8(PDNS_RECORDA,DWORD,HANDLE,PVOID,PVOID); +DNS_STATUS WINAPI DnsServiceBrowse(PDNS_SERVICE_BROWSE_REQUEST, PDNS_SERVICE_CANCEL); #define DnsReplaceRecordSet WINELIB_NAME_AW(DnsReplaceRecordSet) DNS_STATUS WINAPI DnsValidateName_A(PCSTR,DNS_NAME_FORMAT); DNS_STATUS WINAPI DnsValidateName_W(PCWSTR, DNS_NAME_FORMAT);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=146233
Your paranoid android.
=== debian11b (64 bit WoW report) ===
ntoskrnl.exe: ntoskrnl: Timeout
user32: msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0005 instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got winevent_hook 0x0003 instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x030f instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x001c instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0086 instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0006 instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0009 instead
Hans Leidekker (@hans) commented about include/windns.h:
ULONG Flags;
} DNS_CACHE_ENTRY, *PDNS_CACHE_ENTRY;
+typedef struct _DNS_SERVICE_BROWSE_CALLBACK { +} DNS_SERVICE_BROWSE_CALLBACK, *PDNS_SERVICE_BROWSE_CALLBACK;
This should be a callback definition.
Alex Henrie (@alexhenrie) commented about include/windns.h:
ULONG Flags;
} DNS_CACHE_ENTRY, *PDNS_CACHE_ENTRY;
+typedef struct _DNS_SERVICE_BROWSE_CALLBACK { +} DNS_SERVICE_BROWSE_CALLBACK, *PDNS_SERVICE_BROWSE_CALLBACK;
+typedef struct _DNS_SERVICE_BROWSE_REQUEST {
- ULONG Version;
- ULONG InterfaceIndex;
- PCWSTR QueryName;
- union {
- PDNS_SERVICE_BROWSE_CALLBACK pBrowseCallback;
- DNS_QUERY_COMPLETION_ROUTINE *pBrowseCallbackV2;
- };
- PVOID pQueryContext;
In new code it is preferable to write `void *` instead of `PVOID` and `const WCHAR *` instead of `PCWSTR`. Also, please try to match the style of the previous structs in this file: Four-space indentation, `{` on its own line, one space between the member type and the member name.
Alex Henrie (@alexhenrie) commented about dlls/dnsapi/main.c:
FIXME( "(%p, %#lx, %p, %p, %p) stub\n", set, options, context, servers, reserved ); return ERROR_SUCCESS;
}
+/******************************************************************************
- DnsServiceBrowse [DNSAPI.@]
- */
+DNS_STATUS WINAPI DnsServiceBrowse( PDNS_SERVICE_BROWSE_REQUEST pRequest, PDNS_SERVICE_CANCEL pCancel)
Please avoid using Hungarian notation when you don't have to. Here, you can write `request` and `cancel` instead of `pRequest` and `pCancel`.
Hello Lucas, thank you for the patch! I have one comment that's not related to the code itself: In my opinion it would be better to open a bug report at https://bugs.winehq.org/ and link to that in the commit message instead of linking to a forum thread. That way, when the bug is fixed, a note will appear in the change log of the first Wine development version where it is fixed, and the fix will also be considered for inclusion in the next Wine stable version.
On Wed Jun 12 07:42:28 2024 +0000, Hans Leidekker wrote:
This should be a callback definition.
I don't know why it confused me that much, and I decided to just put a placeholder `struct`. Thanks for noticing. I think I got it right, now!
On Thu Jun 13 05:13:01 2024 +0000, Alex Henrie wrote:
In new code it is preferable to write `void *` instead of `PVOID` and `const WCHAR *` instead of `PCWSTR`. Also, please try to match the style of the previous structs in this file: Four-space indentation, `{` on its own line, one space between the member type and the member name.
I updated the types. Oh, my bad for the formatting, it should be fixed now.