Re: [PATCH] avrt: Add AvQuerySystemResponsiveness stub.
On Wed, Aug 16, 2017 at 02:22:13PM +0300, Andrey Gusev wrote:
Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com> --- dlls/avrt/avrt.spec | 2 +- dlls/avrt/main.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/avrt/avrt.spec b/dlls/avrt/avrt.spec index 640a12ac22..a7dfc42879 100644 --- a/dlls/avrt/avrt.spec +++ b/dlls/avrt/avrt.spec @@ -1,4 +1,4 @@ -@ stub AvQuerySystemResponsiveness +@ stdcall AvQuerySystemResponsiveness(long ptr) @ stdcall AvRevertMmThreadCharacteristics(long) @ stub AvRtCreateThreadOrderingGroup @ stub AvRtCreateThreadOrderingGroupExA diff --git a/dlls/avrt/main.c b/dlls/avrt/main.c index 8a110250ae..68e44d6098 100644 --- a/dlls/avrt/main.c +++ b/dlls/avrt/main.c @@ -83,6 +83,12 @@ HANDLE WINAPI AvSetMmThreadCharacteristicsW(LPCWSTR TaskName, LPDWORD TaskIndex) return (HANDLE)0x12345678; }
+BOOL WINAPI AvQuerySystemResponsiveness(HANDLE AvrtHandle, PULONG SystemResponsivenessValue) +{ + FIXME("(%p, %p): stub\n", AvrtHandle, SystemResponsivenessValue); + return TRUE; +} +
If you're going to return TRUE, you need to initialize *SystemResponsivenessValue to something meaningful. While you're at it, we generally prefer 'ULONG *' to 'PULONG', although I realise there are several of the latter form in this file. Huw.
Huw Davies <huw(a)codeweavers.com> wrote:
+BOOL WINAPI AvQuerySystemResponsiveness(HANDLE AvrtHandle, PULONG SystemResponsivenessValue) +{ + FIXME("(%p, %p): stub\n", AvrtHandle, SystemResponsivenessValue); + return TRUE; +} +
If you're going to return TRUE, you need to initialize *SystemResponsivenessValue to something meaningful.
While you're at it, we generally prefer 'ULONG *' to 'PULONG',
I'd guess that public APIs should follow the PSDK declarations, and where PSDK has PULONG an appropriate Wine header should have ULONG as well. -- Dmitry.
On Wed, Aug 16, 2017 at 08:39:32PM +0800, Dmitry Timoshkov wrote:
Huw Davies <huw(a)codeweavers.com> wrote:
+BOOL WINAPI AvQuerySystemResponsiveness(HANDLE AvrtHandle, PULONG SystemResponsivenessValue) +{ + FIXME("(%p, %p): stub\n", AvrtHandle, SystemResponsivenessValue); + return TRUE; +} +
If you're going to return TRUE, you need to initialize *SystemResponsivenessValue to something meaningful.
While you're at it, we generally prefer 'ULONG *' to 'PULONG',
I'd guess that public APIs should follow the PSDK declarations, and where PSDK has PULONG an appropriate Wine header should have ULONG as well.
This isn't a header, it's the implementation. Even in a header it would be better to be more typographically different from the PSDK. Huw.
Huw Davies <huw(a)codeweavers.com> wrote:
+BOOL WINAPI AvQuerySystemResponsiveness(HANDLE AvrtHandle, PULONG SystemResponsivenessValue) +{ + FIXME("(%p, %p): stub\n", AvrtHandle, SystemResponsivenessValue); + return TRUE; +} +
If you're going to return TRUE, you need to initialize *SystemResponsivenessValue to something meaningful.
While you're at it, we generally prefer 'ULONG *' to 'PULONG',
I'd guess that public APIs should follow the PSDK declarations, and where PSDK has PULONG an appropriate Wine header should have ULONG as well.
This isn't a header, it's the implementation.
This doesn't really matter, in order to be usable any API implementation eventually should have a declaration in a header, and an implementation can't have a different signature from a declaration in the public header.
Even in a header it would be better to be more typographically different from the PSDK.
Uh, I'd suggest to not open a can of worms. It's better to keep the source compatibility with PSDK as a de-facto standard. -- Dmitry.
participants (2)
-
Dmitry Timoshkov -
Huw Davies