OVALDI on Windows XP SP3

  • Kamlesh Mallick

    Kamlesh Mallick - 2013-12-24

    Hey guys,

    Does OVALDI run on Windows XP SP3?

    I see that the code uses - Authorization functions found (http://msdn.microsoft.com/en-us/library/windows/desktop/aa375742(v=vs.85).aspx) here which only work on Vista and above.

    And thus i get errors like this on Windows XP

    "the procedure entry point AuditFree could not be located in the dynamic link library ADVAPI32.dll"

    Which makes sense - as these functions are not supported in XP

    I would like to know, if i comment out the code containing these functions would i get it to work in XP?

    Or do i have to watch out for something else?

    Last edit: Kamlesh Mallick 2013-12-24
  • Kamlesh Mallick

    Kamlesh Mallick - 2014-01-13

    Holla people,

    I could get rid of the error - “The procedure entry point K32*** could not be located in the dynamic link library KERNEL32.dll” while running your application.”

    So to solve this, we will add some compiler flags. For performance reasons, some APIs have been moved from Psapi.dll to Kernel32.dll in Windows7 and Windows Server 2008 R2. WinSDK v7.0* is reflecting these modifications to be compatible with the new system dlls. This is by design, but wait! If you are trying to link your application to Psapi.lib and then targeting any pre Windows7 or pre Windows Server 2008 R2, you will get this runtime error. Breaking this down, all APIs from Psapi.dll are copied to Kernel32.dll in Windows7 and Windows Server 2008 R2 (Psapi.dll remain unchanged though). Linking to Psapi.lib marks these APIs as Kernel32 APIs to load them from Kernel32.dll instead.

    So we will have to add the compiler flags to link against PSAPI.dll
    cl /MD /EHsc /D _WIN32_WINNT=0x501 mytest.cpp /link Psapi.lib
    cl /MD /EHsc /D PSAPI_VERSION=1 mytest.cpp /link Psapi.lib

    This fixes the issue. But i still get other errors about some API's which are used in the ovaldi codebase, for which the Minimum supported client is Windows Vista.

    These are the following Win32 API which had the minimum Supported OS as - Windows XP in ‘mtxoval' codebase

    API’s - AuditFree , AuditLookupCategoryGuidFromCategoryId, AuditEnumerateSubCategories, AuditQuerySystemPolicy

    Now i comment out the APIs and i get the OVALDI to work fine.

    I wonder what sort of issues will i face without calls to these APIs?

    Thanx again.

    Last edit: Kamlesh Mallick 2014-01-13

Log in to post a comment.