Ignore:
Timestamp:
Aug 13, 2006, 1:41:05 AM (19 years ago)
Author:
bird
Message:

Hacking and debugging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/synergy/lib/platform/CPMScreen.cpp

    r2755 r2761  
    7070{
    7171        assert(s_screen == NULL);
    72 
    7372        s_screen = this;
     73   
     74    // create the event queue buffer first so we know there is a message queue.
     75    CPMEventQueueBuffer *eventQueue = new CPMEventQueueBuffer();
    7476
    7577        // query curren thread bits.
    7678        m_threadID = _gettid();
    7779        m_hab = WinQueryAnchorBlock(HWND_DESKTOP);
     80    //if (m_hab == NULLHANDLE) {
     81        //    m_hab = WinInitialize(0);
     82    //}
    7883        m_hmq = WinQueueFromID(m_hab, getpid(), _gettid());
     84    //if (m_hab != NULLHANDLE && m_hmq == NULLHANDLE) {
     85    //    m_hmq = WinCreateMsgQueue(m_hab, 0);
     86    //}
    7987        if (m_hab == NULLHANDLE || m_hmq == NULLHANDLE) {
    80                 LOG((CLOG_CRIT "couldn't get the hab/hmq of the current thread!\n"));
     88                LOG((CLOG_CRIT "couldn't get the hab(%ld)/hmq(%ld) of the current thread! %d\n", m_hab, m_hmq));
     89        delete eventQueue;
     90                s_screen = NULL;
    8191                throw XScreenOpenFailure();
    8292        }
     
    97107                destroyWindow(m_window);
    98108                closeHookLibrary(m_hmodHook);
     109        delete eventQueue;
    99110                s_screen = NULL;
    100111                throw;
     
    626637                                                                0, //WS_?,
    627638                                                                0, 0, 1, 1,
    628                                                                 HWND_DESKTOP,
    629639                                                                NULLHANDLE,
     640                                                                HWND_TOP,
    630641                                                                0,
    631642                                                                this,
    632643                                                                NULL);
    633644        if (hwnd == NULLHANDLE) {
    634                 LOG((CLOG_ERR "failed to create window: %ld", WinGetLastError(m_hab)));
     645                LOG((CLOG_ERR "failed to create window: %lx", WinGetLastError(m_hab)));
    635646                throw XScreenOpenFailure();
    636647        }
Note: See TracChangeset for help on using the changeset viewer.