ApiValidation : error : While Checking file \x64\Debug\sample.sys aitstatic is returned exit code 5

Hi,

While building the kmdf driver, I am getting following error with apivalidator,

ApiValidation : error : While Checking file C:\Build\x64\Debug\sample.sys aitstatic is returned exit code 5.

I am not able to find details for exit code 5 of aitstatic. I am using windows ewdk-22621 for building the driver.

Thank you for your help in advance!.

Regards,

Winerror 5 is ERROR_ACCESS_DENIED. Is that binary busy in some way, like being active in a debugger?

@Tim_Roberts said:
Winerror 5 is ERROR_ACCESS_DENIED. Is that binary busy in some way, like being active in a debugger?

API Validator runs as post build script. Driver binary is not busy.

have you tried adding a delay to your script? some tools are notorious for returning before all child processes have terminated with HANDLEs still open.

@MBond2 said:
have you tried adding a delay to your script? some tools are notorious for returning before all child processes have terminated with HANDLEs still open.

yes, totally. However, in this case, it is part of driver build process. So, the driver is not even deployed anywhere for it to run.
just for quick ref: https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/validating-windows-drivers#running-apivalidator-in-visual-studio

@user1915016
Can you provide details “ApiValidation : error : While Checking file C:\Build\x64\Debug\sample.sys aitstatic is returned exit code 5” doesn’t help much. This is strange, more details or logs might help

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.