MCPcopy Create free account
hub / github.com/Pulse-Eight/libcec / LibCecBootloader

Function LibCecBootloader

include/cecloader.h:86–103  ·  view source on GitHub ↗

! * @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. */

Source from the content-addressed store, hash-verified

84 * @return True when the command was sent, false otherwise.
85 */
86bool 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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected