Ignore:
Timestamp:
Dec 20, 2001, 9:45:56 PM (24 years ago)
Author:
sandervl
Message:

GetClassNameW fix; return size in characters and truncate name if not enough room in buffer

File:
1 edited

Legend:

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

    r6611 r7663  
    1 /* $Id: windowclass.cpp,v 1.23 2001-08-31 13:37:39 phaller Exp $ */
     1/* $Id: windowclass.cpp,v 1.24 2001-12-20 20:45:56 sandervl Exp $ */
    22/*
    33 * Win32 Window Class Code for OS/2
     
    406406    rc = (wnd->getClass())->getClassName(lpszClassName, cchClassName);
    407407    RELEASE_WNDOBJ(wnd);
    408     dprintf(("USER32: GetClassNameA %x %s (%d)", hwnd, lpszClassName, rc));
     408    if(HIWORD(lpszClassName)) {
     409         dprintf(("USER32: GetClassNameA %x %s", hwnd, lpszClassName));
     410    }
     411    else dprintf(("USER32: GetClassNameA %x %x", hwnd, lpszClassName));
    409412    return rc;
    410413}
     
    419422 int              ret;
    420423
    421     dprintf(("USER32: GetClassNameW\n"));
    422424    wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
    423425    if(!wnd) {
     
    427429    ret = (wnd->getClass())->getClassName(lpszClassName, cchClassName);
    428430    RELEASE_WNDOBJ(wnd);
     431    if(HIWORD(lpszClassName)) {
     432         dprintf(("USER32: GetClassNameW %x %ls", hwnd, lpszClassName));
     433    }
     434    else dprintf(("USER32: GetClassNameW %x %x", hwnd, lpszClassName));
    429435    return ret;
    430436}
Note: See TracChangeset for help on using the changeset viewer.