Hi
As @David Lowndes mentioned here, to query the version from a resource one should use VerQueryValue API.
But unfortunately, this API does not support resource IDs directly, moreover, it does modifications to loaded resource's memory. So one should load the resource with LoadResource and then copy it to writable memory. I found a code sample for this: Retrieve the application version from its own resources
Hope this helps.