advapi32: Add tests for getting the groups, user and privileges of a token.

Saulius Krasuckas saulius2 at
Sat May 20 15:55:54 CDT 2006

* On Sat, 20 May 2006, Robert Shearman wrote:
> * Saulius Krasuckas wrote:
> > 
> > This makes advapi32_test.exe to not load on w9x.  The missing import 
> > is advapi32!ConvertSidToStringSidA.  As I want to get this fixed I am 
> > trying to understand what version (A or W) should this call be 
> > converted to.  But after noticing LPTSTR I am lost :)
> The LPTSTR was there because I was developing on Windows and was testing both
> versions. It can be removed from the tests and replaced with LPSTR and the
> calls that use it replaced with the "A" versions. 


> You'll probably need to make this import into a delay-load one in order 
> for it to work on win9x, but I wouldn't be surprised if there weren't 
> some others that need the same delay-load treatment.

Well, I see code in security.c already uses pConvertSidToStringSidA var.  

But as I am lazy, I just am going to test if OpenProcessToken() succeeds 
and return from the test when it's not, thus avoiding further calls to 
ConvertSidToStringSid() and for example GetTokenInformation() which just 

BTW, it fails on win9x with ERROR_NOT_ENOUGH_MEMORY when you pass 
TokenInformationLength = NULL.  Should this be tested outside the 
test_token_attr() or maybe shouldn't be at all?

More information about the wine-devel mailing list