Ignore:
Timestamp:
Jul 5, 2001, 8:10:56 PM (24 years ago)
Author:
sandervl
Message:

WinHelpA now uses shared memory

File:
1 edited

Legend:

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

    r6162 r6177  
    1 /* $Id: user32.cpp,v 1.105 2001-07-04 06:39:01 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.106 2001-07-05 18:10:56 sandervl Exp $ */
    22
    33/*
     
    976976  HWND hDest;
    977977  LPWINHELP lpwh;
    978   HGLOBAL hwh;
    979978  HINSTANCE winhelp;
    980979  int size,dsize,nlen;
    981 
    982   dprintf(("USER32:  WinHelpA %s\n", lpszHelp));
     980  BOOL ret;
     981
     982  dprintf(("USER32: WinHelpA %x %s %d %x", hwnd, lpszHelp, uCommand, dwData));
    983983
    984984  if(!WM_WINHELP)
     
    10361036    nlen = 0;
    10371037  size = sizeof(WINHELP) + nlen + dsize;
    1038 #if 1
    1039   hwh = GlobalAlloc(GMEM_SHARE,size);
    1040   lpwh = (WINHELP*)GlobalLock(hwh);
    1041 #else
    1042   hwh  = (HANDLE)_smalloc(size);
    1043   lpwh = (WINHELP*)hwh;
    1044 #endif
     1038
     1039  //allocate shared memory
     1040  lpwh = (WINHELP*)_smalloc(size);
    10451041  lpwh->size = size;
    10461042  lpwh->command = uCommand;
     
    10581054  } else
    10591055      lpwh->ofsData = 0;
    1060   GlobalUnlock(hwh);
    1061 
    1062   return SendMessageA(hDest,WM_WINHELP,hwnd,hwh);
     1056
     1057  ret = SendMessageA(hDest,WM_WINHELP,hwnd,(LPARAM)lpwh);
     1058  free(lpwh);
     1059  return ret;
    10631060}
    10641061//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.