Ignore:
Timestamp:
Aug 23, 1999, 5:34:47 PM (26 years ago)
Author:
dengert
Message:

WM_ERASEBKGND sent from BeginPaint now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/spy.cpp

    r374 r650  
    1 /* $Id: spy.cpp,v 1.2 1999-07-23 17:52:16 sandervl Exp $ */
     1/* $Id: spy.cpp,v 1.3 1999-08-23 15:34:46 dengert Exp $ */
    22
    33/*
     
    2626
    2727
    28 #define  Q_BUFFER_SIZE  4096
    29 #define  MAX_MESSAGES   (Q_BUFFER_SIZE/sizeof(Q_SPYMSG))
     28#define  Q_BUFFER_SIZE  4096
     29#define  MAX_MESSAGES   (Q_BUFFER_SIZE/sizeof(Q_SPYMSG))
    3030
    31 PID       pidServer  = 0;
    32 HQUEUE    hqQueue    = 0;
     31PID       pidServer  = 0;
     32HQUEUE    hqQueue    = 0;
    3333Q_SPYMSG *pvdQMemory = 0;
    34 int       msgIndex   = 0;
     34int       msgIndex   = 0;
    3535
    3636BOOL InitSpyQueue()
     
    3838 APIRET rc;
    3939
    40    if (rc = DosOpenQueue(&pidServer, &hqQueue, "\\queues\\"Q_NAME))
     40   if ((rc = DosOpenQueue(&pidServer, &hqQueue, "\\queues\\"Q_NAME)) != 0)
    4141   {
    4242        dprintf(("InitSpyQueue: couldn't open spy queue rc=%d!", rc));
    4343        return FALSE;
    4444   }
    45    if (rc = DosAllocSharedMem((VOID **)&pvdQMemory,
    46                         NULL,
    47                         Q_BUFFER_SIZE,
    48                          fALLOCSHR))
     45   if ((rc = DosAllocSharedMem((VOID **)&pvdQMemory,
     46                        NULL,
     47                        Q_BUFFER_SIZE,
     48                         fALLOCSHR)) != 0)
    4949   {
    5050        dprintf(("InitSpyQueue: DosAllocSharedMem failed rc=%d", rc));
     
    7070   if(hqQueue) {
    7171        if(pvdQMemory) {
    72                 rc = DosWriteQueue(hqQueue, Q_SPYMSG_KILLSERVER, 0, 0, 0);
     72                rc = DosWriteQueue(hqQueue, Q_SPYMSG_KILLSERVER, 0, 0, 0);
    7373                if(rc) {
    7474                        dprintf(("CloseSpyQueue: DosWriteQueue returned %d", rc));
    7575                }
    7676        }
    77         DosCloseQueue(hqQueue);
     77        DosCloseQueue(hqQueue);
    7878   }
    7979   if(pvdQMemory)
    80         DosFreeMem(pvdQMemory);
     80        DosFreeMem(pvdQMemory);
    8181}
    8282
     
    8888   if (hqQueue == 0)
    8989        return FALSE;
    90    
     90
    9191   pvdQMemory[msgIndex].hwnd   = hwnd;
    9292   pvdQMemory[msgIndex].Msg    = Msg;
     
    9494   pvdQMemory[msgIndex].lParam = lParam;
    9595
    96    if (rc = DosWriteQueue(hqQueue,
    97                      Q_SPYMSG_WNDMSG,
    98                      sizeof(Q_SPYMSG),
    99                      &pvdQMemory[msgIndex],
    100                      0))
     96   if ((rc = DosWriteQueue(hqQueue,
     97                     Q_SPYMSG_WNDMSG,
     98                     sizeof(Q_SPYMSG),
     99                     &pvdQMemory[msgIndex],
     100                     0)) != 0)
    101101   {
    102102        hqQueue = 0; //give up, server probably died
     
    104104        return FALSE;
    105105   }
    106    if(++msgIndex >= MAX_MESSAGES) 
     106   if(++msgIndex >= MAX_MESSAGES)
    107107   {
    108108        msgIndex = 0;
Note: See TracChangeset for help on using the changeset viewer.