Ignore:
Timestamp:
Sep 4, 2000, 8:23:58 PM (25 years ago)
Author:
sandervl
Message:

SetWindowLong changes + fixes for GWL_WNDPROC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/winproc.cpp

    r2803 r4188  
    1 /* $Id: winproc.cpp,v 1.4 2000-02-16 14:28:28 sandervl Exp $ */
     1/* $Id: winproc.cpp,v 1.5 2000-09-04 18:23:58 sandervl Exp $ */
    22/*
    33 * Window procedure callbacks
     
    6161    WINDOWPROC *proc;
    6262
     63    ptr = (BYTE *)handle;
    6364    if(ptr == NULL) {
     65        DebugInt3();
    6466        return NULL;
    6567    }
    6668
    67     ptr = (BYTE *)handle;
    6869    /* First check if it is the jmp address */
    6970//    if (*ptr == 0xe9 /* jmp */) ptr -= (int)&((WINDOWPROC *)0)->jmp -
     
    131132 WINDOWPROC *lpProc = (WINDOWPROC *)proc;
    132133
    133     if (!lpProc) return NULL;
    134 
    135     /* We want a 32-bit address */
    136     return (WNDPROC)&lpProc->jmp;
     134    if(!lpProc) {
     135        DebugInt3();
     136        return NULL;
     137    }
     138
     139    if(type != lpProc->type) {
     140         /* Have to return the jmp address if types don't match */
     141         return (WNDPROC)&lpProc->jmp;
     142    }
     143    else return WINPROC_THUNKPROC(lpProc); //return original window proc address if types match
    137144}
    138145
Note: See TracChangeset for help on using the changeset viewer.