Changeset 6375 for trunk/src/user32


Ignore:
Timestamp:
Jul 20, 2001, 5:42:38 PM (24 years ago)
Author:
sandervl
Message:

initterm update

Location:
trunk/src/user32
Files:
2 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/Makefile

    r6254 r6375  
    1 # $Id: Makefile,v 1.87 2001-07-08 15:51:41 sandervl Exp $
     1# $Id: Makefile,v 1.88 2001-07-20 15:34:15 sandervl Exp $
    22
    33#
     
    4040$(OBJDIR)\char.obj \
    4141$(OBJDIR)\initterm.obj \
     42$(OBJDIR)\inituser32.obj \
    4243$(OBJDIR)\uitools.obj \
    4344$(OBJDIR)\unknown.obj \
  • trunk/src/user32/USER32.DEF

    r6149 r6375  
    1 ; $Id: USER32.DEF,v 1.60 2001-07-03 13:23:31 sandervl Exp $
     1; $Id: USER32.DEF,v 1.61 2001-07-20 15:34:15 sandervl Exp $
    22
    33LIBRARY USER32 INITINSTANCE TERMINSTANCE
     
    671671
    672672    _wvsnprintfA@16                                              @2010 NONAME
     673;Export for MSACM32
     674    _wsnprintfA                                                  @2100 NONAME
    673675
    674676    _KEYBOARD_Enable@4                                           @2011 NONAME
  • trunk/src/user32/dbglocal.cpp

    r3679 r6375  
    1 /* $Id: dbglocal.cpp,v 1.6 2000-06-08 18:10:09 sandervl Exp $ */
     1/* $Id: dbglocal.cpp,v 1.7 2001-07-20 15:34:15 sandervl Exp $ */
    22
    33/*
     
    1616#ifdef DEBUG
    1717
    18 USHORT DbgEnabled[DBG_MAXFILES] = {0};
    19 USHORT DbgEnabledLvl2[DBG_MAXFILES] = {0};
     18USHORT DbgEnabledUSER32[DBG_MAXFILES] = {0};
     19USHORT DbgEnabledLvl2USER32[DBG_MAXFILES] = {0};
    2020
    21 char  *DbgFileNames[DBG_MAXFILES] =
     21static char  *DbgFileNames[DBG_MAXFILES] =
    2222{
    2323"user32",
     
    9292//******************************************************************************
    9393//******************************************************************************
    94 void ParseLogStatus()
     94void ParseLogStatusUSER32()
    9595{
    9696 char *envvar = getenv(DBG_ENVNAME);
     
    100100
    101101    for(i=0;i<DBG_MAXFILES;i++) {
    102         DbgEnabled[i] = 1;
     102        DbgEnabledUSER32[i] = 1;
    103103    }
    104104
     
    108108                if(*(dbgvar-1) == '-') {
    109109                    for(i=0;i<DBG_MAXFILES;i++) {
    110                         DbgEnabled[i] = 0;
     110                        DbgEnabledUSER32[i] = 0;
    111111                    }
    112112                }
     
    116116                if(dbgvar) {
    117117                    if(*(dbgvar-1) == '-') {
    118                             DbgEnabled[i] = 0;
     118                            DbgEnabledUSER32[i] = 0;
    119119                    }
    120120                    else   
    121121                    if(*(dbgvar-1) == '+') {
    122                         DbgEnabled[i] = 1;
     122                        DbgEnabledUSER32[i] = 1;
    123123                    }
    124124                }
     
    130130                if(*(dbgvar-1) == '+') {
    131131                    for(i=0;i<DBG_MAXFILES;i++) {
    132                         DbgEnabledLvl2[i] = 1;
     132                        DbgEnabledLvl2USER32[i] = 1;
    133133                    }
    134134                }
     
    138138                if(dbgvar) {
    139139                    if(*(dbgvar-1) == '-') {
    140                             DbgEnabledLvl2[i] = 0;
     140                            DbgEnabledLvl2USER32[i] = 0;
    141141                    }
    142142                    else   
    143143                    if(*(dbgvar-1) == '+') {
    144                         DbgEnabledLvl2[i] = 1;
     144                        DbgEnabledLvl2USER32[i] = 1;
    145145                    }
    146146                }
  • trunk/src/user32/dbglocal.h

    r3679 r6375  
    1 /* $Id: dbglocal.h,v 1.5 2000-06-08 18:10:09 sandervl Exp $ */
     1/* $Id: dbglocal.h,v 1.6 2001-07-20 15:34:15 sandervl Exp $ */
    22
    33/*
     
    1515#ifdef DEBUG
    1616//Parses environment variable for selective enabling/disabling of logging
    17 void ParseLogStatus();
     17void ParseLogStatusUSER32();
    1818
    1919#define DBG_ENVNAME        "dbg_user32"
     
    9090#define DBG_MAXFILES             68
    9191
    92 extern USHORT DbgEnabled[DBG_MAXFILES];
    93 extern USHORT DbgEnabledLvl2[DBG_MAXFILES];
     92extern USHORT DbgEnabledUSER32[DBG_MAXFILES];
     93extern USHORT DbgEnabledLvl2USER32[DBG_MAXFILES];
    9494
    9595#ifdef dprintf
     
    9797#endif
    9898
    99 #define dprintf(a)      if(DbgEnabled[DBG_LOCALLOG] == 1) WriteLog a
     99#define dprintf(a)      if(DbgEnabledUSER32[DBG_LOCALLOG] == 1) WriteLog a
    100100
    101101#ifdef dprintf2
     
    103103#endif
    104104
    105 #define dprintf2(a)     if(DbgEnabledLvl2[DBG_LOCALLOG] == 1) WriteLog a
     105#define dprintf2(a)     if(DbgEnabledLvl2USER32[DBG_LOCALLOG] == 1) WriteLog a
    106106
    107107#else
    108108
    109 #define ParseLogStatus()
     109#define ParseLogStatusUSER32()
    110110
    111111#endif //DEBUG
  • trunk/src/user32/dc.cpp

    r5935 r6375  
    1 /* $Id: dc.cpp,v 1.109 2001-06-09 14:50:16 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.110 2001-07-20 15:34:16 sandervl Exp $ */
    22
    33/*
     
    7676
    7777#ifdef DEBUG
    78 #define dprintfRegion(a,b,c) if(DbgEnabledLvl2[DBG_LOCALLOG] == 1) dprintfRegion1(a,b,c)
     78#define dprintfRegion(a,b,c) if(DbgEnabledLvl2USER32[DBG_LOCALLOG] == 1) dprintfRegion1(a,b,c)
    7979
    8080void dprintfRegion1(HPS hps, HWND hWnd, HRGN hrgnClip)
  • trunk/src/user32/gen_object.cpp

    r5964 r6375  
    1 /* $Id: gen_object.cpp,v 1.11 2001-06-11 14:37:46 sandervl Exp $ */
     1/* $Id: gen_object.cpp,v 1.12 2001-07-20 15:34:16 sandervl Exp $ */
    22/*
    33 * Generic Object Class for OS/2
     
    9191LONG GenericObject::addRef()
    9292{
    93   dprintf2(("addRef %x -> refcount %x", this, refCount+1));
     93////  dprintf2(("addRef %x -> refcount %x", this, refCount+1));
    9494  return InterlockedIncrement(&refCount);
    9595}
     
    9999LONG GenericObject::release()
    100100{
    101   dprintf2(("release %x -> refcount %x", this, refCount-1));
     101////  dprintf2(("release %x -> refcount %x", this, refCount-1));
    102102#ifdef DEBUG
    103103  if(refCount-1 < 0) {
  • trunk/src/user32/initterm.cpp

    r6339 r6375  
    3737#include <winconst.h>
    3838#include <odinlx.h>
    39 #include <spy.h>
    40 #include <monitor.h>
    41 #include "pmwindow.h"
    42 #include "win32wdesktop.h"
    43 #include "syscolor.h"
    4439#include "initterm.h"
    4540#include <exitlist.h>
     
    5752static void APIENTRY cleanup(ULONG reason);
    5853
    59 extern "C" {
    60  //Win32 resource table (produced by wrc)
    61  extern DWORD _Resource_PEResTab;
    62 }
    63 DWORD hInstanceUser32 = 0;
    6454BOOL  fVersionWarp3 = FALSE;
    6555
     
    8777      case 0 :
    8878         ctordtorInit();
    89          ParseLogStatus();
    90 
    9179         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
    92 
    93          hInstanceUser32 = RegisterLxDll(hModule, 0, (PVOID)&_Resource_PEResTab,
    94                                          USER32_MAJORIMAGE_VERSION, USER32_MINORIMAGE_VERSION,
    95                                          IMAGE_SUBSYSTEM_WINDOWS_GUI);
    96          if(hInstanceUser32 == 0)
    97                 return 0UL;
    98 
    99          dprintf(("user32 init %s %s (%x)", __DATE__, __TIME__, DLLENTRYPOINT_NAME));
    10080
    10181         rc = DosQuerySysInfo(QSV_VERSION_MAJOR, QSV_VERSION_MINOR, version, sizeof(version));
     
    11595                return 0UL;
    11696
    117          //SvL: Try to start communication with our message spy queue server
    118          InitSpyQueue();
    119 
    120          //SvL: Init win32 PM classes
    121          if(InitPM() == FALSE) {
    122                 return 0UL;
    123          }
    124 
    125          //SvL: 18-7-'98, Register system window classes (button, listbox etc etc)
    126          //CB: register internal classes
    127          RegisterSystemClasses(hModule);
    128 
    129          //CB: initialize PM monitor driver
    130          MONITOR_Initialize(&MONITOR_PrimaryMonitor);
    131 
     97         rc = inittermUser32(hModule, ulFlag);
    13298         break;
    13399      case 1 :
    134          if(hInstanceUser32) {
    135                 UnregisterLxDll(hInstanceUser32);
    136          }
     100         rc = inittermUser32(hModule, ulFlag);
    137101         break;
    138102      default  :
     
    148112static void APIENTRY cleanup(ULONG ulReason)
    149113{
    150    dprintf(("user32 exit\n"));
    151 //SvL: Causes PM hangs on some (a lot?) machines. Reason unknown.
    152 ////   RestoreCursor();
    153    DestroyDesktopWindow();
    154    Win32BaseWindow::DestroyAll();
    155    UnregisterSystemClasses();
    156    Win32WndClass::DestroyAll();
    157    MONITOR_Finalize(&MONITOR_PrimaryMonitor);
    158    SYSCOLOR_Save();
    159    CloseSpyQueue();
     114   cleanupUser32(ulReason);
    160115   ctordtorTerm();
    161    dprintf(("user32 exit done\n"));
    162116
    163117   DosExitList(EXLST_EXIT, cleanup);
  • trunk/src/user32/msgbox.c

    r3153 r6375  
    1 /* $Id: msgbox.c,v 1.3 2000-03-18 16:13:37 cbratschi Exp $ */
     1/* $Id: msgbox.c,v 1.4 2001-07-20 15:34:16 sandervl Exp $ */
    22/*
    33 * Message boxes (based on Wine code)
     
    366366}
    367367
     368#ifndef __WIN32OS2__
    368369/**************************************************************************
    369370 *           FatalAppExit32A   (KERNEL32.108)
     
    386387    ExitProcess(0);
    387388}
     389#endif
    388390
    389391/*****************************************************************************
  • trunk/src/user32/win32wbase.cpp

    r6317 r6375  
    1 /* $Id: win32wbase.cpp,v 1.276 2001-07-13 14:31:15 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.277 2001-07-20 15:34:17 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    38373837//    else    return hwnd;    //OS/2 window handle
    38383838}
     3839#ifdef DEBUG
     3840LONG  Win32BaseWindow::addRef()
     3841{
     3842    dprintf2(("addRef %x %d", getWindowHandle(), getRefCount()+1));
     3843    return GenericObject::addRef();
     3844}
     3845//******************************************************************************
     3846//******************************************************************************
     3847LONG  Win32BaseWindow::release(char *function, int line)
     3848{
     3849    dprintf2(("release %s %d %x %d", function, line, getWindowHandle(), getRefCount()-1));
     3850    return GenericObject::release();
     3851}
     3852#endif
    38393853//******************************************************************************
    38403854//******************************************************************************
  • trunk/src/user32/win32wbase.h

    r6169 r6375  
    1 /* $Id: win32wbase.h,v 1.123 2001-07-04 17:46:05 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.124 2001-07-20 15:34:18 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    3636#define CheckMagicDword(a)      (a==WIN32PM_MAGIC)
    3737
     38#ifdef DEBUG
     39#define RELEASE_WNDOBJ(a)       { a->release(__FUNCTION__, __LINE__); a = NULL; }
     40#else
    3841#define RELEASE_WNDOBJ(a)       { a->release(); a = NULL; }
     42#endif
    3943
    4044typedef struct {
     
    328332         INT    enumPropsExW(PROPENUMPROCEXW func, LPARAM lParam);
    329333
     334#ifdef DEBUG
     335         LONG addRef();
     336         LONG release(char *function = __FUNCTION__, int line = __LINE__ );
     337#endif
     338
    330339//Locates window in linked list and increases reference count (if found)
    331340//Window object must be unreferenced after usage
  • trunk/src/user32/wsprintf.cpp

    r5271 r6375  
    645645    return ( res == -1 ) ? 1024 : res;
    646646}
     647
     648/***********************************************************************
     649 *           wsnprintfA   (Not a Windows API)
     650 */
     651INT WINAPIV wsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, ... )
     652{
     653    va_list valist;
     654    INT res;
     655
     656    va_start( valist, spec );
     657    res = wvsnprintfA( buffer, maxlen, spec, valist );
     658    va_end( valist );
     659    return res;
     660}
     661
     662/***********************************************************************
     663 *           wsnprintfW   (Not a Windows API)
     664 */
     665INT WINAPIV wsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, ... )
     666{
     667    va_list valist;
     668    INT res;
     669
     670    va_start( valist, spec );
     671    res = wvsnprintfW( buffer, maxlen, spec, valist );
     672    va_end( valist );
     673    return res;
     674}
Note: See TracChangeset for help on using the changeset viewer.