Getting current firmware version in code

Hi.

How do I retrieve the current firmware version in code? I know I can get it with the mf deploy tool but I need to retrieve it in code in order to verify that an IFU of the firmware has been successfull.

Using G120 and the latest SDK.