Generated a Gen GUI application and deployed it to a user workstation. When the user executes the application, the following message is returned.:
Failed to load DLL file, reason code 126
Component: Gen Runtime, GUI
The error is not specific to a Gen application.
In general, reason code 126 "Failed to load DLL <module>" means "The specified module could not be found": https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-
That means the Gen application is trying to load a dependent dll which cannot be found.
To troubleshoot, it is best to use Dependency Walker to determine the missing dll: http://www.dependencywalker.com/
For this particular scenario, Dependency Walker showed that the following DLLs were missing:
An internet search revealed these DLLs are part of the Visual Studio redistributable. Installing the 32-bit Visual Studio redistributable resolved the problem (note Gen applications are 32-bit).
NOTE: Due to generic nature of the 126 error, Dependency Walker may show different missing dll file(s), so the resolution will depend on what it shows.