Thanks for the clarification about todo_wine, Paul
Paul Vriens wrote:
Well I don't think it will be accepted as is. We usually don't add
functions that are not used anywhere especially when the comments say
that there is a bug elsewhere that should be fixed first.
Well, I was thinking about
Thanks for your hints, Paul.
I added some tests for the Ansi variant of the function
and fixed the problem you mentioned.
I also think that your addition of _GetAccountNameFromTokenW is holding the
committing of this patch back, especially because you don't seem to use
that
function.
I also
Andreas Rosenberg wrote:
Thanks for your hints, Paul.
I added some tests for the Ansi variant of the function
and fixed the problem you mentioned.
I also think that your addition of _GetAccountNameFromTokenW is holding the
committing of this patch back, especially because you don't seem to
Andreas Rosenberg wrote:
Just had a look again on your resend:
this doesn't seem correct:
+if ( lpcchSize lpcchSize )
I also think that your addition of _GetAccountNameFromTokenW is holding the
committing of
From acb4bf2dc4ecbd56fa54dfcbd8be2b270929d865 Mon Sep 17 00:00:00 2001
From: Andreas.Rosenberg andreas.rosenb...@apis.de
Date: Mon, 30 Mar 2009 10:19:50 +0200
Subject: dlls/userenv: fixed stubs GetUserProfileDirectoryW/A
---
dlls/userenv/Makefile.in |2 +-
dlls/userenv/tests/userenv.c
Andreas Rosenberg wrote:
There is no need for that GetVersionExA call/test.
Just do an if (0) and leave that comment about NT4 crashing in.
--
Cheers,
Paul.
Vitaliy Margolen wrote:
+res = RegOpenKeyExW( HKEY_LOCAL_MACHINE, profile_pathname, 0L,
KEY_QUERY_VALUE, keyProfileDir );
+res = RegGetValueW( keyProfileDir, profile_subkey,
profile_keyname, RRF_RT_ANY,
+ NULL, buffer, sizePath ); /* RegGetValue
Andreas Rosenberg wrote:
Almost there, just few small things left.
+TRACE(%p %s %p\n, hToken, lpProfileDir, lpcchSize);
Don't print output parameters[lpProfileDir] as string only as a point.
Unless it's used as
Andreas Rosenberg wrote:
Hi,
Error during compilation:
userenv_main.c:181: warning: passing argument 1 of ‘GetUserNameW’ from
incompatible pointer type
Shouldn't that line be:
res = GetUserNameW( userName,
Paul Vriens wrote:
Paul Vriens wrote:
Andreas Rosenberg wrote:
Hi,
Error during compilation:
userenv_main.c:181: warning: passing argument 1 of ‘GetUserNameW’ from
incompatible pointer type
Shouldn't that line
Vitaliy Margolen wrote:
The error codes returned by a function are not part of the Windows API
But they are. MS just made their obligation to document all of their craft
that much easer and that much more undefined. According to this logic
Error! is the only message you need for anything
Paul Vriens wrote:
Andreas Rosenberg wrote:
Hi,
Error during compilation:
userenv_main.c:181: warning: passing argument 1 of ‘GetUserNameW’ from
incompatible pointer type
Shouldn't that line be:
res =
Andreas Rosenberg wrote:
It's quite common for these functions to check for the needed buffersize when
buffer=NULL and size=0 is passed.
I did a quick check on W2K3 and this is what is returned:
sizePath = 0;
On Friday 06 March 2009 14:12:11 you wrote:
Paul Vriens wrote:
Andreas Rosenberg wrote:
Hi,
Error during compilation:
userenv_main.c:181: warning: passing argument 1 of ‘GetUserNameW’ from
incompatible
Andreas Rosenberg wrote:
On Friday 06 March 2009 14:12:11 you wrote:
Paul Vriens wrote:
Andreas Rosenberg wrote:
Hi,
Error during compilation:
userenv_main.c:181: warning: passing argument 1 of ‘GetUserNameW’ from
Andreas Rosenberg wrote:
Test looks better but:
+r = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_DUPLICATE, htoken);
+expect(TRUE, r);
+
+r = GetUserProfileDirectoryW(htoken , NULL, NULL );
+lastError = GetLastError();
+expect(FALSE, r);
+
I don't consider it helpful writing a conformance test, for something
that is not specified. One could simply omit the error codes, but if
this call should fail an app may log/present a more meaningfull error
message than without it. If the error codes should be different from
Windows, this
Andreas Rosenberg wrote:
Fails on XP SP2 with:
---
userenv.c:308: Test failed: Expected 1, got 39
userenv: 92 tests executed (0 marked as todo, 1 failure), 0 skipped.
---
Much less important but still: please remove trailing whitespaces.
'git apply' should not
Much less important but still: please remove trailing whitespaces.
'git apply' should not produce any warnings.
I've discovered that if you use git-add to fully stage your commit, you
can then run:
git-diff-index --check HEAD
immediately prior to committing; that will catch such warnings
Nikolay Sivov wrote:
Andreas Rosenberg wrote:
+ if ( !lpcchSize ) {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ SetLastError(ERROR_MORE_DATA);
+ }
+ }
+ }
+ else
+
On Thu, 5 Mar 2009, Jeremy White wrote:
Much less important but still: please remove trailing whitespaces.
'git apply' should not produce any warnings.
I've discovered that if you use git-add to fully stage your commit, you
can then run:
git-diff-index --check HEAD
immediately prior
From d59c1fe3e26e0cb41a3affe4034abc6dc9bd0556 Mon Sep 17 00:00:00 2001
From: Andreas.Rosenberg andreas.rosenb...@apis.de
Date: Thu, 5 Mar 2009 18:41:37 +0100
Subject: dlls/userenv: fixed stubs GetUserProfileDirectoryW/A
---
dlls/userenv/Makefile.in |2 +-
dlls/userenv/tests/userenv.c
Andreas Rosenberg wrote:
According to MSDN the error codes are not part of the API documentation:
The error codes returned by a function are not part of the Windows API
But they are. MS just made their obligation to document all of their craft
that much easer and that much more undefined.
Andreas Rosenberg wrote:
Conformance tests should verify, if the function works like documented.
Not correct. If you look at lots of conformance tests they test things that
are not documented. In some cases they test things that documentation is
wrong about.
Vitaliy.
Nikolay Sivov wrote:
Andreas Rosenberg wrote:
+if ( !lpcchSize ) {
+SetLastError(ERROR_INVALID_PARAMETER);
+return FALSE;
+SetLastError(ERROR_MORE_DATA);
+}
+}
+}
+else
+
2009/3/4 Andreas Rosenberg andreas.rosenb...@apis.de
Sorry, but I disagree with you opinion.
A conformance test should verify if an API call works like documented.
The MSDN documentation specifies nothing regarding error codes for
GetUserProfileDirectory.
Andreas Rosenberg wrote:
Nikolay Sivov wrote:
Andreas Rosenberg wrote:
+if ( !lpcchSize ) {
+SetLastError(ERROR_INVALID_PARAMETER);
+return FALSE;
+SetLastError(ERROR_MORE_DATA);
+}
+}
+}
+else
+
Andreas Rosenberg wrote:
+if ( !lpcchSize ) {
+SetLastError(ERROR_INVALID_PARAMETER);
+return FALSE;
+SetLastError(ERROR_MORE_DATA);
+}
+}
+}
+else
+SetLastError(ERROR_REGISTRY_CORRUPT);
+}
+
Andreas Rosenberg wrote:
+TRACE(%p %s %p\n, hToken, debugstr_w(lpProfileDir), lpcchSize );
+/* profile specific tokens not supported, so hToken ignored */
+
+SetLastError(0);
+res =
RegOpenKeyExW(HKEY_LOCAL_MACHINE,profile_pathname,0L,KEY_QUERY_VALUE,keyProfileDir);
Why do
On Monday 02 March 2009 17:26:47 Nikolay Sivov wrote:
Andreas Rosenberg wrote:
+TRACE(%p %s %p\n, hToken, debugstr_w(lpProfileDir), lpcchSize );
+/* profile specific tokens not supported, so hToken ignored */
+
+SetLastError(0);
+res =
Andreas Rosenberg wrote:
On Monday 02 March 2009 17:26:47 Nikolay Sivov wrote:
Andreas Rosenberg wrote:
+TRACE(%p %s %p\n, hToken, debugstr_w(lpProfileDir), lpcchSize );
+/* profile specific tokens not supported, so hToken ignored */
+
+SetLastError(0);
+res =
31 matches
Mail list logo