// -------------------------------------------------------------------------- VNCviewerApp32::VNCviewerApp32(HINSTANCE hInstance, PSTR szCmdLine) : VNCviewerApp(hInstance, szCmdLine) { m_pdaemon = NULL; // Load a requested keyboard layout if (m_options.m_kbdSpecified) { HKL hkl = LoadKeyboardLayout( m_options.m_kbdname, KLF_ACTIVATE | KLF_REPLACELANG | KLF_REORDER ); if (hkl == NULL) { MessageBox(NULL, _T("Error loading specified keyboard layout"), _T("VNC info"), MB_OK | MB_ICONSTOP); exit(1); } } // Start listening daemons if requested if ((m_options.m_listening) && (FindWindow("VNCviewer Daemon", 0) == NULL)) { vnclog.Print(3, _T("In listening mode - staring daemons\n")); ListenMode(); } else { m_options.m_listening = false; } RegisterSounds(); }
void digi_load_sounds() { int i, sound_num; if (!digi_initialized) return; if ( RegisterSounds(sound_list, 1) ) digi_close(); // on low memory conditions, we need to release sounds from the registered // set so the memory can be freed. The call to RegisterSounds only registers // them with halestorm. We will use LoadSound to actually load those sounds that // we intend to use. for (i = 0; i < MAX_SOUNDS; i++) { sound_num = digi_xlat_sound(i); if (sound_num != -1) LoadSound(sound_num); // load the sound into memory..hales says this is locked high in heap } }
// -------------------------------------------------------------------------- VNCviewerApp32::VNCviewerApp32(HINSTANCE hInstance, PSTR szCmdLine) : VNCviewerApp(hInstance, szCmdLine) { m_pdaemon = NULL; m_pflasher = NULL; //HKL hkl = LoadKeyboardLayout( "00000813", // KLF_ACTIVATE | KLF_REPLACELANG | KLF_REORDER ); // Load a requested keyboard layout if (m_options.m_kbdSpecified) { HKL hkl = LoadKeyboardLayout( m_options.m_kbdname, KLF_ACTIVATE | KLF_REPLACELANG | KLF_REORDER ); if (hkl == NULL) { MessageBox(NULL, sz_A1, sz_A2, MB_OK | MB_ICONSTOP); exit(1); } } // Start listening daemons if requested if (m_options.m_listening) { vnclog.Print(3, _T("In listening mode - staring daemons\n")); try { // m_pflasher = new Flasher(FLASH_PORT_OFFSET); m_pflasher = new Flasher(m_options.m_listenPort + FLASH_PORT_OFFSET - INCOMING_PORT_OFFSET); m_pdaemon = new Daemon(m_options.m_listenPort); } catch (WarningException &e) { char msg[1024]; sprintf(msg,"%s (%s)\n\r%s",sz_A3, e.m_info, sz_A4); MessageBox(NULL, msg, sz_A5, MB_OK | MB_ICONSTOP); exit(1); } } RegisterSounds(); }