Check authenticode signature at runtime ? c#

Signing my EXE files.

During runtime the application occasionally checks that its signature is intact. To do that it calls the WinVerifyTrust API. No problem with any of that. But the WinVerifyTrust API has a lot of baggage (enums and structs etc)

Anyone know of an easier way ? I just want the application to be able to check that it has not been modified/patched since it was build/signed/deployed.

Maybe Comodo have some sample code ?

Thanks
Ian

Sorry, by ‘easier’ I really mean ‘smaller’. The API works great and it’s fast but I’m looking at 100 lines of code, what with all the enums, structs and helper functions just to build an object that can be passed into the API.

Surely there’s a better solution ?

Thanks