I found the answer quite simple, just change a few includes and recompile. I was using Inventor 2021, so the includes just changed to have "Inventor 2025" in them:
#include "C:\Users\Public\Documents\Autodesk\Inventor 2025\SDK\DeveloperTools\Include\InventorUtils.h"
and
#import "C:\Program Files\Autodesk\Inventor 2025\Bin\RxInventor.tlb" no_namespace named_guids raw_dispinterfaces raw_method_prefix("") high_method_prefix("Method") \
rename("DeleteFile", "APIDeleteFile"), rename("CopyFile", "APICopyFile"), rename("MoveFile", "APIMoveFile") \
rename("SetEnvironmentVariable", "APISetEnvironmentVariable")
All compiles and works now.