Saptarishi Gupta

Application Verifier is reporting the following Error for SHGetSpecialFolderLocation API call

- <avrf:logEntry Time="2007-04-12 : 12:33:34" LayerName="LuaPriv" StopCode="0x331B" Severity="Error">
<avrf:message>Access was restricted to trusted users only.</avrf:message>
<avrf:formatmessage>OpenFileMappingW: Section (\Sessions\1\BaseNamedObjects\windows_shell_global_counters) only grants requested 'READ_CONTROL' to 'NT AUTHORITY\SYSTEM'</avrf:formatmessage>
<avrfStick out tonguearameter1>71e81174 - Object Type</avrfStick out tonguearameter1>
<avrfStick out tonguearameter2>2a5f30 - Object Name</avrfStick out tonguearameter2>
<avrfStick out tonguearameter3>71e820c4 - Access Mask</avrfStick out tonguearameter3>
<avrfStick out tonguearameter4>291150 - String SID</avrfStick out tonguearameter4>
- <avrfTongue TiedtackTrace>
<avrf:trace>vfluapriv!NS_LuaPriv::LogRestrictedRightEntry+3f</avrf:trace>
<avrf:trace>vfluapriv!NS_LuaPriv::LogRestrictedRight+154</avrf:trace>
<avrf:trace>vfluapriv!NS_LuaPriv::AnalyzeLuaPermission+178</avrf:trace>
<avrf:trace>vfluapriv!NS_LuaPriv::AnalyzeLuaSecurity+ae</avrf:trace>
<avrf:trace>vfluapriv!NS_LuaPriv::CheckLuaAccess+4d</avrf:trace>
<avrf:trace>vfluapriv!NS_LuaPriv::CheckSecurityOnOpenObject+b3</avrf:trace>
<avrf:trace>vfluapriv!NS_LuaPriv::VfHookOpenFileMappingW+11d</avrf:trace>
<avrf:trace>SHLWAPI!Ordinal559+49a</avrf:trace>
<avrf:trace>SHLWAPI!Ordinal559+437</avrf:trace>
<avrf:trace>SHLWAPI!Ordinal559+4d0</avrf:trace>
<avrf:trace>SHLWAPI!Ordinal632+d</avrf:trace>
<avrf:trace>SHELL32!RegenerateUserEnvironment+ada</avrf:trace>
<avrf:trace>SHELL32!SHBindToObject+1f2</avrf:trace>
<avrf:trace>SHELL32!SHBindToObject+168</avrf:trace>
<avrf:trace>SHELL32!SHBindToObject+e0</avrf:trace>
<avrf:trace>SHELL32!SHGetFolderLocation+a1</avrf:trace>
<avrf:trace>SHELL32!SHGetSpecialFolderLocation+17</avrf:trace>
<avrf:trace>TestVistaCompatibility!+4143f2</avrf:trace>
<avrf:trace>TestVistaCompatibility!+41aee0</avrf:trace>
<avrf:trace>KERNEL32!BaseThreadInitThunk+12</avrf:trace>
<avrf:trace>ntdll!LdrInitializeThunk+4d</avrf:trace>
</avrfTongue TiedtackTrace>
</avrf:logEntry>

But the API seem to work perfectly fine. Is it that the Verfier is reporting things incorrectly should I ignore the Error if I see that my API is behaving correctly




Re: Application Compatibility for Windows Vista Application Verfier reporting Error for SHGetSpecialFolderLocation method

Mo Nail - MFST

Were you running your app elevated ('run as administrator')




Re: Application Compatibility for Windows Vista Application Verfier reporting Error for SHGetSpecialFolderLocation method

Saptarishi Gupta

The Error is reported for while running as administrator as well as standard user.

But the API is working fine.

Small snippet of the code

LPITEMIDLIST idlist;

LPMALLOC lpMalloc;

CString sMyDocuments;

if (:Tongue TiedHGetSpecialFolderLocation(NULL, CSIDL_PERSONAL, &idlist) == NOERROR)

{

:Tongue TiedHGetMalloc(&lpMalloc);

:Tongue TiedHGetPathFromIDList(idlist, sMyDocuments.GetBuffer(MAX_PATH));

sMyDocuments.ReleaseBuffer();

lpMalloc->Free(idlist);

}

I am not having a clue as to why should a function like SHGetSpecialFolderLocation report a problem with sessions.






Re: Application Compatibility for Windows Vista Application Verfier reporting Error for SHGetSpecialFolderLocation method

Mo Nail - MFST

Could you verify that you are using ACT 5.0 and if your application was compiled with VS 2003 that .NET 1.1 SP1 is installed on Vista (if needed)