! * @brief Start the bootloader on the first device that was detected. * @param strLib The name of and/or path to libCEC * @return True when the command was sent, false otherwise. */
| 84 | * @return True when the command was sent, false otherwise. |
| 85 | */ |
| 86 | bool LibCecBootloader(const char *strLib = NULL) |
| 87 | { |
| 88 | if (!g_libCEC) |
| 89 | g_libCEC = LoadLibrary(strLib ? strLib : "cec.dll"); |
| 90 | if (!g_libCEC) |
| 91 | return false; |
| 92 | |
| 93 | typedef bool (__cdecl*_LibCecBootloader)(void); |
| 94 | _LibCecBootloader LibCecBootloader; |
| 95 | LibCecBootloader = (_LibCecBootloader) (GetProcAddress(g_libCEC, "CECStartBootloader")); |
| 96 | if (!LibCecBootloader) |
| 97 | return false; |
| 98 | |
| 99 | bool bReturn = LibCecBootloader(); |
| 100 | FreeLibrary(g_libCEC); |
| 101 | g_libCEC = NULL; |
| 102 | return bReturn; |
| 103 | } |
| 104 | |
| 105 | #else |
| 106 |
no outgoing calls
no test coverage detected