By using ISystemInformation interface (wuapi.dll), you can check, if the Windows Update Agent (WUA) requires a reboot of the system.
ISystemInformation::get_RebootRequired Gets a Boolean value that indicates whether a system restart is required to complete the installation or uninstallation of one or more updates.